Closed ralphrmartin closed 7 years ago
I've gotten the same issue, but I don't recall this happening before.
@mjs-arm is lib/libcc1.0.so
new, maybe since gcc6?
The way that gcc deals with this is to compile with a versioned lib path: Installing it into /usr/local/lib/gcc/6/
for example.
The issue with this is that I can't retroactively apply this to the precompiled arm-none-eabi releases, and I'm not sure we can change the folder structure in the tarball in the future either without breaking other peoples setups.
Hm, it's not obvious to me why libcc1
is put into /lib
, instead of /lib/gcc/arm-none-eabi
like the rest of the lib files.
libcc1
is put into /lib
on purpose in libcc1/Makefile.am:41
:
cc1libdir = $(libdir)/$(libsuffix)
This change was introduced in https://github.com/gcc-mirror/gcc/commit/ab103e33b2aae243b231eba689e0b99418fa1663 to "Let GDB reuse GCC's parser.".
That's all fine, cc1libdir
is not to blame, the issue is that the mac tarball simply ships with the default --libdir
, which is /lib
. ~We need to do the same as for the gcc formula, and set --libdir
to something like /lib/gcc/arm-none-eabi
, then it won't conflict with anything else other than our own versions.~ see below
As a fix I've recommended avr-gcc to be built with --libdir
set, see https://github.com/osx-cross/homebrew-avr/issues/41.
~I've raised an internal issue to fix this for new releases.~
No, actually we just don't need to symlink the /lib
folder from the tarball. It is internal to the gcc toolchain anyways. We don't need to recompile the toolchain this way. I'll prepare a PR.
Unlinking is not enough, you'll need to uninstall, update then reinstall:
brew uninstall arm-none-eabi-gcc
brew update
brew install arm-none-eabi-gcc
Thanks. I can confirm this seems to work ok.
I also have avr-gcc installed on my system. This causes a conflict: