client-server-webrtc-example icon indicating copy to clipboard operation
client-server-webrtc-example copied to clipboard

Cross compile for ARM

Open fightforge opened this issue 7 years ago • 0 comments

Hi, i try to cross compile it for a raspberry. I successfully cross compile libwebrtc and boost for arm but when i try to compile i get this error:

root@codebook:~/client-server-webrtc-example/server/out# make -j4 /usr/bin/cmake -H/root/client-server-webrtc-example/server -B/root/client-server-webrtc-example/server/out --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /root/client-server-webrtc-example/server/out/CMakeFiles /root/client-server-webrtc-example/server/out/CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory '/root/client-server-webrtc-example/server/out' make -f CMakeFiles/server_exe.dir/build.make CMakeFiles/server_exe.dir/depend make[2]: Entering directory '/root/client-server-webrtc-example/server/out' cd /root/client-server-webrtc-example/server/out && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/client-server-webrtc-example/server /root/client-server-webrtc-example/server /root/client-server-webrtc-example/server/out /root/client-server-webrtc-example/server/out /root/client-server-webrtc-example/server/out/CMakeFiles/server_exe.dir/DependInfo.cmake --color= make[2]: Leaving directory '/root/client-server-webrtc-example/server/out' make -f CMakeFiles/server_exe.dir/build.make CMakeFiles/server_exe.dir/build make[2]: Entering directory '/root/client-server-webrtc-example/server/out' [ 50%] Building CXX object CMakeFiles/server_exe.dir/src/test.cpp.o /opt/raspy/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -DWEBRTC_POSIX -D_GLIBCXX_USE_CXX11_ABI=0 -I/usr/local/include -I/root/client-server-webrtc-example/server/src -I/opt/raspy/libwebrtc/out/lib -I/opt/raspy/libwebrtc/out/include -I/usr/local/boost/include -I/usr/local/boost/lib -I/usr/local/lib -I/root/client-server-webrtc-example/server/out -Wall -Wextra -Wpedantic -std=gnu++0x -pthread -Wall -o CMakeFiles/server_exe.dir/src/test.cpp.o -c /root/client-server-webrtc-example/server/src/test.cpp /root/client-server-webrtc-example/server/src/test.cpp:17:42: warning: unused parameter 's' [-Wunused-parameter] void OnWebSocketMessage(WebSocketServer* s, websocketpp::connection_hdl hdl, message_ptr msg) { ^ /root/client-server-webrtc-example/server/src/test.cpp:17:73: warning: unused parameter 'hdl' [-Wunused-parameter] void OnWebSocketMessage(WebSocketServer* s, websocketpp::connection_hdl hdl, message_ptr msg) { ^ [100%] Linking CXX executable //root/client-server-webrtc-example/server/out/bin/example-server /usr/bin/cmake -E cmake_link_script CMakeFiles/server_exe.dir/link.txt --verbose=1 /opt/raspy/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wall -Wextra -Wpedantic -std=gnu++0x -pthread -rdynamic CMakeFiles/server_exe.dir/src/test.cpp.o -o //root/client-server-webrtc-example/server/out/bin/example-server -L/usr/local/lib -Wl,-rpath,/usr/local/lib /usr/local/boost/lib/libboost_system.a -lpthread /usr/local/boost/lib/libboost_system.a(error_code.o): In function boost::system::detail::generic_error_category::messageabi:cxx11 const': error_code.cpp:(.text+0x9e): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)' error_code.cpp:(.text+0x110): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()' /usr/local/boost/lib/libboost_system.a(error_code.o): In function boost::system::detail::system_error_category::~system_error_category()': error_code.cpp:(.text._ZN5boost6system6detail21system_error_categoryD2Ev[_ZN5boost6system6detail21system_error_categoryD5Ev]+0x1a): undefined reference to std::_V2::error_category::~error_category()' /usr/local/boost/lib/libboost_system.a(error_code.o): In function boost::system::detail::system_error_category::~system_error_category()': error_code.cpp:(.text._ZN5boost6system6detail21system_error_categoryD0Ev[_ZN5boost6system6detail21system_error_categoryD5Ev]+0x1a): undefined reference to std::_V2::error_category::~error_category()' error_code.cpp:(.text._ZN5boost6system6detail21system_error_categoryD0Ev[_ZN5boost6system6detail21system_error_categoryD5Ev]+0x22): undefined reference to operator delete(void*, unsigned int)' /usr/local/boost/lib/libboost_system.a(error_code.o): In function boost::system::detail::generic_error_category::~generic_error_category()': error_code.cpp:(.text._ZN5boost6system6detail22generic_error_categoryD2Ev[_ZN5boost6system6detail22generic_error_categoryD5Ev]+0x1a): undefined reference to std::_V2::error_category::~error_category()' /usr/local/boost/lib/libboost_system.a(error_code.o): In function boost::system::detail::generic_error_category::~generic_error_category()': error_code.cpp:(.text._ZN5boost6system6detail22generic_error_categoryD0Ev[_ZN5boost6system6detail22generic_error_categoryD5Ev]+0x1a): undefined reference to std::_V2::error_category::~error_category()' error_code.cpp:(.text._ZN5boost6system6detail22generic_error_categoryD0Ev[_ZN5boost6system6detail22generic_error_categoryD5Ev]+0x22): undefined reference to operator delete(void*, unsigned int)' collect2: error: ld returned 1 exit status CMakeFiles/server_exe.dir/build.make:98: recipe for target '//root/client-server-webrtc-example/server/out/bin/example-server' failed make[2]: *** [//root/client-server-webrtc-example/server/out/bin/example-server] Error 1 make[2]: Leaving directory '/root/client-server-webrtc-example/server/out' CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/server_exe.dir/all' failed make[1]: *** [CMakeFiles/server_exe.dir/all] Error 2 make[1]: Leaving directory '/root/client-server-webrtc-example/server/out' Makefile:86: recipe for target 'all' failed make: *** [all] Error 2 `

any suggestion to solve this?

Thanks

fightforge avatar May 11 '18 08:05 fightforge