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