brew: Cannot create bottle for tcl-tk with a newer brew than 3.3.11

brew config output

> brew config
HOMEBREW_VERSION: 3.3.13-13-g62b82c0
ORIGIN: https://git.balabit/macos/homebrew.git
HEAD: 62b82c0792a3ad21584e6b1070214d2b1beaeded
Last commit: 12 seconds ago
Core tap ORIGIN: https://git.balabit/macos/homebrew-repo.git
Core tap HEAD: 88ac7fce91b3f1785d8d51767045ba5d8aa15253
Core tap last commit: 23 hours ago
Core tap branch: upgrade-formulas
HOMEBREW_PREFIX: /opt/bb-brew
HOMEBREW_CACHE: /opt/bb-brew/Caches
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_AUTO_UPDATE: set
Homebrew Ruby: 2.6.8 => /opt/bb-brew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 11.0.3 build 1103
Git: 2.24.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.7-x86_64
CLT: 12.0.0.32.29
Xcode: 11.7

brew doctor output

> brew doctor 
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo homebrew/core) checkout master

Warning: Your Xcode (11.7) is outdated.
Please update to Xcode 12.4 (or delete it).
Xcode can be updated from the App Store.

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

I would like to update the formulas we are using to build our product. To release the binaries another git branch was created which is reseted to the homebrew-core repo’s master.

What happened (include all command output)?

brew bottle --json tcl-tk command failed.

output:

==> Determining tcl-tk bottle rebuild...
==> Bottling tcl-tk--8.6.12_1.catalina.bottle.tar.gz...
Error: new ID must be a String
Do not report this issue until you've run `brew update` and tried again.
/opt/bb-brew/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-3.0.0/lib/macho/macho_file.rb:318:in `change_dylib_id'
/opt/bb-brew/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-3.0.0/lib/macho/tools.rb:26:in `change_dylib_id'
/opt/bb-brew/Homebrew/Library/Homebrew/os/mac/keg.rb:10:in `change_dylib_id'
/opt/bb-brew/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:26:in `block (2 levels) in relocate_dynamic_linkage'
/opt/bb-brew/Homebrew/Library/Homebrew/extend/pathname.rb:341:in `ensure_writable'
/opt/bb-brew/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:23:in `block in relocate_dynamic_linkage'
/opt/bb-brew/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:22:in `each'
/opt/bb-brew/Homebrew/Library/Homebrew/extend/os/mac/keg_relocate.rb:22:in `relocate_dynamic_linkage'
/opt/bb-brew/Homebrew/Library/Homebrew/keg_relocate.rb:130:in `replace_placeholders_with_locations'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:501:in `block (2 levels) in bottle_formula'
/opt/bb-brew/Homebrew/Library/Homebrew/utils.rb:399:in `ignore_interrupts'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:499:in `ensure in block in bottle_formula'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:499:in `block in bottle_formula'
/opt/bb-brew/Homebrew/Library/Homebrew/keg.rb:334:in `block in lock'
/opt/bb-brew/Homebrew/Library/Homebrew/lock_file.rb:35:in `with_lock'
/opt/bb-brew/Homebrew/Library/Homebrew/keg.rb:330:in `lock'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:390:in `bottle_formula'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:105:in `block in bottle'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:104:in `each'
/opt/bb-brew/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:104:in `bottle'
/opt/bb-brew/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'

After a short investigation it seems an empty id is generated for the lib at Library/Homebrew/extend/os/mac/keg_relocate.rb:25 ==> FILE: /opt/bb-brew/Cellar/tcl-tk/8.6.12_1/lib/tcltls1.7.22/tcltls.dylib ==> FILE.DYLIB_ID shared-tcltls.dylib ==> ID:

With version 3.3.11 brew can build the bottle successfully. With a newer version I could reproduce the issue.

What did you expect to happen?

The json config is generated to create a bottle afterwards.

Step-by-step reproduction instructions (by running brew commands)

> brew install --build-bottle tcl-tk
> brew bottle --json tcl-tk
> brew bottle --merge tcl-tk*.json --write

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@MikeMcQuaid I think this is a bug in brew, so I’m transferring it back.