undefined reference to 'rtems_gxx_key_dtor'

Mark Mussetter mark at link-comm.com
Mon Apr 5 21:50:03 UTC 2004


Hi Everybody,

I am trying to build a library called libsigc++, which implements typesafe 
callbacks in C++. I am having a problem with the build process that led me 
to believe that I needed to link in libcsupport.a (rtems_gxx_key_dtor, 
rtems_gxx_key_create, etc. are in that library).

I used the following line to see if linking in the libcsupport.a library 
would fix things, but it didn't help.

$ PATH=$PATH:/opt/rtems-4.6/bin ; m68k-rtems-g++ -g -O2 -o size_test 
size_test.o 
/tcb2/rtems/build/m68k-rtems/c/tcb2/exec/libcsupport/o-optimize/libcsupport.a 
../sigc++/.libs/libsigc-1.2.a

In both cases I got the following errors:

===============
make[1]: Entering directory `/tcb2/libsigc++-1.2.5/tests'
/bin/bash ../libtool --mode=link m68k-rtems-g++ -g -O2 -o size_test 
size_test.o ../sigc++/libsigc-1.2.la
m68k-rtems-g++ -g -O2 -o size_test size_test.o ../sigc++/.libs/libsigc-1.2.a
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/../../../../m68k-rtems/bin/ld: 
warning: cannot find entry symbol _start; defaulting to 80000074
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libstdc++.a(eh_globals.o): In 
function `get_globals_dtor(void*)':
/home/rtems/src/packages/BUILD/rtems-4.6-m68k-rtems-gcc-newlib-gcc3.2.3newlib1.11.0/build/m68k-rtems/libstdc++-v3/include/m68k-rtems/bits/gthr-default.h:91: 
undefined reference to `rtems_gxx_key_dtor'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libstdc++.a(eh_globals.o): In 
function `get_globals_init()':
/home/rtems/src/packages/BUILD/rtems-4.6-m68k-rtems-gcc-newlib-gcc3.2.3newlib1.11.0/build/m68k-rtems/libstdc++-v3/include/m68k-rtems/bits/gthr-default.h:85: 
undefined reference to `rtems_gxx_key_create'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libstdc++.a(eh_globals.o): In 
function `__cxa_get_globals_fast':
/home/rtems/src/packages/BUILD/rtems-4.6-m68k-rtems-gcc-newlib-gcc3.2.3newlib1.11.0/build/m68k-rtems/libstdc++-v3/include/m68k-rtems/bits/gthr-default.h:103: 
undefined reference to `rtems_gxx_getspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libstdc++.a(eh_globals.o): In 
function `__cxa_get_globals':
/home/rtems/src/packages/BUILD/rtems-4.6-m68k-rtems-gcc-newlib-gcc3.2.3newlib1.11.0/build/m68k-rtems/libstdc++-v3/include/m68k-rtems/bits/gthr-default.h:103: 
undefined reference to `rtems_gxx_getspecific'
/home/rtems/src/packages/BUILD/rtems-4.6-m68k-rtems-gcc-newlib-gcc3.2.3newlib1.11.0/build/m68k-rtems/libstdc++-v3/include/m68k-rtems/bits/gthr-default.h:109: 
undefined reference to `rtems_gxx_setspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `fc_key_dtor':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:92: undefined 
reference to `rtems_gxx_key_dtor'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `fc_key_init':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:86: undefined 
reference to `rtems_gxx_key_create'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `_Unwind_SjLj_Register':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:104: undefined 
reference to `rtems_gxx_getspecific'
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:110: undefined 
reference to `rtems_gxx_setspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `_Unwind_SjLj_Unregister':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:110: undefined 
reference to `rtems_gxx_setspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `_Unwind_SjLj_RaiseException':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:110: undefined 
reference to `rtems_gxx_setspecific'
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:104: undefined 
reference to `rtems_gxx_getspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `_Unwind_SjLj_ForcedUnwind':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:110: undefined 
reference to `rtems_gxx_setspecific'
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:104: undefined 
reference to `rtems_gxx_getspecific'
/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/libgcc.a(unwind-sjlj.o): In 
function `_Unwind_SjLj_Resume':
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:104: undefined 
reference to `rtems_gxx_getspecific'
_Unwind_SjLj_ForcedUnwind/../../gcc-3.2.3/gcc/gthr-rtems.h:110: undefined 
reference to `rtems_gxx_setspecific'
collect2: ld returned 1 exit status
make[1]: *** [size_test] Error 1
make[1]: Leaving directory `/tcb2/libsigc++-1.2.5/tests'
make: *** [all-recursive] Error 1
===============

Can anyone out there give me any hints how to get rid of these errors?

Thanks,

Mark 




More information about the users mailing list