Toybrick

标题: Rock-X SDK包的demo编译出错 [打印本页]

作者: happylinhxl    时间: 2019-7-8 10:58
标题: Rock-X SDK包的demo编译出错
我按照README.md编译包内的command_line_demo目录中的例程序

在PC虚拟机上安装fedora而编译,出现如下错误提示:
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler
    "/home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc"
  is not able to compile a simple test program.
  It fails with the following output:
    Change Dir: /home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeTmp
   
    Run Build Command(s):/usr/bin/gmake cmTC_4deb7/fast
    /usr/bin/gmake -f CMakeFiles/cmTC_4deb7.dir/build.make CMakeFiles/cmTC_4deb7.dir/build
    gmake[1]: Entering directory '/home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_4deb7.dir/testCCompiler.c.o
    /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc    -o CMakeFiles/cmTC_4deb7.dir/testCCompiler.c.o   -c /home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_4deb7
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4deb7.dir/link.txt --verbose=1
    /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc      CMakeFiles/cmTC_4deb7.dir/testCCompiler.c.o  -o cmTC_4deb7
    /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/ld: /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/6.3.1/liblto_plugin.so: error loading plugin: /home/huxiaolin/Mywork/rk3399/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/6.3.1/liblto_plugin.so: file too short
    collect2: error: ld returned 1 exit status
    gmake[1]: *** [CMakeFiles/cmTC_4deb7.dir/build.make:87: cmTC_4deb7] Error 1
    gmake[1]: Leaving directory '/home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:121: cmTC_4deb7/fast] Error 2
   

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
See also "/home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeOutput.log".
See also "/home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo/build/build_rk3399pro_linux_aarch64/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
/home/huxiaolin/Mywork/rk3399/Rock-X/RockX_SDK_V1.0.0_20190611/demo/command_line_demo

在开发板上编译,也出现同样错误:
-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

(.........后面内容同上,省略不贴了)

我哪里没有做对?
请版主及各位指导一下!

作者: happylinhxl    时间: 2019-7-12 14:16
没版主回复一下吗?
作者: troy    时间: 2019-7-16 08:48
happylinhxl 发表于 2019-7-12 14:16
没版主回复一下吗?

从日志上看,像是编译工具链有问题,工具链是不是下我们提供的?可以用这个编译链编译个hello world试试。
作者: happylinhxl    时间: 2019-7-17 15:58
troy 发表于 2019-7-16 08:48
从日志上看,像是编译工具链有问题,工具链是不是下我们提供的?可以用这个编译链编译个hello world试试 ...

使用系统带的gcc编译通过, 运行DEMO有如下错误,是什么原因,请指导
$ ./rockx_pose_body ./skiing_160x160.jpg
spec = local:transfer_proxy
spec = local:transfer_proxy_fffffffc
E NPUTransfer: Cannot connect to proxy: Connection refused
E RKNNAPI: rknn_init, driver open fail! ret = -4!
rockx load_model(47): rknn_init fail! ret = -3
rockx init(51): init module(6) error -1
Segmentation fault (core dumped)

作者: troy    时间: 2019-7-18 10:06
happylinhxl 发表于 2019-7-17 15:58
使用系统带的gcc编译通过, 运行DEMO有如下错误,是什么原因,请指导
$ ./rockx_pose_body ./skiing_160x ...

是在PC还是3399Pro上运行的?这个日志像是NPU没起来。
作者: happylinhxl    时间: 2019-7-18 19:33
troy 发表于 2019-7-18 10:06
是在PC还是3399Pro上运行的?这个日志像是NPU没起来。

在3399PRO开发板上编译运行的
作者: happylinhxl    时间: 2019-7-26 15:51
请版主指导一下!
作者: troy    时间: 2019-7-26 17:58
happylinhxl 发表于 2019-7-26 15:51
请版主指导一下!

其他的demo能跑吗,还是只有rockx不能跑。有没有试过update更新后,再试一下。




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3