You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
When compiling using
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../toolchains/jetson.toolchain.cmake -DNCNN_VULKAN=ON -DNCNN_BUILD_EXAMPLES=ON ..
it returns
-- NCNN_VERSION_STRING = 1.0.20230111
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/aarch64-linux-gnu-gcc"
is not able to compile a simple test program.
jetson.toolchain.cmake is used for compiling natively on jetson board
If you mean to cross-compiling for arm board, use aarch64-linux-gnu.toolchain.cmake
Detail
cpu: Intel core i7 11375H
system: Ubuntu 20.04 LTS
gcc version: gcc-9
aarch64-linux-gnu-gcc version: gcc-9-aarch64-linux-gnu
Issue
When compiling using
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../toolchains/jetson.toolchain.cmake -DNCNN_VULKAN=ON -DNCNN_BUILD_EXAMPLES=ON ..
it returns
-- NCNN_VERSION_STRING = 1.0.20230111
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/aarch64-linux-gnu-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/ealin/ncnn/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_753ed/fast && /usr/bin/make -f CMakeFiles/cmTC_753ed.dir/build.make CMakeFiles/cmTC_753ed.dir/build
make[1]: Entering directory '/home/ealin/ncnn/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_753ed.dir/testCCompiler.c.o
/usr/bin/aarch64-linux-gnu-gcc -march=native -o CMakeFiles/cmTC_753ed.dir/testCCompiler.c.o -c /home/ealin/ncnn/build/CMakeFiles/CMakeTmp/testCCompiler.c
cc1: error: unknown value ‘native’ for ‘-march’
cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a
make[1]: *** [CMakeFiles/cmTC_753ed.dir/build.make:66: CMakeFiles/cmTC_753ed.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory '/home/ealin/ncnn/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_753ed/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:48 (project)
When I check with /usr/bin/aarch64-linux-gnu-g++ -Q --help=target, the march part says -march= armv8-a.
The jetson.toolchain.cmake file has the line
-march=armv8-a could work on Jetson, but will compile without some extra cpu features
Questions
Why 'native' is not recognized for -march and how to fix it?
Which features are neglected if compiling with "-march=armv8-a"?
The text was updated successfully, but these errors were encountered: