-
Notifications
You must be signed in to change notification settings - Fork 374
gcc-4.8: add library paths reported by system linker #691
base: main
Are you sure you want to change the base?
Conversation
Right now only part of the system's libc is symlinked into the conda env - namely the startup files crtXXX.o. In addition the path to the actual shared object libc.so also needs to be added to the spec file in case a custom linker is used inside the conda env (e.g. because binutils is requested).
# | ||
# Linux Portability Issue #2.5: linker also needs to find the rest of libc (i.e. libc.so in addition to crtXXX.o) | ||
# | ||
for library_path in $(/usr/bin/ld --verbose | grep SEARCH_DIR | sed -r 's/SEARCH_DIR\("=?([^"]*)"\);/ \1/g'); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the full path to the system /usr/bin/ld
instead of ld
is a good idea. (It avoids problems if the user has a custom install of binutils.) While you're at it, can you also fix the call to ld
on line 49, above?
You should bump the build number. |
LGTM. |
@frol: Just in case it matters for your gcc-5 package -- @svenpeter42 discovered that the gcc-4.8 If you're not still maintaining the gcc-5 recipe, then sorry for the spam. :-) |
Pinging @mingwandroid about this one. |
Thank you for pinging me! I do still maintain |
Is anything holding back this PR? I just spent half a day tring to figure out why conda's
unless I specified |
Right now only part of the system's libc is symlinked into the conda env - namely the startup files crtXXX.o.
In addition the path to the actual shared object libc.so also needs to be added to the spec file in case a custom
linker is used inside the conda env (e.g. because binutils is requested).
This fixes the following error I get when I conda build a package that requires both gcc-4.8 and binutils:
/home/speter/miniconda2/envs/_build/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status Installation failed: gcc is not able to compile a simple 'Hello, World' program.
cc @stuarteberg