osx-cross / homebrew-arm

Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7).
BSD 2-Clause "Simplified" License
152 stars 21 forks source link

Installing all arm-gcc-bin results in failure to link newer ones (at least for M1 Mac). #43

Closed tee3 closed 1 year ago

tee3 commented 1 year ago

I'd be okay with keg only /opt/homebrew/opt installations for all of these if that is easier or all but the latest version, which could be installed if that makes it simpler.

See the console log below.

noone@example.com ~ % brew install osx-cross/arm/arm-gcc-bin@10
Warning: osx-cross/arm/arm-gcc-bin@10 10.3-2021.10_1 is already installed and up-to-date.
To reinstall 10.3-2021.10_1, run:
  brew reinstall arm-gcc-bin@10
noone@example.com ~ % brew install osx-cross/arm/arm-gcc-bin@11
Warning: osx-cross/arm/arm-gcc-bin@11 11.3.Rel1 is already installed, it's just not linked.
To link this version, run:
  brew link arm-gcc-bin@11
noone@example.com ~ % brew link osx-cross/arm/arm-gcc-bin@11
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
Linking /opt/homebrew/Cellar/arm-gcc-bin@11/11.3.Rel1... 
Error: Could not symlink bin/arm-none-eabi-addr2line
Target /opt/homebrew/bin/arm-none-eabi-addr2line
is a symlink belonging to arm-gcc-bin@10. You can unlink it:
  brew unlink arm-gcc-bin@10

To force the link and overwrite all conflicting files:
  brew link --overwrite arm-gcc-bin@11

To list all files that would be deleted:
  brew link --overwrite --dry-run arm-gcc-bin@11
noone@example.com ~ % brew install osx-cross/arm/arm-gcc-bin@12
Warning: osx-cross/arm/arm-gcc-bin@12 12.2.Rel1 is already installed, it's just not linked.
To link this version, run:
  brew link arm-gcc-bin@12
noone@example.com ~ % brew link osx-cross/arm/arm-gcc-bin@12   
Linking /opt/homebrew/Cellar/arm-gcc-bin@12/12.2.Rel1... 
Error: Could not symlink bin/arm-none-eabi-addr2line
Target /opt/homebrew/bin/arm-none-eabi-addr2line
is a symlink belonging to arm-gcc-bin@10. You can unlink it:
  brew unlink arm-gcc-bin@10

To force the link and overwrite all conflicting files:
  brew link --overwrite arm-gcc-bin@12

To list all files that would be deleted:
  brew link --overwrite --dry-run arm-gcc-bin@12
noone@example.com ~ % 

By the way, thanks for this project, it's really useful!

ladislas commented 1 year ago

I agree -- I'm happy to review a PR if you have time.

tee3 commented 1 year ago

I'll give it a shot.

ladislas commented 1 year ago

Thanks a lot @tee3 for all the PRs, great work! :) 👍