Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: undefined reference to `__gxx_personality_v0' #6

Closed
mariuszs opened this issue May 14, 2014 · 6 comments
Closed

Comments

@mariuszs
Copy link
Contributor

Full log:

clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-redhat-linux/4.8.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2
"/usr/bin/clang" -cc1 -triple x86_64-redhat-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name k290_fnkeyctl.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.23.2 -v -resource-dir /usr/bin/../lib/clang/3.4 -I /usr/include -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/x86_64-redhat-linux -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/backward -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/x86_64-redhat-linux/c++/4.8.2 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-externc-isystem /usr/include -internal-externc-isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/mariuszs/git/k290-fnkeyctl -ferror-limit 19 -fmessage-length 211 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/k290_fnkeyctl-6a295e.o -x c++ k290_fnkeyctl.cpp
clang -cc1 version 3.4 based upon LLVM 3.4 default target x86_64-redhat-linux-gnu
ignoring nonexistent directory "/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/x86_64-redhat-linux/c++/4.8.2"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/x86_64-redhat-linux
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/backward
/usr/local/include
/usr/bin/../lib/clang/3.4/include
/usr/include
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include
End of search list.
"/usr/bin/ld" --hash-style=gnu --no-add-needed --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o k290_fnkeyctl /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/crtbegin.o -L/usr/lib -L/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2 -L/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../.. -L/lib -L/usr/lib -lusb-1.0 -lstdc++ /tmp/k290_fnkeyctl-6a295e.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/crtend.o /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crtn.o
/tmp/k290_fnkeyctl-6a295e.o: In function `getK290Device(std::shared_ptr<libusb_context>&)':
k290_fnkeyctl.cpp:(.text+0x7f): undefined reference to `std::placeholders::_1'
k290_fnkeyctl.cpp:(.text+0x1ce): undefined reference to `std::cerr'
k290_fnkeyctl.cpp:(.text+0x1dc): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x20f): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x220): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
k290_fnkeyctl.cpp:(.text+0x22e): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/k290_fnkeyctl-6a295e.o: In function `main':
k290_fnkeyctl.cpp:(.text+0x2e2): undefined reference to `std::cerr'
k290_fnkeyctl.cpp:(.text+0x2ef): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x307): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x30f): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
k290_fnkeyctl.cpp:(.text+0x317): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
k290_fnkeyctl.cpp:(.text+0x379): undefined reference to `std::cerr'
k290_fnkeyctl.cpp:(.text+0x387): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x395): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
k290_fnkeyctl.cpp:(.text+0x3a0): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
k290_fnkeyctl.cpp:(.text+0x4f8): undefined reference to `std::cout'
k290_fnkeyctl.cpp:(.text+0x506): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x55a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x579): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x58a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
k290_fnkeyctl.cpp:(.text+0x598): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
k290_fnkeyctl.cpp:(.text+0x5bc): undefined reference to `std::cerr'
k290_fnkeyctl.cpp:(.text+0x5ca): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x5fd): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
k290_fnkeyctl.cpp:(.text+0x60e): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
k290_fnkeyctl.cpp:(.text+0x61c): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/k290_fnkeyctl-6a295e.o: In function `__cxx_global_var_init':
k290_fnkeyctl.cpp:(.text.startup+0x11): undefined reference to `std::ios_base::Init::Init()'
k290_fnkeyctl.cpp:(.text.startup+0x19): undefined reference to `std::ios_base::Init::~Init()'
/tmp/k290_fnkeyctl-6a295e.o: In function `__clang_call_terminate':
k290_fnkeyctl.cpp:(.text.__clang_call_terminate[__clang_call_terminate]+0x9): undefined reference to `__cxa_begin_catch'
k290_fnkeyctl.cpp:(.text.__clang_call_terminate[__clang_call_terminate]+0x12): undefined reference to `std::terminate()'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libusb_context*, void (*)(libusb_context*), std::allocator<int> >(libusb_context*, void (*)(libusb_context*), std::allocator<int>)':
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_]+0xb7): undefined reference to `__cxa_begin_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_]+0x10f): undefined reference to `__cxa_end_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP14libusb_contextPFvS5_ESaIiEEET_T0_T1_]+0x119): undefined reference to `__cxa_rethrow'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_context*, void (*)(libusb_context*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_deleter<libusb_context*, void (*)(libusb_context*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2>*, unsigned long)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE10deallocateEPS8_m[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE10deallocateEPS8_m]+0x1c): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::_Sp_counted_deleter<libusb_context*, void (*)(libusb_context*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2>::~_Sp_counted_deleter()':
k290_fnkeyctl.cpp:(.text._ZNSt19_Sp_counted_deleterIP14libusb_contextPFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev[_ZNSt19_Sp_counted_deleterIP14libusb_contextPFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev]+0x1e): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()':
k290_fnkeyctl.cpp:(.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev[_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev]+0x1e): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_context*, void (*)(libusb_context*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned long, void const*)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x33): undefined reference to `std::__throw_bad_alloc()'
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP14libusb_contextPFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x43): undefined reference to `operator new(unsigned long)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int> >(libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int>)':
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_]+0xb7): undefined reference to `__cxa_begin_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_]+0x10f): undefined reference to `__cxa_end_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IP20libusb_device_handlePFvS5_ESaIiEEET_T0_T1_]+0x119): undefined reference to `__cxa_rethrow'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_deleter<libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2>*, unsigned long)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE10deallocateEPS8_m[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE10deallocateEPS8_m]+0x1c): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::_Sp_counted_deleter<libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2>::~_Sp_counted_deleter()':
k290_fnkeyctl.cpp:(.text._ZNSt19_Sp_counted_deleterIP20libusb_device_handlePFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev[_ZNSt19_Sp_counted_deleterIP20libusb_device_handlePFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev]+0x1e): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_device_handle*, void (*)(libusb_device_handle*), std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned long, void const*)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x33): undefined reference to `std::__throw_bad_alloc()'
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIP20libusb_device_handlePFvS3_ESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x43): undefined reference to `operator new(unsigned long)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int> >(libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int>)':
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_]+0xba): undefined reference to `__cxa_begin_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_]+0x10a): undefined reference to `__cxa_end_catch'
k290_fnkeyctl.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPP13libusb_deviceSt5_BindIFPFvS6_iESt12_PlaceholderILi1EEiEESaIiEEET_T0_T1_]+0x114): undefined reference to `__cxa_rethrow'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_deleter<libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int>, (__gnu_cxx::_Lock_policy)2>*, unsigned long)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE10deallocateEPSE_m[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE10deallocateEPSE_m]+0x1c): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `std::_Sp_counted_deleter<libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int>, (__gnu_cxx::_Lock_policy)2>::~_Sp_counted_deleter()':
k290_fnkeyctl.cpp:(.text._ZNSt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS2_iESt12_PlaceholderILi1EEiEESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev[_ZNSt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS2_iESt12_PlaceholderILi1EEiEESaIiELN9__gnu_cxx12_Lock_policyE2EED0Ev]+0x1e): undefined reference to `operator delete(void*)'
/tmp/k290_fnkeyctl-6a295e.o: In function `__gnu_cxx::new_allocator<std::_Sp_counted_deleter<libusb_device**, std::_Bind<void (*(std::_Placeholder<1>, int))(libusb_device**, int)>, std::allocator<int>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned long, void const*)':
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x33): undefined reference to `std::__throw_bad_alloc()'
k290_fnkeyctl.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS4_iESt12_PlaceholderILi1EEiEESaIiELNS_12_Lock_policyE2EEE8allocateEmPKv]+0x40): undefined reference to `operator new(unsigned long)'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE[_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE[_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt19_Sp_counted_deleterIP14libusb_contextPFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EE[_ZTISt19_Sp_counted_deleterIP14libusb_contextPFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTIFvP14libusb_contextE[_ZTIFvP14libusb_contextE]+0x0): undefined reference to `vtable for __cxxabiv1::__function_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTIPFvP14libusb_contextE[_ZTIPFvP14libusb_contextE]+0x0): undefined reference to `vtable for __cxxabiv1::__pointer_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTVSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE[_ZTVSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE]+0x20): undefined reference to `__cxa_pure_virtual'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTVSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE[_ZTVSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE]+0x30): undefined reference to `__cxa_pure_virtual'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt19_Sp_counted_deleterIP20libusb_device_handlePFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EE[_ZTISt19_Sp_counted_deleterIP20libusb_device_handlePFvS1_ESaIiELN9__gnu_cxx12_Lock_policyE2EE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTIFvP20libusb_device_handleE[_ZTIFvP20libusb_device_handleE]+0x0): undefined reference to `vtable for __cxxabiv1::__function_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTIPFvP20libusb_device_handleE[_ZTIPFvP20libusb_device_handleE]+0x0): undefined reference to `vtable for __cxxabiv1::__pointer_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS2_iESt12_PlaceholderILi1EEiEESaIiELN9__gnu_cxx12_Lock_policyE2EE[_ZTISt19_Sp_counted_deleterIPP13libusb_deviceSt5_BindIFPFvS2_iESt12_PlaceholderILi1EEiEESaIiELN9__gnu_cxx12_Lock_policyE2EE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt22_Weak_result_type_implIPFvPP13libusb_deviceiEE[_ZTISt22_Weak_result_type_implIPFvPP13libusb_deviceiEE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt17_Weak_result_typeIPFvPP13libusb_deviceiEE[_ZTISt17_Weak_result_typeIPFvPP13libusb_deviceiEE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.rodata._ZTISt5_BindIFPFvPP13libusb_deviceiESt12_PlaceholderILi1EEiEE[_ZTISt5_BindIFPFvPP13libusb_deviceiESt12_PlaceholderILi1EEiEE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/k290_fnkeyctl-6a295e.o:(.eh_frame+0x47): undefined reference to `__gxx_personality_v0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@milgner
Copy link
Owner

milgner commented May 14, 2014

Looks like the linker can't find or doesn't use either libstdc++ or libusb. Are you using the included build.sh?

@mariuszs
Copy link
Contributor Author

Yes, this is from build.sh. I have added -v flag, now removed (clean origin/master) without changes.

@mariuszs
Copy link
Contributor Author

Thanks you again, I fixed this with http://stackoverflow.com/questions/6045809/problem-with-g-and-undefined-reference-to-gxx-personality-v0

Make sure -lstdc++ is at the end of the command.

@milgner
Copy link
Owner

milgner commented May 14, 2014

Thanks for the heads up, I'll change it accordingly! Really annoying what kind of different behaviour different compiler versions have... ^^

@mariuszs
Copy link
Contributor Author

Works like a charm, thanks!

@milgner
Copy link
Owner

milgner commented May 14, 2014

Build script adapted in 7707307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants