ublox icon indicating copy to clipboard operation
ublox copied to clipboard

Problem building on raspberry pi 4

Open Chrismmint opened this issue 4 years ago • 4 comments

I get the following error when building on a pi4 with ROS melodic -

[ 98%] Linking CXX executable /home/pi/catkin_ws/devel/lib/ublox_gps/ublox_gps /usr/bin/ld: CMakeFiles/ublox_gps_node.dir/src/node.cpp.o: in function ublox_node::UbloxNode::configureUblox()': node.cpp:(.text+0x8aac): undefined reference to ublox_node::UbloxNode::kResetWait' /usr/bin/ld: /home/pi/catkin_ws/devel/lib/libublox_gps.so: undefined reference to `ublox_gps::Gps::kSetBaudrateSleepMs' collect2: error: ld returned 1 exit status make[2]: *** [ublox/ublox_gps/CMakeFiles/ublox_gps_node.dir/build.make:160: /home/pi/catkin_ws/devel/lib/ublox_gps/ublox_gps] Error 1 make[1]: *** [CMakeFiles/Makefile2:4785: ublox/ublox_gps/CMakeFiles/ublox_gps_node.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed

Any ideas?

Also, I only have a neo-6m at the moment. Is there a previous version of this that would be recommended?

Chrismmint avatar May 03 '20 20:05 Chrismmint

Might be a resource issue? Can you try with: catkin build -p1 -j1 This will only compile one executable at a time possibly preventing memory issues

Timple avatar May 08 '20 10:05 Timple

@Chrismmint I think that issue happens when using an old compiler. What version of gcc are you using? (You can check with gcc -v)

kartikmohta avatar May 20 '20 02:05 kartikmohta

in "ublox_gps" folder, change the cmakelist.txt file line 27 (may be) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread") to SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")

MLEEKIMM avatar May 21 '20 06:05 MLEEKIMM

@MLEEKIMM Thanks, that helped me!

bjajoh avatar Nov 10 '20 15:11 bjajoh