Hi,<div><br></div><div>I&#39;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 &quot;/lib/libcxx.a&quot;,</div><div>               Str &quot;./libsupc++.a&quot; ]</div><div>             ++ stdLibs ++</div>
<div>             [  In arch &quot;/lib/crtend.o&quot; ]</div></div></div><div><br></div><div>and I couldn&#39;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&#39;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 (*)())&#39;:</div><div>(.text._ZSt13set_terminatePFvvE+0x0): multiple definition of `std::set_terminate(void (*)())&#39;</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 (*)())&#39;:</div><div>(.text._ZSt14set_unexpectedPFvvE+0x0): multiple definition of `std::set_unexpected(void (*)())&#39;</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()&#39;:</div><div>(.text._ZSt9terminatev+0x0): multiple definition of `std::terminate()&#39;</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()&#39;:</div><div>(.text._ZSt10unexpectedv+0x0): multiple definition of `std::unexpected()&#39;</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()&#39;:</div><div>(.text._ZSt18uncaught_exceptionv+0x0): multiple definition of `std::uncaught_exception()&#39;</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()&#39;:</div><div>(.text._ZNSt9exceptionD2Ev+0x0): multiple definition of `std::exception::~exception()&#39;</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()&#39;:</div><div>(.text._ZNSt9exceptionD1Ev+0x0): multiple definition of `std::exception::~exception()&#39;</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()&#39;:</div><div>(.text._ZNSt13bad_exceptionD2Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()&#39;</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()&#39;:</div><div>(.text._ZNSt13bad_exceptionD1Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()&#39;</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&#39;:</div><div>(.text._ZNKSt9exception4whatEv+0x0): multiple definition of `std::exception::what() const&#39;</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&#39;:</div><div>(.text._ZNKSt13bad_exception4whatEv+0x0): multiple definition of `std::bad_exception::what() const&#39;</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()&#39;:</div><div>(.text._ZNSt9exceptionD0Ev+0x0): multiple definition of `std::exception::~exception()&#39;</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()&#39;:</div><div>(.text._ZNSt13bad_exceptionD0Ev+0x0): multiple definition of `std::bad_exception::~bad_exception()&#39;</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&#39;:</div><div>(.text+0x31c9): undefined reference to `__sprintf_chk&#39;</div><div>./libsupc++.a(cp-demangle.o): In function `d_print_comp&#39;:</div><div>(.text+0x3e69): undefined reference to `__stack_chk_fail&#39;</div>
<div>./libsupc++.a(cp-demangle.o): In function `d_demangle_callback&#39;:</div><div>(.text+0x4217): undefined reference to `__stack_chk_fail&#39;</div><div>./libsupc++.a(guard.o): In function `__cxa_guard_release&#39;:</div>
<div>(.text.__cxa_guard_release+0x35): undefined reference to `syscall&#39;</div><div>./libsupc++.a(guard.o): In function `__cxa_guard_abort&#39;:</div><div>(.text.__cxa_guard_abort+0x35): undefined reference to `syscall&#39;</div>
<div>./libsupc++.a(guard.o): In function `__cxa_guard_acquire&#39;:</div><div>(.text.__cxa_guard_acquire+0x5e): undefined reference to `syscall&#39;</div><div>./libsupc++.a(eh_alloc.o): In function `global constructors keyed to eh_alloc.cc&#39;:</div>
<div>(.text._GLOBAL__I_eh_alloc.cc+0x97): undefined reference to `__stack_chk_fail&#39;</div><div>./libsupc++.a(eh_alloc.o): In function `__gnu_cxx::__scoped_lock::~__scoped_lock()&#39;:</div><div>(.text._ZN9__gnu_cxx13__scoped_lockD1Ev[__gnu_cxx::__scoped_lock::~__scoped_lock()]+0x59): undefined reference to `_Unwind_Resume&#39;</div>
<div>./libsupc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception&#39;:</div><div>(.text.__cxa_free_dependent_exception+0xf6): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(eh_alloc.o): In function `__cxa_free_exception&#39;:</div>
<div>(.text.__cxa_free_exception+0xf6): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_exception&#39;:</div><div>(.text.__cxa_allocate_exception+0x1ed): undefined reference to `_Unwind_Resume&#39;</div>
<div>./libsupc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception&#39;:</div><div>(.text.__cxa_allocate_dependent_exception+0x142): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)&#39;:</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x58): undefined reference to `_Unwind_GetRegionStart&#39;</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)&#39;:</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x68): undefined reference to `_Unwind_GetTextRelBase&#39;</div><div>./libsupc++.a(eh_personality.o): In function `base_of_encoded_value(unsigned char, _Unwind_Context*)&#39;:</div>
<div>(.text._ZL21base_of_encoded_valuehP15_Unwind_Context+0x78): undefined reference to `_Unwind_GetDataRelBase&#39;</div><div>./libsupc++.a(eh_personality.o): In function `parse_lsda_header(_Unwind_Context*, unsigned char const*, lsda_header_info*)&#39;:</div>
<div>(.text._ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info+0x1b): undefined reference to `_Unwind_GetRegionStart&#39;</div><div>./libsupc++.a(eh_personality.o): In function `__cxa_call_unexpected&#39;:</div>
<div>(.text.__cxa_call_unexpected+0xe8): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div><div>(.text.__gxx_personality_v0+0x7a): undefined reference to `_Unwind_GetLanguageSpecificData&#39;</div>
<div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div><div>(.text.__gxx_personality_v0+0xe2): undefined reference to `_Unwind_GetIPInfo&#39;</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div>
<div>(.text.__gxx_personality_v0+0x2e9): undefined reference to `_Unwind_SetGR&#39;</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div><div>(.text.__gxx_personality_v0+0x2f9): undefined reference to `_Unwind_SetGR&#39;</div>
<div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div><div>(.text.__gxx_personality_v0+0x304): undefined reference to `_Unwind_SetIP&#39;</div><div>./libsupc++.a(eh_personality.o): In function `__gxx_personality_v0&#39;:</div>
<div>(.text.__gxx_personality_v0+0x59f): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(eh_throw.o): In function `__cxa_rethrow&#39;:</div><div>(.text.__cxa_rethrow+0x35): undefined reference to `_Unwind_Resume_or_Rethrow&#39;</div>
<div>./libsupc++.a(eh_throw.o): In function `__cxa_throw&#39;:</div><div>(.text.__cxa_throw+0x4d): undefined reference to `_Unwind_RaiseException&#39;</div><div>./libsupc++.a(pure.o): In function `__cxa_pure_virtual&#39;:</div>
<div>(.text.__cxa_pure_virtual+0x16): undefined reference to `write&#39;</div><div>./libsupc++.a(eh_catch.o): In function `__cxa_end_catch&#39;:</div><div>(.text.__cxa_end_catch+0x58): undefined reference to `_Unwind_DeleteException&#39;</div>
<div>./libsupc++.a(eh_catch.o): In function `__cxa_end_catch&#39;:</div><div>(.text.__cxa_end_catch+0x80): undefined reference to `_Unwind_DeleteException&#39;</div><div>./libsupc++.a(eh_catch.o): In function `__cxa_begin_catch&#39;:</div>
<div>(.text.__cxa_begin_catch+0x70): undefined reference to `_Unwind_Resume&#39;</div><div>./libsupc++.a(vterminate.o): In function `__gnu_cxx::__verbose_terminate_handler()&#39;:</div><div>(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x19b): undefined reference to `_Unwind_Resume&#39;</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>