[Nix-dev] libgcc_s.so.1 not found?

Armijn Hemel armijn at uulug.nl
Fri Nov 19 16:04:07 CET 2004


hi,

when compiling a completely new environment inside a pure Nix environment
with my static tools at one point glibc is rebuilt (which makes sense).
However, the configuration process for glibc barfs:

configure:6888: error: cannot compute sizeof (long double), 77

I Googled and found this:

http://linuxfromscratch.org/pipermail/faq/2004-May/000142.html

Apparently libgcc_s.so.1 is needed somewhere. No problem you'd say,
because the ld wrapper scripts all take care of this. In config.log I
see:

configure:3657: checking whether
/nix/store/f4ab8ec8ad15f6288b58a8c49afbe902-gcc/bin/ld is GNU ld

which is a shellscript which also puts the gcc libs in the library
search path. So far, so good. Now the interesting part:

/nix/store/ca4dc874499dd586151bf391da6eb819-binutils/bin/ld: cannot find
/nix/store/377b79c671f578dbdc1059b9d1a86c3d-glibc/lib/libc.so.6
collect2: ld returned 1 exit status

The /nix/store/ca4dc874499dd586151bf391da6eb819-binutils/bin does show
up in the PATH for the glibc compile. According to the gcc manpage:

"For each subprogram to be run, the compiler driver first tries the -B prefix,
if any.  If that name is not found, or if -B was not specified, the driver
tries two standard prefixes, which are /usr/lib/gcc/ and
/usr/local/lib/gcc-lib/.  If neither of those results in a file name that is
found, the unmodified program name is searched for using the directories
specified in your PATH environment variable."

Which explains why it uses these binutils. The question is, why does it
doe that?  I noticed it uses gcc directly, instead of the wrappers at some
point in the configuration process:

Reading specs from
/nix/store/0a364b071da33191471b8ea83bcfcc17-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4.2/specs
Configured with: ../gcc-3.4.2/configure
--prefix=/nix/store/25583872ba75a5e5117cd0ab546e83ee-gcc-static-3.4.2
--enable-languages=c
Thread model: posix
gcc version 3.4.2
configure:2546: $? = 0
configure:2548: gcc -V </dev/null >&5
gcc: couldn't run
`/nix/store/0a364b071da33191471b8ea83bcfcc17-gcc/bin/i686-pc-linux-gnu-gcc--B/nix/store/f4ab8ec8ad15f6288b58a8c49afbe902-gcc/bin':
No such file or directory

I don't like the sight of those last two lines btw. So, my question is, what
is the best way to debug this whole problem?

armijn

-- 
 ---------------------------------------------------------------------------
  armijn at uulug.nl | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
 ---------------------------------------------------------------------------



More information about the nix-dev mailing list