Re: Understanding Threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The error comes up, when xgcc, in the object directory, compiles the
libgcc/unwind-dw2.c file from the source directory into the object
directory. "/usr/local/zich" is the objdir ; "usr/local/gcc-4.7.0" the
srcdir. 
Maybe i setup something wrong on the configuration. But the libpthread.so
library seems to work fine when compiling code under gcc 4.6.1 with the
"-phtread" compiler option. I think this option should somehow be invoked
for the make scripts of gcc 4.7.0. But i don't know how and where to set it.


/usr/local/zich/./gcc/xgcc -B/usr/local/zich/./gcc/
-B/usr/i686-linux-gnu/bin/ -B/usr/i686-linux-gnu/lib/ -isystem
/usr/i686-linux-gnu/include -isystem /usr/i686-linux-gnu/sys-include    -g
-O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  
-fpic -I. -I. -I../.././gcc -I../../../gcc-4.7.0/./libgcc
-I../../../gcc-4.7.0/./libgcc/. -I../../../gcc-4.7.0/./libgcc/../gcc
-I../../../gcc-4.7.0/./libgcc/../include
-I../../../gcc-4.7.0/./libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT  
-DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep
-fexceptions -c ../../../gcc-4.7.0/./libgcc/unwind-dw2.c -fvisibility=hidden
-DHIDE_EXPORTS
In file included from ../../../gcc-4.7.0/./libgcc/gthr.h:150:0,
                 from ../../../gcc-4.7.0/./libgcc/unwind-dw2.c:38:
./gthr-default.h:140:1: error: ‘pthread_once’ undeclared here (not in a
function)
./gthr-default.h:141:1: error: ‘pthread_getspecific’ undeclared here (not in
a function)
./gthr-default.h:142:1: error: ‘pthread_setspecific’ undeclared here (not in
a function)
./gthr-default.h:144:1: error: ‘pthread_create’ undeclared here (not in a
function)
./gthr-default.h:145:1: error: ‘pthread_join’ undeclared here (not in a
function)
./gthr-default.h:146:1: error: ‘pthread_equal’ undeclared here (not in a
function)
./gthr-default.h:147:1: error: ‘pthread_self’ undeclared here (not in a
function)
./gthr-default.h:148:1: error: ‘pthread_detach’ undeclared here (not in a
function)
./gthr-default.h:150:1: error: ‘pthread_cancel’ undeclared here (not in a
function)
./gthr-default.h:152:1: error: ‘sched_yield’ undeclared here (not in a
function)
./gthr-default.h:154:1: error: ‘pthread_mutex_lock’ undeclared here (not in
a function)
./gthr-default.h:155:1: error: ‘pthread_mutex_trylock’ undeclared here (not
in a function)
./gthr-default.h:157:1: error: ‘pthread_mutex_timedlock’ undeclared here
(not in a function)
./gthr-default.h:159:1: error: ‘pthread_mutex_unlock’ undeclared here (not
in a function)
./gthr-default.h:160:1: error: ‘pthread_mutex_init’ undeclared here (not in
a function)
./gthr-default.h:161:1: error: ‘pthread_mutex_destroy’ undeclared here (not
in a function)
./gthr-default.h:163:1: error: ‘pthread_cond_init’ undeclared here (not in a
function)
./gthr-default.h:164:1: error: ‘pthread_cond_broadcast’ undeclared here (not
in a function)
./gthr-default.h:165:1: error: ‘pthread_cond_signal’ undeclared here (not in
a function)
./gthr-default.h:166:1: error: ‘pthread_cond_wait’ undeclared here (not in a
function)
./gthr-default.h:167:1: error: ‘pthread_cond_timedwait’ undeclared here (not
in a function)
./gthr-default.h:168:1: error: ‘pthread_cond_destroy’ undeclared here (not
in a function)
./gthr-default.h:171:1: error: ‘pthread_key_create’ undeclared here (not in
a function)
./gthr-default.h:172:1: error: ‘pthread_key_delete’ undeclared here (not in
a function)
./gthr-default.h:173:1: error: ‘pthread_mutexattr_init’ undeclared here (not
in a function)
./gthr-default.h:174:1: error: ‘pthread_mutexattr_settype’ undeclared here
(not in a function)
./gthr-default.h:175:1: error: ‘pthread_mutexattr_destroy’ undeclared here
(not in a function)
./gthr-default.h: In function ‘__gthread_create’:
./gthr-default.h:681:35: error: called object ‘__gthrw_pthread_create’ is
not a function
./gthr-default.h: In function ‘__gthread_join’:
./gthr-default.h:687:33: error: called object ‘__gthrw_pthread_join’ is not
a function
./gthr-default.h: In function ‘__gthread_detach’:
./gthr-default.h:693:35: error: called object ‘__gthrw_pthread_detach’ is
not a function
./gthr-default.h: In function ‘__gthread_equal’:
./gthr-default.h:699:34: error: called object ‘__gthrw_pthread_equal’ is not
a function
./gthr-default.h: In function ‘__gthread_self’:
./gthr-default.h:705:33: error: called object ‘__gthrw_pthread_self’ is not
a function
./gthr-default.h: In function ‘__gthread_yield’:
./gthr-default.h:711:32: error: called object ‘__gthrw_sched_yield’ is not a
function
./gthr-default.h: In function ‘__gthread_once’:
./gthr-default.h:718:35: error: called object ‘__gthrw_pthread_once’ is not
a function
./gthr-default.h: In function ‘__gthread_key_create’:
./gthr-default.h:726:39: error: called object ‘__gthrw_pthread_key_create’
is not a function
./gthr-default.h: In function ‘__gthread_key_delete’:
./gthr-default.h:732:39: error: called object ‘__gthrw_pthread_key_delete’
is not a function
./gthr-default.h: In function ‘__gthread_getspecific’:
./gthr-default.h:738:40: error: called object ‘__gthrw_pthread_getspecific’
is not a function
./gthr-default.h: In function ‘__gthread_setspecific’:
./gthr-default.h:744:40: error: called object ‘__gthrw_pthread_setspecific’
is not a function
./gthr-default.h: In function ‘__gthread_mutex_destroy’:
./gthr-default.h:760:44: error: called object
‘__gthrw_pthread_mutex_destroy’ is not a function
./gthr-default.h: In function ‘__gthread_mutex_lock’:
./gthr-default.h:769:41: error: called object ‘__gthrw_pthread_mutex_lock’
is not a function
./gthr-default.h: In function ‘__gthread_mutex_trylock’:
./gthr-default.h:778:44: error: called object
‘__gthrw_pthread_mutex_trylock’ is not a function
./gthr-default.h: In function ‘__gthread_mutex_timedlock’:
./gthr-default.h:789:46: error: called object
‘__gthrw_pthread_mutex_timedlock’ is not a function
./gthr-default.h: In function ‘__gthread_mutex_unlock’:
./gthr-default.h:799:43: error: called object ‘__gthrw_pthread_mutex_unlock’
is not a function
./gthr-default.h: In function ‘__gthread_recursive_mutex_init_function’:
./gthr-default.h:814:46: error: called object
‘__gthrw_pthread_mutexattr_init’ is not a function
./gthr-default.h:817:10: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first
use in this function)
./gthr-default.h:817:10: note: each undeclared identifier is reported only
once for each function it appears in
./gthr-default.h:816:44: error: called object
‘__gthrw_pthread_mutexattr_settype’ is not a function
./gthr-default.h:819:37: error: called object ‘__gthrw_pthread_mutex_init’
is not a function
./gthr-default.h:821:44: error: called object
‘__gthrw_pthread_mutexattr_destroy’ is not a function
./gthr-default.h: In function ‘__gthread_cond_broadcast’:
./gthr-default.h:867:43: error: called object
‘__gthrw_pthread_cond_broadcast’ is not a function
./gthr-default.h: In function ‘__gthread_cond_signal’:
./gthr-default.h:873:40: error: called object ‘__gthrw_pthread_cond_signal’
is not a function
./gthr-default.h: In function ‘__gthread_cond_wait’:
./gthr-default.h:879:38: error: called object ‘__gthrw_pthread_cond_wait’ is
not a function
./gthr-default.h: In function ‘__gthread_cond_timedwait’:
./gthr-default.h:886:43: error: called object
‘__gthrw_pthread_cond_timedwait’ is not a function
./gthr-default.h: In function ‘__gthread_cond_destroy’:
./gthr-default.h:907:41: error: called object ‘__gthrw_pthread_cond_destroy’
is not a function
../../../gcc-4.7.0/./libgcc/unwind-dw2.c: In function ‘uw_init_context_1’:
../../../gcc-4.7.0/./libgcc/unwind-dw2.c:1505:45: error: ‘PTHREAD_ONCE_INIT’
undeclared (first use in this function)
In file included from ../../../gcc-4.7.0/./libgcc/gthr.h:150:0,
                 from ../../../gcc-4.7.0/./libgcc/unwind-dw2.c:38:
