-
Notifications
You must be signed in to change notification settings - Fork 326
Description
我在 make 的时候遇到了大量类似如下报错的段错误
`chen@leafy-seadragon:~/Libs/YDLidar-SDK/build$ make
Consolidate compiler generated dependencies of target ydlidar_sdk
[ 1%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/serial/serial.cpp.o
In file included from /home/chen/Libs/YDLidar-SDK/core/serial/common.h:45,
from /home/chen/Libs/YDLidar-SDK/core/serial/serial.cpp:12:
在成员函数‘int ydlidar::core::base::Thread::join(long unsigned int)’中:
段错误
135 | printf("[YDLIDAR DEBUG] Thread [0x%X] ready to cancel[%d]\n", _handle, s);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x7da81bc4251f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7da81bd9d7fd ???
../sysdeps/x86_64/multiarch/strlen-avx2.S:74
0x7da81bc29d8f __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7da81bc29e3f __libc_start_main_impl
../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
参阅 file:///usr/share/doc/gcc-11/README.Bugs 以获取指示。
make[2]: *** [CMakeFiles/ydlidar_sdk.dir/build.make:160:CMakeFiles/ydlidar_sdk.dir/core/serial/serial.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:317:CMakeFiles/ydlidar_sdk.dir/all] 错误 2
make: *** [Makefile:166:all] 错误 2`
我猜测这些问题是由于在64位系统上,比如 unsigned long 占 8 bytes, 而 %X 为 4 bytes 等导致。