This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
3.0.3 on hppa2.0w-hp-hpux11.00 needs & can't find the pthread lib for its own consumption
- From: JDonner <jdonner0 at earthlink dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 11 Jan 2002 19:40:08 -0500
- Subject: 3.0.3 on hppa2.0w-hp-hpux11.00 needs & can't find the pthread lib for its own consumption
Hi,
When I compile a simple non-threaded hello world, foo.cpp,
the compiler complains about several pthread symbols missing,
meaning gcc's libs got built without it, or gcc is failing to
quietly link pthreads in, when it needs them for itself.
Does anyone know how to get the pthread lib linked in?
Thanks,
Jeff
abuharal@upsapps-~>cat foo.cpp
#include <iostream>
int main()
{
std::cout << "Hello" << std::endl;
}
abuharal@upsapps-~>g++ foo.cpp
/usr/ccs/bin/ld: Unsatisfied symbols:
pthread_once (code)
pthread_key_create (code)
pthread_setspecific (code)
pthread_mutex_unlock (code)
pthread_getspecific (code)
pthread_mutex_lock (code)
collect2: ld returned 1 exit status
I built it as:
abuharal@upsapps-~>g++ -v
Reading specs from
/usr/local/gcc303/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.3/specs
Configured with: ../gcc-3.0.3/configure --prefix=/usr/local/gcc303
--with-gnu-as --with-as=/usr/local/bin/as --with-ld=/usr/ccs/bin/ld
--enable-threads=posix
Thread model: posix
gcc version 3.0.3
Incidentally with warnings turned on it gives lots of warnings like:
/usr/local/gcc303/include/g++-v3/bits/stl_alloc.h:523: warning:
aggregate has a partly bracketed initializer