Closed pauldeee closed 4 months ago
Hi @pauldeee - thanks for reporting this! Could you please provide a bit more information, i.e. 1) which packages you are trying to build and 2) how the build fails?
Hi, @Tobias-Fischer,
I ran into the following with https://github.com/Livox-SDK/Livox-SDK2:
[ 1%] Building CXX object sdk_core/CMakeFiles/livox_lidar_sdk_static.dir/command_handler/command_impl.cpp.o
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp: In static member function 'static livox_status livox::lidar::CommandImpl::SetLivoxLidarDebugPointCloud(uint32_t, bool, LivoxLidarLoggerCallback, void*)':
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:738:33: error: expected ')' before 'SCNu8'
738 | "%" SCNu8 ".%" SCNu8 ".%" SCNu8 ".%" SCNu8, &req_buff.host_ip_addr[0]
| ^~~~~~
| )
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:737:9: note: to match this '('
737 | sscanf(GeneralCommandHandler::GetInstance().GetLidarCfg(handle).host_net_info.host_ip.c_str(),
| ^
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:42:1: note: 'SCNu8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?
41 | #include <iomanip>
+++ |+#include <cinttypes>
42 | #include <chrono>
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:738:31: warning: spurious trailing '%' in format [-Wformat=]
738 | "%" SCNu8 ".%" SCNu8 ".%" SCNu8 ".%" SCNu8, &req_buff.host_ip_addr[0]
| ^
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:738:30: warning: too many arguments for format [-Wformat-extra-args]
738 | "%" SCNu8 ".%" SCNu8 ".%" SCNu8 ".%" SCNu8, &req_buff.host_ip_addr[0]
| ^~~
make[2]: *** [sdk_core/CMakeFiles/livox_lidar_sdk_static.dir/build.make:440: sdk_core/CMakeFiles/livox_lidar_sdk_static.dir/command_handler/command_impl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:223: sdk_core/CMakeFiles/livox_lidar_sdk_static.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Have you tried the suggestion provided by the compiler?
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:42:1: note: 'SCNu8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?
41 | #include <iomanip>
+++ |+#include <cinttypes>
42 | #include <chrono>
Interestingly, when I place it where it suggests it should be placed it fails again, and just suggests to place it following where I have already placed it.
/home/paul/libs/Livox-SDK2/sdk_core/command_handler/command_impl.cpp:43:1: note: 'SCNu8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?
42 | #include <cinttypes>
+++ |+#include <cinttypes>
43 | #include <chrono>
However, if I move it to be the first include in the file it builds successfully.
Great!
Solution to issue cannot be found in the documentation.
Issue
Hi there,
Apologies if this doesn't belong here...
On ubuntu 22.04 I am able to get ROS Noetic working fine. However some of my packages I would like to build require projects/SDKs that are meant to be built on 20.04. I have a fresh install of 22.04 and I've followed the steps listed here: https://robostack.github.io/GettingStarted.html. Roscore, rviz and catkin_make appear to all work as they should.
However when I try to clone a project needed for a package and do the usual:
The project fails to build. When I say
which cmake
it lists the one in the ros_env... Am I missing something? Can I not use robostack in this way?Installed packages
Environment info