This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Bug report ?
On Tue, Jul 19, 2005 at 02:39:00PM +0200, bergern@ensinfo.univ-nantes.fr wrote:
> Hello
>
> Here is the command line for compiling that is created by make in order to
> compile a file that doesn't use signal objects (LibSig c++) in itself, but
> that
> is linked with .o files that use them :
>
> -------------------------------------------------------------------------
> if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\
> "\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"elisa\"
> -DVERSION=\"1.0.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_
> STAT_H=1
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_
> H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_
> H=1
> -DGC_LINUX_THREADS=1 -D_REENTRANT=1 -DTHREAD_LOCAL_ALLOC=1 -DSILENT
> =1
> -DNO_SIGNALS=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1
> -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1
> -DHAVE_LIBDL=1 -DHAVE_MATHLIB_H=1 -DHAVE_GAOL_GAOL_H=1 -DELISA_DEBUG
> =0
> -DELISA_PROFILE=0 -DSTDC_HEADERS=1 -DHAVE_STDLIB_H=1 -DHAVE_POW=1 -
> DHAVE_SQRT=1
> -I. -I. -I.. -I../gc/include -I/home/autres/berger/stage2005/include/
> -I/home/autres/berger/stage2005/include/sigc++
This could be the problem, see below...
> -I/home/autres/berger/stage2005/include -MT alphatest.o -MD -MP -MF
> ".deps/alphatest.Tpo" \
> -c -o alphatest.o `test -f 'alphatest.cpp' || echo './'`alphatest.cpp; \
> then mv ".deps/alphatest.Tpo" ".deps/alphatest.Po"; \
> else rm -f ".deps/alphatest.Tpo"; exit 1; \
> fi
> -------------------------------------------------------------------------
>
>
>
> Here is the error message I get :
>
> -------------------------------------------------------------------------
> In file included from /usr/include/c++/3.3.2/bits/stl_alloc.h:89,
> from /usr/include/c++/3.3.2/list:68,
> from /home/autres/berger/stage2005/include/sigc++/signal.h
> :7,
> from /usr/include/pthread.h:24,
> from
> /usr/include/c++/3.3.2/i386-redhat-linux/bits/gthr-default.h:37,
> from /usr/include/c++/3.3.2/i386-redhat-linux/bits/gthr.h:
> 98,
> from /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++io.h
> :37,
> from /usr/include/c++/3.3.2/bits/fpos.h:44,
> from /usr/include/c++/3.3.2/iosfwd:49,
> from /usr/include/c++/3.3.2/ios:44,
> from /usr/include/c++/3.3.2/ostream:45,
> from /usr/include/c++/3.3.2/iostream:45,
> from ../elisa/elisa_and_model.h:15,
> from ../elisa/elisa.h:13,
> from alphatest.cpp:12:
> /usr/include/c++/3.3.2/bits/stl_threads.h:69: error: '__gthread_mutex_t' is
> used as a type, but is not defined as a type.
> Dans le fichier inclus ? partir de /usr/include/c++/3.3.2/bits/stl_alloc.
> h:89,
> ? partir de /usr/include/c++/3.3.2/list:68,
> ? partir de /home/autres/berger/stage2005/include/sigc++/signal
> .h:7,
> ? partir de /usr/include/pthread.h:24,
Looks like pthread.h is including signal.h from sigc++, but it should be
including /usr/include./signal.h
I suggest you remove the -I/home/autres/berger/stage2005/include/sigc++
compiler option, and instead use -I/home/autres/berger/stage2005/include/
Then in your code, prefix sigc++ headers with the directory name:
#include <sigc++/signal.h>
That should prevent pthread.h from including the wrong signal.h
HTH
jon