关于最新的3.4 Nvidia Jetson NX编译报错
已完成1. 在Nvidia Jetson NX上编译, 样例代码
add_subdirectory(samples/sample_c++/platform/linux/manifold2)
add_subdirectory(samples/sample_c++/platform/linux/nvidia_jeston)
➜ build git:(release/v3.4) ✗ cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - donedji_sdk_demo_on_jeston_cxx...
-- Found OpenCV installed in the system, will use it to display image in AdvancedSensing APIs
-- - Includes: /usr/include/opencv4
-- - Libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- Found FFMPEG installed in the system
-- - Includes: /usr/include/aarch64-linux-gnu
-- - Libraries: /usr/lib/aarch64-linux-gnu/libavcodec.so;/usr/lib/aarch64-linux-gnu/libavformat.so;/usr/lib/aarch64-linux-gnu/libavutil.so;/usr/lib/aarch64-linux-gnu/libswscale.so;/usr/lib/aarch64-linux-gnu/libtheora.so;/usr/lib/aarch64-linux-gnu/libz.so
-- - Version: 3.4.8-0ubuntu0.2
-- Cannot Find OPUS
-- Found LIBUSB installed in the system
-- - Includes: /usr/include/libusb-1.0
-- - Libraries: /usr/lib/aarch64-linux-gnu/libusb-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/up2/Desktop/Payload-SDK-github/build
➜ build git:(release/v3.4) ✗ make -j4
Scanning dependencies of target entry
Scanning dependencies of target dji_sdk_demo_on_jeston_cxx
[ 0%] Built target entry
[ 1%] Building CXX object samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/application.cpp.o
[ 3%] Building CXX object samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/main.cpp.o
[ 5%] Building CXX object samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/__/__/__/module_sample/liveview/dji_camera_stream_decoder.cpp.o
[ 7%] Building CXX object samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/__/__/__/module_sample/liveview/dji_camera_image_handler.cpp.o
In file included from /home/up2/Desktop/Payload-SDK-github/samples/sample_c++/platform/linux/nvidia_jeston/application/main.cpp:27:0:
/home/up2/Desktop/Payload-SDK-github/samples/sample_c++/platform/linux/nvidia_jeston/../../../module_sample/perception/test_perception_entry.hpp:31:10: fatal error: dji_perception.h: No such file or directory
#include "dji_perception.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/build.make:86: recipe for target 'samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/main.cpp.o' failed
make[2]: *** [samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/up2/Desktop/Payload-SDK-github/samples/sample_c++/platform/linux/nvidia_jeston/application/application.cpp:26:0:
/home/up2/Desktop/Payload-SDK-github/samples/sample_c++/platform/linux/nvidia_jeston/application/application.hpp:33:10: fatal error: dji_typedef.h: No such file or directory
#include "dji_typedef.h"
^~~~~~~~~~~~~~~
compilation terminated.
samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/build.make:62: recipe for target 'samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/application.cpp.o' failed
make[2]: *** [samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/application/application.cpp.o] Error 1
/home/up2/Desktop/Payload-SDK-github/samples/sample_c++/module_sample/liveview/dji_camera_stream_decoder.cpp:29:10: fatal error: dji_logger.h: No such file or directory
#include "dji_logger.h"
^~~~~~~~~~~~~~
compilation terminated.
samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/build.make:134: recipe for target 'samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/__/__/__/module_sample/liveview/dji_camera_stream_decoder.cpp.o' failed
make[2]: *** [samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/__/__/__/module_sample/liveview/dji_camera_stream_decoder.cpp.o] Error 1
CMakeFiles/Makefile2:122: recipe for target 'samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/all' failed
make[1]: *** [samples/sample_c++/platform/linux/nvidia_jeston/CMakeFiles/dji_sdk_demo_on_jeston_cxx.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
请问: nvidia_jeston该怎么样才能编译通过?
-
这个是编译文件路径指定有误,PSDK会尽快修正推到GitHub上。 ![](https://djisdksupport.zendesk.com/attachments/token/Qhh3JcCwcd2mtJAMfHgsIiSxE/?name=image.png) -
/Payload-SDK-master/samples/sample_c/platform/linux/nvidia_jetson/hal/hal_uart.c: In function ‘HalUart_Init’:
/Payload-SDK-master/samples/sample_c/platform/linux/nvidia_jetson/hal/hal_uart.c:88:35: warning: ‘%s’ directive writing up to 127 bytes into a region of size 54 [-Wformat-overflow=]
88 | sprintf(systemCmd, "chmod 777 %s", uartName);
| ^~ ~~~~~~~~
/Payload-SDK-master/samples/sample_c/platform/linux/nvidia_jetson/hal/hal_uart.c:88:5: note: ‘sprintf’ output between 11 and 138 bytes into a destination of size 64
88 | sprintf(systemCmd, "chmod 777 %s", uartName);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 55%] Linking C executable ../../../../../bin/dji_sdk_demo_on_jetson
-- Found OPUS installed in the system
-- - Includes: /usr/local/include/opus
-- - Libraries: /usr/local/lib/libopus.so
-- Found LIBUSB installed in the system
-- - Includes: /usr/include/libusb-1.0
-- - Libraries: /usr/lib/aarch64-linux-gnu/libusb-1.0.sodji_sdk_demo_on_jetson_cxx...
-- Found OpenCV installed in the system, will use it to display image in AdvancedSensing APIs
-- - Includes: /usr/include/opencv4
-- - Libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- Found FFMPEG installed in the system
-- - Includes: /usr/local/include
-- - Libraries: /usr/local/lib/libavcodec.so;/usr/local/lib/libavformat.so;/usr/local/lib/libavutil.so;/usr/local/lib/libswscale.so;/usr/lib/aarch64-linux-gnu/libz.so
-- - Version: 4.2.7
-- Found OPUS installed in the system
-- - Includes: /usr/local/include/opus
-- - Libraries: /usr/local/lib/libopus.so
-- Found LIBUSB installed in the system
-- - Includes: /usr/include/libusb-1.0
-- - Libraries: /usr/lib/aarch64-linux-gnu/libusb-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /Payload-SDK-master/cmake-build-debug
/usr/bin/ld: CMakeFiles/dji_sdk_demo_on_jetson.dir/application/main.c.o: in function `main':
main.c:(.text+0x0): multiple definition of `main'; CMakeFiles/dji_sdk_demo_on_jetson.dir/application/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c.o:CMakeCCompilerId.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [samples/sample_c/platform/linux/nvidia_jetson/CMakeFiles/dji_sdk_demo_on_jetson.dir/build.make:792: bin/dji_sdk_demo_on_jetson] Error 1
make[1]: *** [CMakeFiles/Makefile2:144: samples/sample_c/platform/linux/nvidia_jetson/CMakeFiles/dji_sdk_demo_on_jetson.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
请先登录再写评论。
评论
3 条评论