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

Error compiling astra_camera feature package for riscv64 architecture host #10

Open
chenzhaoqiJM opened this issue Dec 20, 2024 · 2 comments

Comments

@chenzhaoqiJM
Copy link

Error message:
/home/zq-pi9/wheeltec_ws/src/ros2_astra_camera/astra_camera/include/openni2/OniPlatform.h:68:26: note: in expansion of macro ‘ONI_C_API_IMPORT’
68 | # define ONI_C_API ONI_C_API_IMPORT
| ^~~~~~~~~~~~~~~~
/home/zq-pi9/wheeltec_ws/src/ros2_astra_camera/astra_camera/include/openni2/OniCAPI.h:68:1: note: in expansion of macro ‘ONI_C_API’
68 | ONI_C_API const OniSensorInfo* oniDeviceGetSensorInfo(OniDeviceHandle device, OniSensorType sensorType);
| ^~~~~~~~~
/home/zq-pi9/wheeltec_ws/src/ros2_astra_camera/astra_camera/include/openni2/OniPlatform.h:56:39: error: ‘ONI_API_IMPORT’ does not name a type; did you mean ‘ONI_C_API_IMPORT’?
56 | # define ONI_C_API_IMPORT ONI_C ONI_API_IMPORT

I observed some architecture-specific dynamic link libraries in openni2_redist folder, how do I adapt them for riscv64?

@Oyefusi-Samuel
Copy link

RBEC Machine : x86_64

-- ORRBEC Machine Bits : 64

-- ORRBEC : x64
-- Found ament_lint_auto: 0.9.8 (/opt/ros/foxy/share/ament_lint_auto/cmake)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sko/ros2_ws/build/astra_camera
Scanning dependencies of target astra_camera
[ 5%] Building CXX object CMakeFiles/astra_camera.dir/src/point_cloud_proc/point_cloud_xyz.cpp.o
[ 10%] Building CXX object CMakeFiles/astra_camera.dir/src/point_cloud_proc/point_cloud_xyzrgb.cpp.o
[Processing: astra_camera]
[ 15%] Building CXX object CMakeFiles/astra_camera.dir/src/ob_context.cpp.o
[ 21%] Building CXX object CMakeFiles/astra_camera.dir/src/dynamic_params.cpp.o
[ 26%] Building CXX object CMakeFiles/astra_camera.dir/src/ob_camera_info.cpp.o
/home/sko/ros2_ws/src/ros2_astra_camera/astra_camera/src/ob_camera_info.cpp:14:10: fatal error: nlohmann/json.hpp: No such file or directory
14 | #include <nlohmann/json.hpp>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/astra_camera.dir/build.make:115: CMakeFiles/astra_camera.dir/src/ob_camera_info.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[Processing: astra_camera]
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/astra_camera.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
--- stderr: astra_camera
/home/sko/ros2_ws/src/ros2_astra_camera/astra_camera/src/ob_camera_info.cpp:14:10: fatal error: nlohmann/json.hpp: No such file or directory
14 | #include <nlohmann/json.hpp>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/astra_camera.dir/build.make:115: CMakeFiles/astra_camera.dir/src/ob_camera_info.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/astra_camera.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed <<< astra_camera [1min 7s, exited with code 2]

Summary: 1 package finished [1min 41s]
1 package failed: astra_camera
1 package had stderr output: astra_camera
sko@ubuntu:~/ros2_ws$

@Oyefusi-Samuel
Copy link

This should fix the error, its a dependency error
sudo apt install nlohmann-json3-dev

image

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