[Barrelfish-users] Problems with libsupc++

Zeus Gómez Marmolejo zeus.gomez at bsc.es
Tue Mar 15 16:24:36 CET 2011


Hi,

I'm trying the new C++ support in Barrelfish.

To do so, I just added *sbin/cxxtest* to the list of MODULES_COMMON in
symbolic_targets.mk. Now, when it goes to its compilation:

*g++ -g -O2 ./x86_64/lib/crt0.o ./x86_64/lib/crtbegin.o -Wl,-section-start,.
data.rel.ro=0x600000 -Wl,-z,max-page-size=0x1000 -fno-builtin -nostdlib -m64
-o ./x86_64/sbin/cxxtest ./x86_64/usr/tests/cxx/_for_app_cxxtest/test.o
./x86_64/lib/libvfs.a ./x86_64/lib/libnfs.a ./x86_64/lib/liblwip.a
./x86_64/lib/libtimer.a ./x86_64/lib/libcxx.a ./libsupc++.a
./x86_64/lib/libbarrelfish.a ./x86_64/errors/errno.o ./x86_64/lib/libc.a
./x86_64/lib/crtend.o*
g++: ./libsupc++.a: No such file or directory
make: *** [x86_64/sbin/cxxtest] Error 1

As I realized that stdCxxLibs needs libsupc++.a in the current build
directory:

stdCxxLibs = [ In arch "/lib/libcxx.a",
               Str "./libsupc++.a" ]
             ++ stdLibs ++
             [  In arch "/lib/crtend.o" ]

and I couldn't find it in the sources, I tried to use the native Linux
version of *libsupc++.a* present in my Linux distribution. But unfortunately
it doesn't compile:

