-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC prefers /lib64 libs over $LIBRARY_PATH from EasyBuild modules (!) #5776
GCC prefers /lib64 libs over $LIBRARY_PATH from EasyBuild modules (!) #5776
Comments
This link provides some useful background. Apparently others have crashed into this problem as well. |
@michaelkarlcoleman Thanks for reporting this, and sorry for not picking up on this earlier. I'm a bit puzzled that this only popped up recently... Although your explanation covers why this problem usually doesn't surface makes sense, I would still expect that this pops up regularly. @bartoldeman was also hitting this problem when testing #7346, so I'm wondering if he has more to add here... @geimer: Are you familiar with this, and are you aware of a proper fix for this? |
A general workaround for this could be to symlink For specific packages, the problem is actually that there's no proper Yet another option is to use a compiler wrapper to inject |
A comment on the StackOverflow page suggests that only Another factor is that perhaps a lot of EB recipes are already using the The symlink idea sounds like it might work, ugliness notwithstanding. Probably a lot easier than actually trying to change More broadly, it'd be great to have EB packages built within a sterilized environment, perhaps provided by a Singularity image. Such an environment could have far fewer libraries present, which would make this issue more obvious when it occurs. |
@michaelkarlcoleman My preference would go to the compiler wrapper that silently injects With symlinking I have been wanting to use a more isolated environment for testing installations for a while, and I'm finally getting to it, but note that this is a double-edged sword. It definitely helps with discovering that certain dependencies are being picked up from the OS rather than via EasyBuild-provided dependencies. But it wouldn't actually help to discover whether or not an installation suffers from the problem being discussed here, since that can only occur if things like |
All good points. You're right--the sterile environment would mostly be useful for detecting libs/etc. that are missing from a recipe. Maybe there's also a special flag or two that would convince |
I just ran into this with ICU and mpicc:
So I'd like to bring this up once again and vote for the solution to symlink lib64 to lib if it doesn't exist. This will solve most of the problems. Note that in my case |
This avoids using the system libs from /lib64 instead of libs from LIBRARY_PATH Fixes easybuilders/easybuild-easyconfigs#5776 but needs a rebuild of the affected modules
@Flamefire Symlinking |
This avoids using the system libs from /lib64 instead of libs from LIBRARY_PATH Fixes easybuilders/easybuild-easyconfigs#5776 but needs a rebuild of the affected modules
EasyBuild will now automatically symlinks |
While debugging a Boost link issue, the cause turned out to be that
g++
(fromGCCcore/6.4.0
) will use libraries in/lib64
(actually/lib/../lib64
) in preference to the libraries from loaded EasyBuild modules, which are specified inLIBRARY_PATH
andLD_LIBRARY_PATH
.Clarification: The actual directories mentioned in
LIBRARY_PATH
appear at the end of the list of directories thatgcc
searches. Modified versions of theLIBRARY_PATH
directories are placed at the front of thegcc
search list, but those directories generally don't exist because they're not created by easyconfigs. The net effect of this is that distributions libraries present in standard locations like/lib
will "win" over loaded modules whengcc
goes looking for libraries mentioned with-l
flags.This is with vanilla easyconfigs from
develop
or perhaps a release from December or so. If there's a flag to getgcc
to stop doing this, I haven't spotted it.This is super-awful, obviously. Apparently it "works" most of the time because there's either no library in
/lib64
to shadow the module library, or else the library that is there is close enough compatibility-wise to not cause trouble. In my case, it failed because there was an older centos version of Boost installed, and that shadowed the EasyBuild Boost module.Not sure what the right fix is, but it might be that
eb
needs to start using the.../lib64
form in addition to or instead of the.../lib
form.Here's some data:
The text was updated successfully, but these errors were encountered: