Hi,<div><br></div><div>I'm trying the new C++ support in Barrelfish.</div><div><br></div><div>To do so, I just added <b>sbin/cxxtest</b> to the list of MODULES_COMMON in <a href="http://symbolic_targets.mk">symbolic_targets.mk</a>. Now, when it goes to its compilation:</div>
<div><br></div><div><div><b>g++ -g -O2 ./x86_64/lib/crt0.o ./x86_64/lib/crtbegin.o -Wl,-section-start,.<a href="http://data.rel.ro">data.rel.ro</a>=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</b></div>
<div>g++: ./libsupc++.a: No such file or directory</div><div>make: *** [x86_64/sbin/cxxtest] Error 1</div><div><br></div><div>As I realized that stdCxxLibs needs libsupc++.a in the current build directory:</div><div><br></div>
<div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>stdCxxLibs = [ In arch "/lib/libcxx.a",</div><div> Str "./libsupc++.a" ]</div><div> ++ stdLibs ++</div>
<div> [ In arch "/lib/crtend.o" ]</div></div></div><div><br></div><div>and I couldn't find it in the sources, I tried to use the native Linux version of <b>libsupc++.a</b> present in my Linux distribution. But unfortunately it doesn't compile:</div>
<div><br></div><div><div><b>g++ -g -O2 ./x86_64/lib/crt0.o ./x86_64/lib/crtbegin.o -Wl,-section-start,.<a href="http://data.rel.ro">data.rel.ro</a>=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</b> </div>
<div>./libsupc++.a(eh_terminate.o): In function `std::set_terminate(void (*)())':</div><div>(.text._ZSt13set_terminatePFvvE+0x0): multiple definition of `std::set_terminate(void (*)())'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:51: first defined here</div>
<div>./libsupc++.a(eh_terminate.o): In function `std::set_unexpected(void (*)())':</div><div>(.text._ZSt14set_unexpectedPFvvE+0x0): multiple definition of `std::set_unexpected(void (*)())'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:31: first defined here</div>
<div>./libsupc++.a(eh_terminate.o): In function `std::terminate()':</div><div>(.text._ZSt9terminatev+0x0): multiple definition of `std::terminate()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:62: first defined here</div>
<div>./libsupc++.a(eh_terminate.o): In function `std::unexpected()':</div><div>(.text._ZSt10unexpectedv+0x0): multiple definition of `std::unexpected()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:42: first defined here</div>
<div>./libsupc++.a(eh_catch.o): In function `std::uncaught_exception()':</div><div>(.text._ZSt18uncaught_exceptionv+0x0): multiple definition of `std::uncaught_exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:81: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':</div><div>(.text._ZNSt9exceptionD2Ev+0x0): multiple definition of `std::exception::~exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':</div><div>(.text._ZNSt9exceptionD1Ev+0x0): multiple definition of `std::exception::~exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::bad_exception::~bad_exception()':</div><div>(.text._ZNSt13bad_exceptionD2Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::bad_exception::~bad_exception()':</div><div>(.text._ZNSt13bad_exceptionD1Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::exception::what() const':</div><div>(.text._ZNKSt9exception4whatEv+0x0): multiple definition of `std::exception::what() const'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:108: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::bad_exception::what() const':</div><div>(.text._ZNKSt13bad_exception4whatEv+0x0): multiple definition of `std::bad_exception::what() const'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:113: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::exception::~exception()':</div><div>(.text._ZNSt9exceptionD0Ev+0x0): multiple definition of `std::exception::~exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:97: first defined here</div>
<div>./libsupc++.a(eh_exception.o): In function `std::bad_exception::~bad_exception()':</div><div>(.text._ZNSt13bad_exceptionD0Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()'</div><div>./x86_64/lib/libcxx.a(exception.o):/home/zeus/bsc/barrelfish/build/../lib/cxx/src/exception.cpp:101: first defined here</div>
<div>./libsupc++.a(cp-demangle.o): In function `d_print_comp':</div><div>(.text+0x31c9): undefined reference to `__sprintf_chk'</div><div>./libsupc++.a(cp-demangle.o): In function `d_print_comp':</div><div>(.text+0x3e69): undefined reference to `__stack_chk_fail'</div>
<div>./libsupc++.a(cp-demangle.o): In function `d_demangle_callback':</div><div>(.text+0x4217): undefined reference to `__stack_chk_fail'</div><div>./libsupc++.a(guard.o): In function `__cxa_guard_release':</div>
<div>(.text.__cxa_guard_release+0x35): undefined reference to `syscall'</div><div>./libsupc++.a(guard.o): In function `__cxa_guard_abort':</div><div>(.text.__cxa_guard_abort+0x35): undefined reference to `syscall'</div>
<div>./libsupc++.a(guard.o): In function `__cxa_guard_acquire':</div><div>(.text.__cxa_guard_acquire+0x5e): undefined reference to `syscall'</div><div>./libsupc++.a(eh_alloc.o): In function `global constructors keyed to eh_alloc.cc':</div>
<div>(.text._GLOBAL__I_eh_alloc.cc+0x97): undefined reference to `__stack_chk_fail'</div><div>./libsupc++.a(eh_alloc.o): In function `__gnu_cxx::__scoped_lock::~__scoped_lock()':</div><div>(.text._ZN9__gnu_cxx13__scoped_lockD1Ev[__gnu_cxx::__scoped_lock::~__scoped_lock()]+0x59): undefined reference to `_Unwind_Resume'</div>
<div>./libsupc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':</div><div>(.text.__cxa_free_dependent_exception+0xf6): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(eh_alloc.o): In function `__cxa_free_exception':</div>
<div>(.text.__cxa_free_exception+0xf6): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_exception':</div><div>(.text.__cxa_allocate_exception+0x1ed): undefined reference to `_Unwind_Resume'</div>
<div>./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':</div><div>(.text.__cxa_allocate_dependent_exception+0x142): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)':</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x58): undefined reference to `_Unwind_GetRegionStart'</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)':</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x68): undefined reference to `_Unwind_GetTextRelBase'</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)':</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x78): undefined reference to `_Unwind_GetDataRelBase'</div><div>./libsupc++.a(eh_personality.o): In function `parse_lsda_header(_Unwind_Context*, unsigned char const*, lsda_header_info*)':</div>
<div>(.text._ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info+0x1b): undefined reference to `_Unwind_GetRegionStart'</div><div>./libsupc++.a(eh_personality.o): In function `__cxa_call_unexpected':</div>
<div>(.text.__cxa_call_unexpected+0xe8): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div><div>(.text.__gxx_personality_v0+0x7a): undefined reference to `_Unwind_GetLanguageSpecificData'</div>
<div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div><div>(.text.__gxx_personality_v0+0xe2): undefined reference to `_Unwind_GetIPInfo'</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div>
<div>(.text.__gxx_personality_v0+0x2e9): undefined reference to `_Unwind_SetGR'</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div><div>(.text.__gxx_personality_v0+0x2f9): undefined reference to `_Unwind_SetGR'</div>
<div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div><div>(.text.__gxx_personality_v0+0x304): undefined reference to `_Unwind_SetIP'</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0':</div>
<div>(.text.__gxx_personality_v0+0x59f): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(eh_throw.o): In function `__cxa_rethrow':</div><div>(.text.__cxa_rethrow+0x35): undefined reference to `_Unwind_Resume_or_Rethrow'</div>
<div>./libsupc++.a(eh_throw.o): In function `__cxa_throw':</div><div>(.text.__cxa_throw+0x4d): undefined reference to `_Unwind_RaiseException'</div><div>./libsupc++.a(pure.o): In function `__cxa_pure_virtual':</div>
<div>(.text.__cxa_pure_virtual+0x16): undefined reference to `write'</div><div>./libsupc++.a(eh_catch.o): In function `__cxa_end_catch':</div><div>(.text.__cxa_end_catch+0x58): undefined reference to `_Unwind_DeleteException'</div>
<div>./libsupc++.a(eh_catch.o): In function `__cxa_end_catch':</div><div>(.text.__cxa_end_catch+0x80): undefined reference to `_Unwind_DeleteException'</div><div>./libsupc++.a(eh_catch.o): In function `__cxa_begin_catch':</div>
<div>(.text.__cxa_begin_catch+0x70): undefined reference to `_Unwind_Resume'</div><div>./libsupc++.a(vterminate.o): In function `__gnu_cxx::__verbose_terminate_handler()':</div><div>(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x19b): undefined reference to `_Unwind_Resume'</div>
<div>collect2: ld returned 1 exit status</div><div>make: *** [x86_64/sbin/cxxtest] Error 1</div></div><div><br></div><div><div><br></div><div>Any ideas on which version of libsupc++ I should use?</div></div><div><br></div>
<div>Many thanks!</div><br>-- <br>Zeus Gómez Marmolejo<br>Barcelona Supercomputing Center<br>PhD student<br><a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br><br><br>
</div>