鲲鹏916安装Ne10出现的问题
先说一下,这个帖子我都在线编辑完了,然后提交的时候网页崩溃了。
然后又在LiberOffice重新写了一遍。
==============================================
错误现象是:
ERROR: Couldn't read the file "/proc/cpuinfo". NE10_init() failed.
Failed to initialise Ne10.
代码是
#include <stdio.h> #include <stdlib.h> #include "NE10.h" int main() { if (ne10_init() != NE10_OK) { fprintf(stderr, "Failed to initialise Ne10.\n"); return -1; } }
返回值是 NE10_ERR 即 -1
我试了其他 NE10_XXXX的函数,都不可运行。
使用的IDE是QT
Qt Creator 4.9.2
Based on Qt 5.12.4 (GCC 9.1.0, 64 bit)
Copyright 2008-2019 The Qt Company Ltd. All rights reserved.
================================怀疑之前安装NE10有错误========
服务器泰山2280 V1 ,鲲鹏916
系统是CentOS7.6
编译器gcc9.1.0
系统自带cmake version 2.8.12.2
安装的是Ne10-v1.2.1-72-g1f059a7
按照Building.md流程安装
在线可在这看:https://github.com/projectNe10/Ne10/blob/master/doc/building.md
=====第一次======
按照这个方式安装
## Native compilation on \*nix platforms
export NE10_LINUX_TARGET_ARCH=aarch64
cmake -DGNULINUX_PLATFORM=ON ..
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /bin/cc
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Target architecture: aarch64
-- Building type: RELEASE
CMake Error at CMakeLists.txt:191 (message):
You are trying to compile for non-ARM (CMAKE_SYSTEM_PROCESSOR='aarch64')!
see doc/building.md for cross compilation instructions.
-- Configuring incomplete, errors occurred!
======第二次=======================
按照这个方式安装
## Cross compilation on \*nix platforms...
### ...for other general \*nix platforms
export NE10_LINUX_TARGET_ARCH=aarch64
cmake -DCMAKE_TOOLCHAIN_FILE=../GNUlinux_config.cmake ..
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- The ASM compiler identification is unknown
-- Found assembler: aarch64-unknown-linux-gnu-as
-- Check for working C compiler: /bin/aarch64-unknown-linux-gnu-gcc
-- Check for working C compiler: /bin/aarch64-unknown-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/aarch64-unknown-linux-gnu-g++
-- Check for working CXX compiler: /bin/aarch64-unknown-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Warning: Did not find file Compiler/-ASM
CMake Error: your ASM compiler: "aarch64-unknown-linux-gnu-as" was not found. Please set CMAKE_ASM_COMPILER to a valid compiler path or name.
-- Target architecture: aarch64
-- Building type: RELEASE
-- Configuring incomplete, errors occurred!
###############我找了,我的gcc目录下没有 linux-gnu-as类似的东西########
======第三次=======================
继续上一次的方式
首先,把GNUlinux_config.cmake 文件的57行,注释掉。
elseif(NE10_LINUX_TARGET_ARCH STREQUAL "aarch64")
set(CMAKE_C_COMPILER aarch64-unknown-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-unknown-linux-gnu-g++)###(本来没有-unknown-,都是我后加的,为了和编译器一致)
#set(CMAKE_ASM_COMPILER aarch64-unknown-linux-gnu-as)##########注释掉这行####
find_program(CMAKE_AR NAMES "aarch64-unknown-linux-gnu-gcc-ar")
find_program(CMAKE_RANLIB NAMES "aarch64-unknown-linux-gnu-gcc-ranlib")
endif()
执行
export NE10_LINUX_TARGET_ARCH=aarch64
cmake -DCMAKE_TOOLCHAIN_FILE=../GNUlinux_config.cmake ..
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /bin/aarch64-unknown-linux-gnu-gcc
-- Check for working C compiler: /bin/aarch64-unknown-linux-gnu-gcc
-- Check for working C compiler: /bin/aarch64-unknown-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/aarch64-unknown-linux-gnu-g++
-- Check for working CXX compiler: /bin/aarch64-unknown-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Target architecture: aarch64
-- Building type: RELEASE
-- Configuring done
-- Generating done
make
Scanning dependencies of target NE10
[ 3%] Building C object modules/CMakeFiles/NE10.dir/__/common/NE10_mask_table.c.o
[ 7%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft.c.o
[ 11%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_float32.c.o
[ 15%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_generic_float32.c.o
[ 19%] Building CXX object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_generic_int32.cpp.o
[ 23%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_rfft_float32.c.o
[ 26%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_int32.c.o
[ 30%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_int16.c.o
[ 34%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fir.c.o
[ 38%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fir_init.c.o
[ 42%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_iir.c.o
[ 46%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_iir_init.c.o
[ 50%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_resize.c.o
[ 53%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_rotate.c.o
[ 57%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_boxfilter.c.o
[ 61%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_float32.neonintrinsic.c.o
[ 65%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_int32.neonintrinsic.c.o
[ 69%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_int16.neonintrinsic.c.o
[ 73%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_rfft_float32.neonintrinsic.c.o
[ 76%] Building CXX object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_generic_float32.neonintrinsic.cpp.o
[ 80%] Building CXX object modules/CMakeFiles/NE10.dir/dsp/NE10_fft_generic_int32.neonintrinsic.cpp.o
[ 84%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_resize.neon.c.o
[ 88%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_boxfilter.neon.c.o
[ 92%] Building C object modules/CMakeFiles/NE10.dir/NE10_init.c.o
[ 96%] Building C object modules/CMakeFiles/NE10.dir/dsp/NE10_init_dsp.c.o
[100%] Building C object modules/CMakeFiles/NE10.dir/imgproc/NE10_init_imgproc.c.o
Linking C static library libNE10.a
[100%] Built target NE10
========自以为安装成功了=====
结果出现了帖子开始的情况。。。。
1、我自认为可能是gcc安装有问题。为什么没有ASM的编译器?
2、鲲鹏916支持neon吗,支持硬件浮点运算吗?
3、有可能是Ne10安装有问题,不知道选择那种安装方式:本地编译?交叉编译?
===============
谢谢各位专家,请不吝赐教!
- 点赞
- 收藏
- 关注作者
评论(0)