This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ execution fails Unresolved symbol: pthread_once
- From: rdbrown at mira dot net
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Dec 2002 10:27:29 +1100
- Subject: g++ execution fails Unresolved symbol: pthread_once
- References: <20021218140141.GB534@urtur> <200212181614.gBIGEbOx011749@hiauly1.hia.nrc.ca>
On Wed, Dec 18, 2002 at 11:14:36AM -0500, John David Anglin wrote:
> > Dave do you still need a private patch to get past the pthread_once guff?
> > My mainline testresults on 3.4 20021217 (experimental) still have all
> > g++ execution tests fail.
> I don't have these fails. There were a number of g++ fails introduced
> by a patch by Jason Merrill a couple of days ago. I believe this is now
> fixed.
> > PASS: g++.dg/bprob/g++-bprob-1.C compilation, -O1 -fprofile-arcs
> > spawn [open ...]
> > /usr/lib/dld.sl: \
Unresolved symbol: pthread_once (code) from /usr/local/lib/libgcc_s.sl
> Isn't this a result of a hack that you did to use posix threads?
Ages ago I submitted some specs patches that were rightly rejected
because none of the other infrastructure was there. This is straight
out of CVS with no fiddles.
(--host=hppa2.0n-hp-hpux11.00 --with-gnu-as --with-as=/usr/local/bin/as)
> I suggest
> that you look at the g++.log and build g++-bprob-1.C adding "-v" and/or
> "-Wl,-v" to see exactly why the link is using /usr/local/lib/libgcc_s.sl.
> It should be using the library in your build directory. You can also
> use chatr to see how the application was linked. In the 32-bit port,
> the paths to dependent libraries are hardcoded as absolute paths and
> SHLIB_PATH is normally disabled. In the 64-bit port, you have to watch
> out for the defines for LD_LIBRARY_PATH and SHLIB_PATH if you try to run
> a g++ test manually. The testsuite builds defines for these and puts
> them in the environment to ensure that libraries are loaded correctly.
-rwxrwxrwx 1 rdb users 20480 Dec 18 12:53 g++-abi-empty-C.exe
-bash-2.05b$ chatr g++-abi-empty-C.exe
g++-abi-empty-C.exe:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs/libstdc++.sl.5
dynamic /usr/lib/libm.2
dynamic /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
data page size: D (default)
instruction page size: D (default)
-bash-2.05b$ pwd
/home/rdb/gcc-3.4.obj-1217/gcc
-bash-2.05b$ nm libgcc_s.sl | fgrep pthr
nm doesn't find pthread_once in libgcc_s.sl .
> It's probably time to think about the posix thread issue for 3.4.
> So, I am open to suggestions and patches on how best to do this.
The old specs patch is here if it is worth anything.
http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00516.html
I don't see anything obvious in the link output - will try this evening
with a link map.
/usr/local/bin/as --traditional-format -o g++-bprob-1.o g++-bprob-1.s
/home/rdb/gcc-3.4.obj/gcc/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01 /usr/ccs/lib/crt0.o -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libiberty -L/home/rdb/gcc-3.4.obj/gcc -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -v g++-bprob-1.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
collect2 version 3.4 20021218 (experimental) (hppa)
/usr/ccs/bin/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01 /usr/ccs/lib/crt0.o -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libiberty -L/home/rdb/gcc-3.4.obj/gcc -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -v g++-bprob-1.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/ccs/bin/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01 /usr/ccs/lib/crt0.o -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libiberty -L/home/rdb/gcc-3.4.obj/gcc -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -v g++-bprob-1.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
LPATH is : /usr/lib:/opt/langtools/lib
Loading /usr/ccs/lib/crt0.o:
Loading g++-bprob-1.o:
Searching library /usr/lib/libm.2:
Searching library /usr/lib/libdld.2:
Searching library /usr/lib/libc.2:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs/libstdc++.sl:
Searching library /usr/lib/libm.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
WARNING: LIBRARY /home/rdb/gcc-3.4.obj/gcc/libgcc.a HAS OVERFLOW SYMBOLS; USE CLEANRL
Selecting _gcov.o to resolve __gcov_init
referenced from g++-bprob-1.o
Loading /home/rdb/gcc-3.4.obj/gcc/libgcc.a(_gcov.o):
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
Searching library /usr/lib/libdld.2:
Searching library /usr/lib/libc.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
WARNING: LIBRARY /home/rdb/gcc-3.4.obj/gcc/libgcc.a HAS OVERFLOW SYMBOLS; USE CLEANRL
Searching library /usr/lib/milli.a:
Loading /usr/lib/milli.a(errnet.o):errno
Selecting dyncallU.o to resolve $$dyncall
referenced from /usr/ccs/lib/crt0.o
Loading /usr/lib/milli.a(dyncallU.o):
Searching library /usr/lib/milli.a:
/usr/ccs/bin/ld: (Warning) Linker features were used that may not be supported in future releases. The +vallcompatwarnings option can be used to display more details, and the ld(1) man page contains additional information. This warning can be suppressed with the +vnocompatwarnings option.
/usr/local/hppa2.0n-hp-hpux11.00/bin/nm -n /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01
/usr/ccs/bin/chatr /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01
/usr/local/hppa2.0n-hp-hpux11.00/bin/nm -n /home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs/libstdc++.sl.5
/usr/local/hppa2.0n-hp-hpux11.00/bin/nm -n /usr/lib/libm.2
/usr/local/hppa2.0n-hp-hpux11.00/bin/nm -n /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl
/usr/local/hppa2.0n-hp-hpux11.00/bin/nm -n /usr/lib/libc.2
/home/rdb/gcc-3.4.obj/gcc/testsuite/../g++ -x c -c -o /var/tmp//ccq4CRVJ.o -B/home/rdb/gcc-3.4.obj/gcc/testsuite/../ -fmessage-length=0 -fprofile-arcs -fno-exceptions -w /var/tmp//ccui0c4W.c
/usr/ccs/bin/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01 /usr/ccs/lib/crt0.o /var/tmp//ccq4CRVJ.o -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libiberty -L/home/rdb/gcc-3.4.obj/gcc -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -v g++-bprob-1.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/ccs/bin/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /home/rdb/gcc-3.4.obj/gcc/testsuite/g++-bprob-1.x01 /usr/ccs/lib/crt0.o /var/tmp//ccq4CRVJ.o -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs -L/home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libiberty -L/home/rdb/gcc-3.4.obj/gcc -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -v g++-bprob-1.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
LPATH is : /usr/lib:/opt/langtools/lib
Loading /usr/ccs/lib/crt0.o:
Loading /var/tmp//ccq4CRVJ.o:
Loading g++-bprob-1.o:
Searching library /usr/lib/libm.2:
Searching library /usr/lib/libdld.2:
Searching library /usr/lib/libc.2:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/hppa2.0n-hp-hpux11.00//libstdc++-v3/src/.libs/libstdc++.sl:
Searching library /usr/lib/libm.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
WARNING: LIBRARY /home/rdb/gcc-3.4.obj/gcc/libgcc.a HAS OVERFLOW SYMBOLS; USE CLEANRL
Selecting _gcov.o to resolve __gcov_init
referenced from g++-bprob-1.o
Loading /home/rdb/gcc-3.4.obj/gcc/libgcc.a(_gcov.o):
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
Searching library /usr/lib/libdld.2:
Searching library /usr/lib/libc.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc_s.sl:
Searching library /home/rdb/gcc-3.4.obj/gcc/libgcc.a:
WARNING: LIBRARY /home/rdb/gcc-3.4.obj/gcc/libgcc.a HAS OVERFLOW SYMBOLS; USE CLEANRL
Searching library /usr/lib/milli.a:
Loading /usr/lib/milli.a(errnet.o):errno
Selecting dyncallU.o to resolve $$dyncall
referenced from /usr/ccs/lib/crt0.o
Loading /usr/lib/milli.a(dyncallU.o):
Searching library /usr/lib/milli.a:
/usr/ccs/bin/ld: (Warning) Linker features were used that may not be supported in future releases. The +vallcompatwarnings option can be used to display more details, and the ld(1) man page contains additional information. This warning can be suppressed with the +vnocompatwarnings option.