0
$\begingroup$

Rosanswers logo

From https://github.com/PR2/linux_networking/blob/master/wpa_supplicant_node/CMakeLists.txt as the CMakeLists used to compile this program. Was wondering if anyone has experience with these sorts of errors. I understand the undefined reference is a missing link between a library.. my major concern would be: how to convert this https://github.com/PR2/linux_networking/blob/master/wpa_supplicant_node/CMakeLists.txt to the Hydro one presented prior. Any suggestions/advice would be appreciated.

/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 10 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 10 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 19 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference to main' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function RosApi::init2()': wpa_supplicant_node.cpp:(.text._ZN6RosApi5init2Ev[RosApi::init2()]+0x119): undefined reference to eloop_register_read_sock' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function RosApi::uninit()': wpa_supplicant_node.cpp:(.text._ZN6RosApi6uninitEv[RosApi::uninit()]+0x29c): undefined reference to eloop_unregister_read_sock' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::ros_interface(ros::NodeHandle const&, wpa_supplicant*)': wpa_supplicant_node.cpp:(.text._ZN13ros_interfaceC2ERKN3ros10NodeHandleEP14wpa_supplicant[_ZN13ros_interfaceC5ERKN3ros10NodeHandleEP14wpa_supplicant]+0xc52): undefined reference to eloop_register_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::setCountryCode(char const*)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface14setCountryCodeEPKc[ros_interface::setCountryCode(char const*)]+0x1b8): undefined reference to eloop_register_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::scanCompleted(wpa_scan_results*)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface13scanCompletedEP16wpa_scan_results[ros_interface::scanCompleted(wpa_scan_results*)]+0x142): undefined reference to eloop_cancel_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::assocFailed(unsigned char const*, char const*)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface11assocFailedEPKhPKc[ros_interface::assocFailed(unsigned char const*, char const*)]+0x148): undefined reference to eloop_cancel_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::assocSucceeded()': wpa_supplicant_node.cpp:(.text._ZN13ros_interface14assocSucceededEv[ros_interface::assocSucceeded()]+0x162): undefined reference to eloop_cancel_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::publishNetworkList()': wpa_supplicant_node.cpp:(.text._ZN13ros_interface18publishNetworkListEv[ros_interface::publishNetworkList()]+0x7a): undefined reference to wpa_config_get_all' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::setDriverCountry()': wpa_supplicant_node.cpp:(.text._ZN13ros_interface16setDriverCountryEv[ros_interface::setDriverCountry()]+0x1c7): undefined reference to eloop_register_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::delayedPublishFrequencyList(void*, void*)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface27delayedPublishFrequencyListEPvS0_[ros_interface::delayedPublishFrequencyList(void*, void*)]+0x48): undefined reference to eloop_register_timeout' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::stopActiveAssociation()': wpa_supplicant_node.cpp:(.text._ZN13ros_interface21stopActiveAssociationEv[ros_interface::stopActiveAssociation()]+0x21c): undefined reference to wpa_supplicant_disassociate' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::startActiveAssociation(actionlib::ServerGoalHandle<wpa_supplicant_node::AssociateAction_<std::allocator<void> > >&)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface22startActiveAssociationERN9actionlib16ServerGoalHandleIN19wpa_supplicant_node16AssociateAction_ISaIvEEEEE[ros_interface::startActiveAssociation(actionlib::ServerGoalHandle<wpa_supplicant_node::AssociateAction_<std::allocator<void> > >&)]+0x2fd): undefined reference to wpa_bss_get' wpa_supplicant_node.cpp:(.text.ZN13ros_interface22startActiveAssociationERN9actionlib16ServerGoalHandleIN19wpa_supplicant_node16AssociateAction_ISaIvEEEEE[ros_interface::startActiveAssociation(actionlib::ServerGoalHandle<wpa_supplicant_node::AssociateActionstd::allocator<void > >&)]+0x4ab): undefined reference to eloop_register_timeout' wpa_supplicant_node.cpp:(.text._ZN13ros_interface22startActiveAssociationERN9actionlib16ServerGoalHandleIN19wpa_supplicant_node16AssociateAction_ISaIvEEEEE[ros_interface::startActiveAssociation(actionlib::ServerGoalHandle<wpa_supplicant_node::AssociateAction_<std::allocator<void> > >&)]+0x4ce): undefined reference to wpa_supplicant_associate' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::fillRosBss(wpa_supplicant_node::Bss_<std::allocator<void> >&, wpa_bss&)': wpa_supplicant_node.cpp:(.text._ZN13ros_interface10fillRosBssERN19wpa_supplicant_node4Bss_ISaIvEEER7wpa_bss[ros_interface::fillRosBss(wpa_supplicant_node::Bss_<std::allocator<void> >&, wpa_bss&)]+0x137): undefined reference to wpa_bss_get_vendor_ie' wpa_supplicant_node.cpp:(.text.ZN13ros_interface10fillRosBssERN19wpa_supplicant_node4Bss_ISaIvEEER7wpa_bss[ros_interface::fillRosBss(wpa_supplicant_node::Bssstd::allocator<void >&, wpa_bss&)]+0x169): undefined reference to wpa_parse_wpa_ie' wpa_supplicant_node.cpp:(.text._ZN13ros_interface10fillRosBssERN19wpa_supplicant_node4Bss_ISaIvEEER7wpa_bss[ros_interface::fillRosBss(wpa_supplicant_node::Bss_<std::allocator<void> >&, wpa_bss&)]+0x1ab): undefined reference to wpa_bss_get_ie' wpa_supplicant_node.cpp:(.text.ZN13ros_interface10fillRosBssERN19wpa_supplicant_node4Bss_ISaIvEEER7wpa_bss[ros_interface::fillRosBss(wpa_supplicant_node::Bssstd::allocator<void >&, wpa_bss&)]+0x1dd): undefined reference to wpa_parse_wpa_ie' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::fillRosResp(wpa_supplicant_node::ScanResult_std::allocator<void >&, wpa_scan_results&)': wpa_supplicant_node.cpp:(.text.ZN13ros_interface11fillRosRespERN19wpa_supplicant_node11ScanResult_ISaIvEEER16wpa_scan_results[ros_interface::fillRosResp(wpa_supplicant_node::ScanResultstd::allocator<void >&, wpa_scan_results&)]+0x9e): undefined reference to wpa_scan_get_ie' wpa_supplicant_node.cpp:(.text._ZN13ros_interface11fillRosRespERN19wpa_supplicant_node11ScanResult_ISaIvEEER16wpa_scan_results[ros_interface::fillRosResp(wpa_supplicant_node::ScanResult_<std::allocator<void> >&, wpa_scan_results&)]+0x28c): undefined reference to wpa_scan_get_vendor_ie' wpa_supplicant_node.cpp:(.text.ZN13ros_interface11fillRosRespERN19wpa_supplicant_node11ScanResult_ISaIvEEER16wpa_scan_results[ros_interface::fillRosResp(wpa_supplicant_node::ScanResultstd::allocator<void >&, wpa_scan_results&)]+0x2cd): undefined reference to wpa_parse_wpa_ie' wpa_supplicant_node.cpp:(.text._ZN13ros_interface11fillRosRespERN19wpa_supplicant_node11ScanResult_ISaIvEEER16wpa_scan_results[ros_interface::fillRosResp(wpa_supplicant_node::ScanResult_<std::allocator<void> >&, wpa_scan_results&)]+0x31e): undefined reference to wpa_scan_get_ie' wpa_supplicant_node.cpp:(.text.ZN13ros_interface11fillRosRespERN19wpa_supplicant_node11ScanResult_ISaIvEEER16wpa_scan_results[ros_interface::fillRosResp(wpa_supplicant_node::ScanResultstd::allocator<void >&, wpa_scan_results&)]+0x35f): undefined reference to wpa_parse_wpa_ie' CMakeFiles/wpa_supplicant_node.dir/src/nodes/wpa_supplicant_node.cpp.o: In function ros_interface::lockedScanTryActivate()': wpa_supplicant_node.cpp:(.text._ZN13ros_interface21lockedScanTryActivateEv[ros_interface::lockedScanTryActivate()]+0x4fe): undefined reference to eloop_register_timeout' wpa_supplicant_node.cpp:(.text._ZN13ros_interface21lockedScanTryActivateEv[ros_interface::lockedScanTryActivate()]+0x51a): undefined reference to wpa_supplicant_trigger_scan' collect2: ld returned 1 exit status make[2]: *** [/home/marco/pr2_hydro_packages/devel/lib/wpa_supplicant_node/wpa_supplicant_node] Error 1 make[1]: *** [linux_networking/wpa_supplicant_node/CMakeFiles/wpa_supplicant_node.dir/all] Error 2 make: *** [all] Error 2 Invoking "make" failed


Originally posted by DevonW on ROS Answers with karma: 644 on 2014-10-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You need to call pkg_check_modules(WPA_SUPPLICANT REQUIRED libwpa_supplicant) in order to set up the cmake variables for the wpa_supplicant include directories and libraries.


Originally posted by ahendrix with karma: 47576 on 2014-10-02

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by DevonW on 2014-10-02:
Hm, I did that and it didn't work out. checking for module 'libwpa_supplicant' -- package 'libwpa_supplicant' not found.

Comment by ahendrix on 2014-10-02:
The old package was buiding wpa_supplicant from source. You'll need to replicate that in cmake: https://github.com/PR2/linux_networking/blob/master/wpa_supplicant_node/Makefile

Comment by ahendrix on 2014-10-02:
Or just ditch the whole package. It isn't used anywhere on the PR2.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.