libio has undefined pthread refs under linux/glibc-2.2

wezy726 wezy726@email.msn.com
Sat Mar 10 09:35:00 GMT 2001


    I am running a 
default RedHat  7.0 distribution with only the only RPMs I've added 
being gcc-2.96-69 (gcc, g++, g77) and glibc-2.2-12 (regular, common, and devel 
pkgs).  I am trying to make static binaries of the core GNU utilities (gcc, 
binutils, bison, flex, ...).  Here's what I'm doing:
 
Unpack gcc-2.95.2 and apply glibc-2.2 and 
pgcc-2.95.2.1 patches (they do not patch the same files)
Unpack other utils I want built and link them into 
top level gcc src dir
`mkdir` a build location and `cd` there (in a 
different filesystem... actually on a different partition)
`CPPFLAGS='-Dre_max_failures=re_max_failures2'   \
$GCCSRCDIR/configure --host=i686-pc-linux-gnu 
--build=i686-pc-linux-gnu --with-gnu-as --with-gnu-ld   \
   --enable-target-optspace 
--enable-languages=c,c++ --disable-nls | grep Configuring  
&&   \
make -e CFLAGS='-Os' LIBCFLAGS='-Os' 
LIBCXXFLAGS='-Os -fno-implicit-templates' LDFLAGS='-static'  
bootstrap-lean`
 
    The CPPFLAGS directive stops 
some of the other packages I'm making from breaking.  The explicit --host 
and --build declaration keeps all the packages from complaining 
during `configure.`  --with-gnu-[as,ld] because I am using and 
building that pkg.  The --enable and --disable statements are to keep the 
size down (I am building statics).  `grep` is just to keep the output 
readable (stderr is still piped to the console).  All the compiler flags in 
the `make` are to limit size.  The LDFLAGS, of course, makes the binaries 
static (except for a few rebel packages I will attend to before the 
install).
 
The process runs, making the static binaries, but 
breaks when making the libraries.  The errors output before I get the shell 
prompt are:
 
$GCCSRCDIR/libio/iostream.cc: In method `class 
istream & istream::get(char &)':
$GCCSRCDIR/libio/iostream.cc: 75: 
`_pthread_cleanup_push_defer' undeclared
$GCCSRCDIR/libio/iostream.cc: 86: implicit 
declaration of function `int _pthread_cleanup_pop_restore(...)'
 
    I found a pair of postings on 
gcc-bugs that mention this problem with egcs (not sure which one) under 
linux/glibc-2.0.5.  The sol'n mentioned there was to add '-lpthread' to the 
`gcc.`  I have tried this unsuccessfully (even tried adding a 
'-L/usr/lib').
 
    Anybody have any ideas about 
this one??



More information about the Gcc-help mailing list