Closed Liablbility closed 2 months ago
你的用的交叉编译工具链有问题
我电脑里倒是有两个 交叉编译工具 当前用的是rknn给的工具链 https://releases.linaro.org/components/toolchain/binaries/6.3
2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
然后还有一个是 apt 安装的 工具链
我应该用后者吗 还是 其他版本的工具链呢
用apt的
好的,谢谢指导 已经编译成功
(base) liable@liable-G3:~/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/liable/Documents/RKNN/rk3588_dev_rootfs/toolchain-aarch64.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr (found version "4.5.4")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build
(base) liable@liable-G3:~/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build$ make
[ 7%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/camera.cpp.o
In file included from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp:5:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h: In constructor ‘Camera::Camera(uint16t, cv::Size, double)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h:16:20: warning: ‘Camera::capture’ will be initialized after [-Wreorder]
16 | cv::VideoCapture capture;
| ^~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h:15:12: warning: ‘cv::Size Camera::size’ [-Wreorder]
15 | cv::Size size_;
| ^~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp:10:1: warning: when initialized here [-Wreorder]
10 | Camera::Camera(uint16_t index, cv::Size size, double framerate)
| ^~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp: In member function ‘std::unique_ptr~~~^~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp:51:19: note: remove ‘std::move’ call
[ 15%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/image_process.cpp.o
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp: In member function ‘std::unique_ptr~^~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:61:19: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
61 | return std::move(square_img);
| ~~~^~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:61:19: note: remove ‘std::move’ call
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp: In member function ‘void ImageProcess::ImagePostProcess(cv::Mat&, object_detect_result_list&)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:73:9: warning: unused variable ‘cls_id’ [-Wunused-variable]
73 | int cls_id = od_results.results[0].cls_id;
| ^~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp: In member function ‘std::unique_ptr~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/postprocess.cpp: In function ‘int post_process_seg(rknn_app_context_t, rknn_output, letterbox_t, float, float, object_detect_result_list)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/postprocess.cpp:739:7: warning: unused variable ‘output_per_branch’ [-Wunused-variable]
739 | int output_per_branch = app_ctx->io_num.n_output / 3; // default 3 branch
| ^~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/postprocess.cpp: In function ‘int process_i8_pose(int8_t, int32_t, float, int8_t, int32_t, float, int8_t, int32_t, float, int8_t, int32_t, float, int, int, int, int, std::vector~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/postprocess.cpp: In function ‘int post_process_obb(rknn_app_context_t~~~~~
[ 30%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/rknn_pool.cpp.o
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/rknn_pool.cpp: In member function ‘int RknnPool::get_model_id()’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/rknn_pool.cpp:69:10: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
69 | if (id == threadnum) {
| ~^~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/rknn_pool.cpp: In member function ‘std::shared_ptr~~~^~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/rknn_pool.cpp:84:21: note: remove ‘std::move’ call
[ 38%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/videofile.cpp.o
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/videofile.cpp: In member function ‘std::unique_ptr~~~^~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/videofile.cpp:53:19: note: remove ‘std::move’ call
[ 46%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/yolov8.cpp.o
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp: In function ‘int read_data_from_file(const char~~^~~~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp: In member function ‘int Yolov8::Init(rknn_context, bool)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp:127:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
127 | for (int i = 0; i < io_num.n_input; i++) {
| ^~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp:149:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
149 | for (int i = 0; i < io_num.n_output; i++) {
| ^~~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp: In member function ‘int Yolov8::Inference(void, object_detect_result_list, letterbox_t)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp:259:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
259 | for (int i = 0; i < appctx.io_num.n_output; ++i) {
| ^~~~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp: In member function ‘int Yolov8::Init(rknn_context, bool)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/yolov8.cpp:98:27: warning: ‘core_mask’ may be used uninitialized in this function [-Wmaybe-uninitialized]
98 | ret = rknn_set_coremask(ctx, core_mask);
| ~~~~^~~~~~~
[ 53%] Linking CXX static library libyolov8-kaylordut.a
[ 53%] Built target yolov8-kaylordut
[ 61%] Building CXX object CMakeFiles/videofile_demo.dir/videofile_demo.cpp.o
[ 69%] Linking CXX executable videofile_demo
[ 69%] Built target videofile_demo
[ 76%] Building CXX object CMakeFiles/camera_demo.dir/camera_demo.cpp.o
[ 84%] Linking CXX executable camera_demo
[ 84%] Built target camera_demo
[ 92%] Building CXX object CMakeFiles/imagefile_demo.dir/imagefile_demo.cpp.o
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp: In function ‘int main(int, char)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp:94:11: warning: unused variable ‘running_flag’ [-Wunused-variable]
94 | uint8_t running_flag = 0;
| ^~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp:96:14: warning: unused variable ‘image_count’ [-Wunused-variable]
96 | static int image_count = 0;
| ^~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp:97:14: warning: unused variable ‘image_res_count’ [-Wunused-variable]
97 | static int image_res_count = 0;
| ^~~~~~~
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp: At global scope:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp:97:14: warning: ‘image_res_count’ defined but not used [-Wunused-variable]
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/imagefile_demo.cpp:96:14: warning: ‘image_count’ defined but not used [-Wunused-variable]
96 | static int image_count = 0;
| ^~~
[100%] Linking CXX executable imagefile_demo
[100%] Built target imagefile_demo
请问我为啥编译失败啊 Why am I couldn't compile it (base) liable@liable-G3:~/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/liable/Documents/RKNN/rk3588_dev_rootfs/toolchain-aarch64.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
-- The C compiler identification is GNU 6.3.1 -- The CXX compiler identification is GNU 6.3.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/liable/Documents/RKNN/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/liable/Documents/RKNN/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenCV: /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr (found version "4.5.4") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE
-- Configuring done -- Generating done -- Build files have been written to: /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build
(base) liable@liable-G3:~/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/build$ make
[ 7%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/camera.cpp.o In file included from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp:5:0: /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h: In constructor ‘Camera::Camera(uint16t, cv::Size, double)’: /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h:16:20: warning: ‘Camera::capture’ will be initialized after [-Wreorder] cv::VideoCapture capture; ^::type type;
^~~~~
/home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:505:36: error: template argument 1 is invalid
typedef typename remove_all::type type;
^
In file included from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/Core:162:0,
from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/dataType.h:6,
from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/kalmanFilter.h:3,
from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/STrack.h:4,
from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/BYTETracker.h:3,
from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/image_process.h:6,
from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:5:
/home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:616:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type
typedef typename std::invoke_result<F, ArgTypes...>::type type1;
^::type type;
^~~~~
/home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:617:36: error: template argument 1 is invalid
typedef typename remove_all::type type;
^
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp: In member function ‘std::unique_ptr ImageProcess::Convert(const cv::Mat&)’:
/home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:51:12: warning: the compiler can assume that the address of ‘src’ will never be NULL [-Waddress]
if (&src == nullptr) {
~~~ /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/camera.h:15:12: warning: ‘cv::Size Camera::size’ [-Wreorder] cv::Size size_; ^~~~~ /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/camera.cpp:10:1: warning: when initialized here [-Wreorder] Camera::Camera(uint16_t index, cv::Size size, double framerate) ^~[ 15%] Building CXX object utils/CMakeFiles/yolov8-kaylordut.dir/image_process.cpp.o In file included from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/Core:162:0, from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/dataType.h:6, from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/kalmanFilter.h:3, from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/STrack.h:4, from /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/BYTETracker.h:3, from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/include/image_process.h:6, from /home/liable/Documents/YoloV8Pose/rk3588-yolo-demo/src/yolov8/utils/image_process.cpp:5: /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:504:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type typedef typename std::invoke_result<F, ArgTypes...>::type type1; ^~~~~ /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:504:38: error: expected unqualified-id before ‘<’ token typedef typename std::invoke_result<F, ArgTypes...>::type type1; ^ /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:505:31: error: ‘type1’ was not declared in this scope typedef typename remove_all~~~~ /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:616:38: error: expected unqualified-id before ‘<’ token typedef typename std::invoke_result<F, ArgTypes...>::type type1; ^ /home/liable/Documents/RKNN/rk3588_dev_rootfs/rootfs/usr/include/eigen3/Eigen/src/Core/util/Meta.h:617:31: error: ‘type1’ was not declared in this scope typedef typename remove_all