Bug 13331 - Bootstrap failure while linking libstdc++.so: undefined reference to phtread symbols
Summary: Bootstrap failure while linking libstdc++.so: undefined reference to phtread ...
Status: RESOLVED DUPLICATE of bug 13330
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-06 05:41 UTC by Giovanni Bajo
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Bajo 2003-12-06 05:41:03 UTC
I'm seeing this very failure:
http://gcc.gnu.org/ml/libstdc++/2003-11/msg00172.html
on i686-pc-linux-gnu as well.

Basically bootstrap fails like this:

/home/rasky/gcc/mainline/out/gcc/g++ -shared-libgcc -
B/home/rasky/gcc/mainline/out/gcc/ -nostdinc++ -
B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/bin/ -
B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/lib/ -
isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/include -
isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/sys-include -
include bits/stdc++.h -O3 -fomit-frame-pointer -march=athlon-tbird -DNDEBUG -
DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -pipe -fno-enforce-eh-specs -D_GNU_SOURCE -
o abi_check abi_check.o  -L/home/rasky/gcc/mainline/out/i686-pc-linux-
gnu/libstdc++-v3/src -L/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs -lm
/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs/libstdc++.so: undefined reference to `pthread_create'
/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs/libstdc++.so: undefined reference to `pthread_getspecific'
/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs/libstdc++.so: undefined reference to `pthread_once'
/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs/libstdc++.so: undefined reference to `pthread_key_create'
/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-
v3/src/.libs/libstdc++.so: undefined reference to `pthread_setspecific'

Adding "-lpthread" manually to the command line makes the compilation succeed 
(but then, the whole testsuite is broken). I wonder if the configuration is 
losing a -lpthread on the way.

rasky@trinity:~/gcc/mainline/out$ gcc/g++ -v
Reading specs from /home/rasky/gcc/mainline/install//lib/gcc/i686-pc-linux-
gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/home/rasky/gcc/mainline/install/ --
enable-languages=c,c++,java --enable-shared --enable-threads=posix --with-
system-zlib --enable-__cxa_atexit --disable-multilib --with-gcc-version-
trigger=/home/rasky/gcc/mainline/gcc/gcc/version.c --no-create --no-recursion
Thread model: posix
gcc version 3.4 20031206 (experimental)

rasky@trinity:~/gcc/mainline/out$ ld -v
GNU ld version 2.14.90.0.6 20030820
Comment 1 Andrew Pinski 2003-12-06 05:46:37 UTC
To many reloads?

*** This bug has been marked as a duplicate of 13330 ***