[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Switching to GCC 4.8
From: |
Ludovic Courtès |
Subject: |
Re: Switching to GCC 4.8 |
Date: |
Sat, 16 Nov 2013 15:23:27 +0100 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
address@hidden (Ludovic Courtès) skribis:
> So we want to switch to GCC 4.8 as the default compiler. I tried that
> in ‘core-updates’, but ‘gcc-cross-boot0’ fails to build because some of
> its helper programs built natively (‘genchecksum’, ‘gcc-nm’, etc.) rely
> on C++ headers not provided by our current bootstrap GCC. Some can be
> easily worked around (e.g., replace <cstring> by <string.h>), but others
> cannot (e.g., <iosfwd>.)
>
> Thus, we’ll have to update the bootstrap GCC.
Done with commit 0621349. This turned out to be trickier than expected,
due to the fact that C++ is now a requirement for GCC.
There’s still one problem though: the infamous “libgcc_s.so.1 must be
installed for pthread_cancel to work”, which breaks Guile. We didn’t
have that problem before because libgc.so NEEDed libgcc_s.so; this is no
longer the case, for some reason.
What’s more, the guile RUNPATH contains ${gcc}/lib (where libgcc_s.so
is), but the dynamic linker ignores that entry:
--8<---------------cut here---------------start------------->8---
$ LD_DEBUG=libs ./check-guile threads.test
[...]
22551: find library=libgcc_s.so.1 [0]; searching
22551: search
path=/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs
(LD_LIBRARY_PATH)
22551: trying
file=/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/libgcc_s.so.1
22551: search
path=/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib
(RUNPATH from file
/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/guile)
22551: trying
file=/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib/libgcc_s.so.1
22551: trying
file=/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib/libgcc_s.so.1
22551: trying
file=/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib/libgcc_s.so.1
22551: trying
file=/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib/libgcc_s.so.1
22551: trying
file=/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib/libgcc_s.so.1
22551: search cache=/etc/etc/ld.so.cache
22551: search
path=/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib (system
search path)
22551: trying
file=/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib/libgcc_s.so.1
22551:
libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted
$ objdump -x /tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/guile
| grep PATH
RPATH
/nix/store/gki8sf345ymchq59j3y7r1nw8r3w636g-guile-2.0.9/lib:/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib:/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib64:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib
RUNPATH
/nix/store/gki8sf345ymchq59j3y7r1nw8r3w636g-guile-2.0.9/lib:/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib:/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib64:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib
--8<---------------cut here---------------end--------------->8---
(Note that the “RUNPATH from file” debug statement doesn’t include
${glibc}/lib and ${gcc}/lib, although they do appear in the RUNPATH.)
I’m looking for a proper fix to that.
Nixpkgs has worked around it by adding an explicit -lgcc_s, but that
shouldn’t be needed.
> The good thing is that it will allow us to have same-version binaries
> for x86_64/i686 and mips64el. Perhaps we can achieve fixed-point while
> we’re at it.
Not for this time yet, but I think we’re not far from it now.
Ludo’.