[Debian]: build.sh error: unknown processor: aarch64 #2147

Closed
wenbob opened this Issue Feb 16, 2015 · 8 comments

Projects

None yet

5 participants

@wenbob
wenbob commented Feb 16, 2015

build.sh does not seem to work in ARM Debian (Nexus 9).

root@localhost:/sdcard/Download/nim-0.10.2# sh build.sh
Error: unknown processor: aarch64

root@localhost:/sdcard/Download/nim-0.10.2# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.9/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.1-19' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armel/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armel --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armel --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv4t --with-float=soft --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.9.1 (Debian 4.9.1-19)

@Araq
Member
Araq commented Mar 21, 2015

Well we do not support ARM 64 bit for now. Help us by providing a test machine please.

@NookSF
NookSF commented Dec 10, 2016

Any update on this? I can test the build on my Linux box for you.

@truedat101

"High Priority" label is still suggested. I've got "machines" as well. BTW, AARCH64 (armv8) is going to be the main flagship phone architecture going forward, and will be much more widely available in ARM-based embedded devices this year (all iphones, all samsungs, all nexus devices). Raspi3 is a prime example. A major pitch for Nim in IoT, Embedded Systems, and Mobile would require ARM64 bit architecture. How can I help here?

In terms of the quick work around, I suggest these small changes to build.sh:

  *arm*|*armv6l*|*armv7*|*armv5tel*)
    mycpu="arm" ;;
  *aarch64* )
    mycpu="arm64" ;;
  *)

NOTE: No reason to limit the arm architectures supported as far as the 32bit architectures go. There are still a lot of armv5 chips being sold. The odd thing is that arm64 is defined as a cpu in the build.sh script, yet this statement that arm64 won't be supported is in contradiction.

Perhaps this patch can get added, but official AARCH64 bit support not pronounced until a few cycles of testing. I don't know enough of this code base to suggest that code generation will "just work", however, the other languages that have the most problems with ARM platform changes are ones that have lots of ARM assembly optimizations, and therefore will require hand tuning to get full support for AARCH64.

@truedat101

Also, in terms of help, I have a cluster of pine64 devices that I could add to a Jenkins CI server or some other CI process. Please let me know.

@dom96
Member
dom96 commented Dec 24, 2016

I believe all you need to do to fix this issue is modify this file: https://github.com/nim-lang/Nim/blob/devel/tools/niminst/buildsh.tmpl

@truedat101

@dom96 I'll review the patch submission process and will look into that. I verified the build does indeed work on AARCH64 and tested at least a simple example. Would need to run whatever full suite tests exist to be complete in understanding what new issues AARCH64 might bring to light.

@NookSF
NookSF commented Dec 27, 2016

@truedat101 Is there a patch? I'd like to try a few tests myself.

@Araq Araq added a commit that closed this issue Dec 27, 2016
@Araq Araq support for arm64; fixes #2147 0af8584
@Araq Araq closed this in 0af8584 Dec 27, 2016
@NookSF
NookSF commented Dec 27, 2016

I had to do the same in csources/build.sh which lead to a successful bootstrap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment