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

livox-ros-Driver2在使用./build.sh humble 进行编译时出现rapidjson库相关报错 #109

Open
20082896 opened this issue Jan 29, 2024 · 3 comments

Comments

@20082896
Copy link

VMare上的ubuntu22系统,安装了ros2 humble
具体报错如下:



Working Path: /home/jm/rm_ws/src/livox_ros_driver2
ROS version is: ROS2
Starting >>> livox_ros_driver2
Starting >>> livox_sdk2
[Processing: livox_ros_driver2, livox_sdk2]
--- stderr: livox_ros_driver2
** WARNING ** io features related to pcap will be disabled

Finished <<< livox_ros_driver2 [48.8s]
--- stderr: livox_sdk2
CMake Warning:
Manually-specified variables were not used by the project:

HUMBLE_ROS
ROS_EDITION

In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/hap_command_handler.cpp:37:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/hap_command_handler.cpp:37:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/mid360_command_handler.cpp:37:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/mid360_command_handler.cpp:37:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.cpp:2:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
In file included from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/stream.h:19,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/memorystream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/encodedstream.h:22,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/document.h:26,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.h:38,
from /home/jm/rm_ws/src/Livox-SDK2/sdk_core/command_handler/parse_lidar_state_info.cpp:2:
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:542:29: note: did you mean ‘-Warray-bounds’?
542 | #define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
| ^~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:543:34: note: in expansion of macro ‘RAPIDJSON_PRAGMA’
543 | #define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
| ^~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/rapidjson.h:545:3: note: in expansion of macro ‘RAPIDJSON_DIAG_PRAGMA’
545 | RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W, x)))
| ^~~~~~~~~~~~~~~~~~~~~
/home/jm/rm_ws/src/Livox-SDK2/sdk_core/../3rdparty/rapidjson/internal/dtoa.h:36:1: note: in expansion of macro ‘RAPIDJSON_DIAG_OFF’
36 | RAPIDJSON_DIAG_OFF(array - bounds) // some gcc versions generate wrong warnings
| ^~~~~~~~~~~~~~~~~~

Finished <<< livox_sdk2 [1min 5s]

Summary: 2 packages finished [1min 6s]
2 packages had stderr output: livox_ros_driver2 livox_sdk2

请帮我解决

@zyw722
Copy link

zyw722 commented Mar 4, 2024

你好,请问你解决了没有?

@20082896
Copy link
Author

20082896 commented Mar 4, 2024 via email

@20082896
Copy link
Author

20082896 commented Mar 4, 2024 via email

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