update GCC easyblock to ensure that --sysroot is passed to linker (but only when it needs to be)#2921
Conversation
|
In order to not break older installations that still use the old approach, we would have to add some check(s) here. We can perhaps do that by inspecting the file |
|
Yeah, we should figure out a way to opt-out of patching out the What was changed exactly that no longer required this, do we have references for this? cc @bartoldeman, who no doubt can provide some guided info here... |
|
I think we just add an easyconfig switch here to turn this off (defaulting to on), and a hook in eessi to trigger it. In the next major release we change the default |
See: gentoo/gentoo#28851 and https://www.gentoo.org/support/news-items/2023-01-28-rap-prefix-sysroot.html. |
The comment at https://github.com/gentoo/gentoo/pull/28851/files#diff-bbba0e850dfb18cee4bb09d6c00d235e935e24baa2199ce82a628d84dd16cb58R1317 shows the difference between Prefix installations with the old and new approach: So we may be able to check those paths and determine if they are "prefixed" (with the same prefix as specified with |
--sysroot is passed to linker--sysroot is passed to linker
|
Yes @bedroge is correct here. |
Check the contents of libc.so: only if the entries are prefixed, patch gcc.c (or gcc.cc for GCC 12+), to account for the changes in gentoo/gentoo#28851
Patch gcc.c* only for older sysroot-ed installations.
--sysroot is passed to linker--sysroot is passed to linker (but only when it needs to be)
|
This has been tested extensively in EESSI, cfr. EESSI/software-layer#250 Only has impact when EasyBuild is configured with an alternate I'll go ahead and merge this to be included last-minute with EasyBuild v4.7.2, test reports are coming up to confirm this doesn't cause trouble. Thanks for the effort on this @trz42 and @bartoldeman! |
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 5 out of 5 (5 easyconfigs in total) |
This removes an adjustment to
gcc/gcc.cwhich avoided that--sysrootis passed to the linker. Since a recent change to how Gentoo supports sysroot (see gentoo/gentoo#28851) we need to change the easyblock for gcc.A bit of testing revealed that only the removed line(s) are not needed any longer.
So far it has been tested for an EESSI-like environment with a recent compatibility layer version (Gentoo commit from April 17) with:
GCC/9.3.0not tested, but might be ignore for EESSI at leastx86_64/{generic,amd/zen2,intel/broadwell,intel/cascadelake,intel/skylake_avx512andaarch64/genericx86_64/{generic,amd/zen2,intel/broadwell,intel/cascadelake,intel/skylake_avx512andaarch64/genericx86_64/{generic,amd/zen2,intel/broadwell,intel/cascadelake,intel/skylake_avx512andaarch64/generic