Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixing issue on linking user module libraries with recent GCC versions #871
This changes are intended to fix issue #869.
It explicitely defines "-Wl,--no-as-needed" linking flag on nest executable, nest library and pynest library. By default, recent versions of GCC set --as-needed flag. This option allows the linker to ignore, i.e., not link against, some of the libraries supplied on its command line if they are not actually used by the shared library that is being created. This option avoids external modules to be linked in NEST even if they are defined with -Dexternal-modules=....
By setting --no-as-needed GCC will link against all the libraries explicitely indicated (including external modules). It may produce slower executable/library startup if more libraries are added than required.
This PR has only been tested with GCC 5.4.0 and Ubuntu 16.04. It should be tested on different compilers and OS.
heplesser left a comment
@jgarridoalcazar The changes are fine in principle, but they break NEST builds under OSX, so
You are right, @heplesser . Removing the --no-as-needed flag in OSX systems should not be an issue since you already tested this bug in OSX and it was not reproducible (see the mailing list). After the last commit the flag is only added to non-Apple systems. It could be very helpful if anyone having access to BlueGene and/or K could test the building in these systems.