*g++ -g -O2 ./x86_64/lib/crt0.o ./x86_64/lib/crtbegin.o -Wl,-section-start,.
data.rel.ro=0x600000 -Wl,-z,max-page-size=0x1000 -fno-builtin -nostdlib -m64
-o ./x86_64/sbin/cxxtest ./x86_64/usr/tests/cxx/_for_app_cxxtest/test.o
./x86_64/lib/libvfs.a ./x86_64/lib/libnfs.a ./x86_64/lib/liblwip.a
./x86_64/lib/libtimer.a ./x86_64/lib/libcxx.a ./libsupc++.a
./x86_64/lib/libbarrelfish.a ./x86_64/errors/errno.o ./x86_64/lib/libc.a
./x86_64/lib/crtend.o*
./libsupc++.a(eh_terminate.o): In function `std::set_terminate(void (*)())':
(.text._ZSt13set_terminatePFvvE+0x0): multiple definition of
`std::set_terminate(void (*)())'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:51:
first defined here
./libsupc++.a(eh_terminate.o): In function `std::set_unexpected(void
(*)())':
(.text._ZSt14set_unexpectedPFvvE+0x0): multiple definition of
`std::set_unexpected(void (*)())'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:31:
first defined here
./libsupc++.a(eh_terminate.o): In function `std::terminate()':
(.text._ZSt9terminatev+0x0): multiple definition of `std::terminate()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:62:
first defined here
./libsupc++.a(eh_terminate.o): In function `std::unexpected()':
(.text._ZSt10unexpectedv+0x0): multiple definition of `std::unexpected()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:42:
first defined here
./libsupc++.a(eh_catch.o): In function `std::uncaught_exception()':
(.text._ZSt18uncaught_exceptionv+0x0): multiple definition of
`std::uncaught_exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:81:
first defined here
./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':
(.text._ZNSt9exceptionD2Ev+0x0): multiple definition of
`std::exception::~exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97:
first defined here
./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':
(.text._ZNSt9exceptionD1Ev+0x0): multiple definition of
`std::exception::~exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97:
first defined here
./libsupc++.a(eh_exception.o): In function
`std::bad_exception::~bad_exception()':
(.text._ZNSt13bad_exceptionD2Ev+0x0): multiple definition of
`std::bad_exception::~bad_exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97:
first defined here
./libsupc++.a(eh_exception.o): In function
`std::bad_exception::~bad_exception()':
(.text._ZNSt13bad_exceptionD1Ev+0x0): multiple definition of
`std::bad_exception::~bad_exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97:
first defined here
./libsupc++.a(eh_exception.o): In function `std::exception::what() const':
(.text._ZNKSt9exception4whatEv+0x0): multiple definition of
`std::exception::what() const'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:108:
first defined here
./libsupc++.a(eh_exception.o): In function `std::bad_exception::what()
const':
(.text._ZNKSt13bad_exception4whatEv+0x0): multiple definition of
`std::bad_exception::what() const'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:113:
first defined here
./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':
(.text._ZNSt9exceptionD0Ev+0x0): multiple definition of
`std::exception::~exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97:
first defined here
./libsupc++.a(eh_exception.o): In function
`std::bad_exception::~bad_exception()':
(.text._ZNSt13bad_exceptionD0Ev+0x0): multiple definition of
`std::bad_exception::~bad_exception()'
./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:101:
first defined here
./libsupc++.a(cp-demangle.o): In function `d_print_comp':
(.text+0x31c9): undefined reference to `__sprintf_chk'
./libsupc++.a(cp-demangle.o): In function `d_print_comp':
(.text+0x3e69): undefined reference to `__stack_chk_fail'
./libsupc++.a(cp-demangle.o): In function `d_demangle_callback':
(.text+0x4217): undefined reference to `__stack_chk_fail'
./libsupc++.a(guard.o): In function `__cxa_guard_release':
(.text.__cxa_guard_release+0x35): undefined reference to `syscall'
./libsupc++.a(guard.o): In function `__cxa_guard_abort':
(.text.__cxa_guard_abort+0x35): undefined reference to `syscall'
./libsupc++.a(guard.o): In function `__cxa_guard_acquire':
(.text.__cxa_guard_acquire+0x5e): undefined reference to `syscall'
./libsupc++.a(eh_alloc.o): In function `global constructors keyed to
eh_alloc.cc':
(.text._GLOBAL__I_eh_alloc.cc+0x97): undefined reference to
`__stack_chk_fail'
./libsupc++.a(eh_alloc.o): In function
`__gnu_cxx::__scoped_lock::~__scoped_lock()':
(.text._ZN9__gnu_cxx13__scoped_lockD1Ev[__gnu_cxx::__scoped_lock::~__scoped_lock()]+0x59):
undefined reference to `_Unwind_Resume'
./libsupc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':
(.text.__cxa_free_dependent_exception+0xf6): undefined reference to
`_Unwind_Resume'
./libsupc++.a(eh_alloc.o): In function `__cxa_free_exception':
(.text.__cxa_free_exception+0xf6): undefined reference to `_Unwind_Resume'
./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0x1ed): undefined reference to
`_Unwind_Resume'
./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':
(.text.__cxa_allocate_dependent_exception+0x142): undefined reference to
`_Unwind_Resume'
./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned
char, _Unwind_Context*)':
(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x58): undefined
reference to `_Unwind_GetRegionStart'
./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned
char, _Unwind_Context*)':
(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x68): undefined
reference to `_Unwind_GetTextRelBase'
./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned
char, _Unwind_Context*)':
(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x78): undefined
reference to `_Unwind_GetDataRelBase'
./libsupc++.a(eh_personality.o): In function
`parse_lsda_header(_Unwind_Context*, unsigned char const*,
lsda_header_info*)':
(.text._ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info+0x1b):
undefined reference to `_Unwind_GetRegionStart'
./libsupc++.a(eh_personality.o): In function `__cxa_call_unexpected':
(.text.__cxa_call_unexpected+0xe8): undefined reference to `_Unwind_Resume'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0x7a): undefined reference to
`_Unwind_GetLanguageSpecificData'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0xe2): undefined reference to
`_Unwind_GetIPInfo'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0x2e9): undefined reference to `_Unwind_SetGR'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0x2f9): undefined reference to `_Unwind_SetGR'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0x304): undefined reference to `_Unwind_SetIP'
./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':
(.text.__gxx_personality_v0+0x59f): undefined reference to `_Unwind_Resume'
./libsupc++.a(eh_throw.o): In function `__cxa_rethrow':
(.text.__cxa_rethrow+0x35): undefined reference to
`_Unwind_Resume_or_Rethrow'
./libsupc++.a(eh_throw.o): In function `__cxa_throw':
(.text.__cxa_throw+0x4d): undefined reference to `_Unwind_RaiseException'
./libsupc++.a(pure.o): In function `__cxa_pure_virtual':
(.text.__cxa_pure_virtual+0x16): undefined reference to `write'
./libsupc++.a(eh_catch.o): In function `__cxa_end_catch':
(.text.__cxa_end_catch+0x58): undefined reference to
`_Unwind_DeleteException'
./libsupc++.a(eh_catch.o): In function `__cxa_end_catch':
(.text.__cxa_end_catch+0x80): undefined reference to
`_Unwind_DeleteException'
./libsupc++.a(eh_catch.o): In function `__cxa_begin_catch':
(.text.__cxa_begin_catch+0x70): undefined reference to `_Unwind_Resume'
./libsupc++.a(vterminate.o): In function
`__gnu_cxx::__verbose_terminate_handler()':
(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x19b): undefined
reference to `_Unwind_Resume'
collect2: ld returned 1 exit status
make: *** [x86_64/sbin/cxxtest] Error 1


Any ideas on which version of libsupc++ I should use?

Many thanks!

-- 
Zeus Gómez Marmolejo
Barcelona Supercomputing Center
PhD student
http://www.bsc.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20110315/c785c755/attachment-0001.html 


More information about the Barrelfish-users mailing list