This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
pthread_* required on hpux10.20 on C++?
- To: gcc@gcc.gnu.org
- Subject: pthread_* required on hpux10.20 on C++?
- From: Marco Manfai Yu <yumf@Ultimatech.COM>
- Date: Tue, 31 Aug 1999 16:16:12 -0600
- cc: yumf@iago.ultimatech.com
Hi,
I've downloaded and built gcc 2.95.1 with standard as and ld. When
I compile a C++ program the linker complains about missing symbols
that start with pthread_. I don't use any threads in my code.
nm shows that libgcc.a contains unresolved reference to
pthreads. Am I missing something during configure or make?
I tried --disable-threads on my configure line but it doesn't seem to
do anything.
Any pointers or help is greatly appreciated.
Thank you,
Marco Yu
----------------------------------------------------------------------
The following is my configure line and the C++ source code
latte:src/gcc-2.95.1<43%> uname -a
HP-UX latte B.10.20 A 9000/785 2001234259 two-user license
latte:src/gcc-2.95.1<44%> cat config.status
#!/bin/sh
# This file was generated automatically by configure. Do not edit.
# This directory was configured as follows:
./configure --with-gcc-version-trigger=/tools/sparc-solaris/egcs/src/gcc-2.95.1/gcc/version.c --host=hppa2.0-hp-hpux10.20 --prefix=/tools/sparc-solaris/egcs --exec-prefix=/tools/sparc-solaris/egcs/hppa-hpux10 --enable-version-specific-runtime-libs --disable-threads --norecursion
# using "mh-frag"
----------------
Here's my C++ source code.
#include <iostream>
int
main (int, char**)
{
unsigned k[] = { 10, 10 };
cerr << k[0] << " " << k[1] << endl;
}
----------------
Here's the compile log.
latte:~/tmp<48%> g++ -v -g -o foo foo.cc
Reading specs from /tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -g -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_S
OURCE -D_HIUX_SOURCE foo.cc /var/tmp/ccE9pYpv.ii
GNU CPP version 2.95.1 19990816 (release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/include/g++
/usr/local/include
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/../../../../hppa2.0-hp-hpux10.20/include
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/cc1plus /var/tmp/ccE9pYpv.ii -quiet -dumpbase foo.cc -g -version -o /var/tmp/ccSA8t5T.s
cc1plus: warning: -g is only supported when using GAS on this processor,
cc1plus: warning: -g option disabled.
GNU C++ version 2.95.1 19990816 (release) (hppa2.0-hp-hpux10.20) compiled by GNU C version 2.95.1 19990816 (release).
/usr/ccs/bin/as -o /var/tmp/ccmCRm6B.o /var/tmp/ccSA8t5T.s
/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o foo /usr/ccs/lib/crt0.o -L/tools/sparc-solaris/egcs/hppa-hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.1 -L/usr/ccs/bin -L/usr/ccs/lib -L/tools/sparc-solaris/egcs/hppa-hpux10/lib /var/tmp/ccmCRm6B.o -lstdc++ -lm -lgcc -lc -lgcc
/usr/ccs/bin/ld: Unsatisfied symbols:
pthread_once (code)
pthread_setspecific (code)
pthread_getspecific (code)
pthread_keycreate (code)
collect2: ld returned 1 exit status