projectNe10 / Ne10

An open optimized software library project for the ARM® Architecture
Other
1.46k stars 407 forks source link

CMake fails with GNU Linux #97

Closed heing closed 9 years ago

heing commented 9 years ago

CMake fails with GNULinux:

$ cmake -DCMAKE_TOOLCHAIN_FILE=../Ne10/GNUlinux_config.cmake ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-linux-gnueabihf-as
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:57 (if):
  if given arguments:

    "STREQUAL" "armv7"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

A workaround is to add "-DNE10_ANDROID_TARGET_ARCH=armv7" to cmake command line. I understand this has to do with Android being the primary development platform, but I think the GNU Linux platform support should still be kept. ARM is much more than Android and iOS.

Phillip-Wang commented 9 years ago

@heing thanks for you report.

zhongweiy commented 9 years ago

@heing we are planing to drop the support for GNU Linux platform. Because most of our users are under Android. So if you could provide some specific use case for GNU Linux, it would help us make right decision. Thanks.

zhongweiy commented 9 years ago

Project Opus has reported that they are using NE10 under GNU Linux. This should be a good case. So we will continue supporting GNU Linux.

@heing Please check the latest commit.

heing commented 9 years ago

Great! Thanks. We use Altera Arria 10 SoC with embedded Linux using Yocto. We generate C code from Matlab which uses the Ne10 library.

heing commented 9 years ago

@zhongweiy Latest commit works fine with me.

zhongweiy commented 9 years ago

@heing Thanks for your feedback!

jeras commented 8 years ago

I am from Red Pitaya, we would like to use Ne10 on Xilinx Zynq and maybe later on ZynqMP (AArch64). I asked a Debian developer to package this library for us: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837078

I do not have much experience with CMAKE, but is seems Linux compile instructions (line 47) are wrong. Exporting the NE10_LINUX_TARGET_ARCH variable did not work. I had to define the architecture in command line:

cmake -DNE10_LINUX_TARGET_ARCH=armv7 -DGNULINUX_PLATFORM=ON ..
joesavage commented 7 years ago

@jeras Yeah, I had to do the same. Seems like the build instructions are wrong here. Although the GNUlinux_config.cmake file checks (and actively uses) the environment for this variable, the GNULINUX_PLATFORM in general does not. Plus, #109 means that this case often results in an opaque error rather than just an empty target architecture.