projectNe10/Ne10

Unit Test Build Issue for Cross Compile (aarch64 target device)

Opened this issue · 3 comments

I am trying to build the tests for cross compile with aarch64 target device. When I run cmake with the tags

cmake -DGNULINUX_PLATFORM=ON -DNE10_BUILD_UNIT_TEST=ON -DNE10_SMOKE_TEST=ON

I get an error such as

You are trying to compile for non-ARM (CMAKE_SYSTEM_PROCESSOR='x86_64'

as given in CMakeLists.txt. however I have followed the cross compilation steps and the the library has built without any errors!

I see the same issue when building directly on an aarch64 system (i.e. not cross-compiling)

uname -a:

Linux ubuntu 4.14.0-xilinx-v2018.3 #1 SMP Thu Mar 21 10:07:54 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

cmake -DGNULINUX_PLATFORM=ON ..

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.

Having the same issue as bthcode, I'm building directly on an aarch64 system and getting the same error message.

Any idea when this will be fixed?
Thank you

Update: I commented out the if statement in the CMakeLists.txt file where this error arises:

if(GNULINUX_PLATFORM AND (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm"))
message(FATAL_ERROR "You are trying to compile for non-ARM
(CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}')! see doc/building.md for cross compilation instructions.")
endif()

(line 190+)

since I know I'm compiling for an ARM system. the Cmake command finished, and the library was built successfully when I ran the make command after.