../../../gcc-4.7.0/./libgcc/unwind-dw2.c: In function ‘__gthread_once’:
./gthr-default.h:721:1: warning: control reaches end of non-void function
[-Wreturn-type]
make[3]: *** [unwind-dw2.o] Error 1
make[3]: Leaving directory `/usr/local/zich/i686-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/usr/local/zich'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/local/zich'
make: *** [all] Error 2


These are the configure options i made:

  $ ../gcc-4.7.0/./configure --disable-multilib --enable-threads=posix
--with-tune=generic --prefix=/usr --with-pkgversion=Ubuntu/Linaro
4.7.0-9ubuntu3 --enable-shared --libexecdir=/usr/lib --with-sysroot=/
--enable-plugin --enable-libgomp --enable-objc-gc -disable-tls
--enable-version-specific-runtime-libs --with-gmp=/usr/local/5.0.5
--with-mpfr-include=/usr/include --with-mpfr-lib=/usr/lib
--with-mpc-include=/usr/include --with-mpc-lib=/usr/lib
--enable-gather-detailed-mem-stats --enable-coverage=opt
--enable-checking=all --with-dwarf2 --with-fpmath=sse
--with-endian=little,big --with-arch-32=i686
--enable-languages=c,ada,c++,fortran,go,java,lto,objc,obj-c++
--build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu

 I want to build the compiler on a i686 architecture with
Linux-3.0.0-19-generic kernel and Ubuntu 11.10 (oneiric).
-- 
View this message in context: http://old.nabble.com/Understanding-Threads-tp33964421p33971969.html
Sent from the gcc - Help mailing list archive at Nabble.com.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux