Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build julia on Annapurna Labs AL324 failed (arm64) #45681

Closed
armgong opened this issue Jun 14, 2022 · 13 comments
Closed

build julia on Annapurna Labs AL324 failed (arm64) #45681

armgong opened this issue Jun 14, 2022 · 13 comments
Labels
building Build system, or building Julia or its dependencies system:arm ARMv7 and AArch64 system:linux Affects only Linux

Comments

@armgong
Copy link
Contributor

armgong commented Jun 14, 2022

bulid julia on Annapurna Labs AL324 (cortex-a57 quad core 1.7Ghz) failed, OS is archlinuxarm , gcc is

COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-unknown-linux-gnu/12.1.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-werror --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (GCC)

cpu info is:

processor       : 3
model name      : Annapurna Labs Alpine AL324 Quad-core ARM Cortex-A57 CPU @ 1.70GHz
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd07
CPU revision    : 3

edit Make.user and add march=armv8-a or MCPU=cortex-a57 to it, but both failed and report

  LINK usr/lib/libjulia-codegen.so.1.9
  LINK usr/lib/libjulia-codegen.so.1
  LINK usr/lib/libjulia-codegen.so
  JULIA usr/lib/julia/corecompiler.ji
ERROR: rethrow() not allowed outside a catch block
make[1]: *** [sysimage.mk:58: /hdd/src/julia/usr/lib/julia/corecompiler.ji] Error 1
make: *** [Makefile:82: julia-sysimg-ji] Error 2
@ViralBShah ViralBShah added building Build system, or building Julia or its dependencies system:arm ARMv7 and AArch64 system:linux Affects only Linux labels Jun 15, 2022
@armgong
Copy link
Contributor Author

armgong commented Jun 17, 2022

try further

  1. download julia 1.8rc1 arm64 pre-build binary from julialang.org ,
  _       _ _(_)_     |  Documentation: https://docs.julialang.org
 (_)     | (_) (_)    |
  _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
 | | | | | | |/ _` |  |
 | | |_| | | | (_| |  |  Version 1.8.0-rc1 (2022-05-27)
_/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |


SYSTEM: caught exception of type
  1. download julia 1.9 nightly arm64 pre-build binary from julialang.org , it go further ,but still crash
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0-DEV.781 (2022-06-16)
 _/ |\__'_|_|_|\__'_|  |  Commit 3df39c0154 (0 days old master)
|__/                   |

julia> versioninfo()
fatal: error thrown and no exception handler available.
ReadOnlyMemoryError()
__aarch64_sync_cache_range at /workspace/srcdir/gcc-7.1.0/libgcc/config/aarch64/sync-cache.c:54
_ZN4llvm3sys6Memory26InvalidateInstructionCacheEPKvm at /hdd/julia-3df39c0154/bin/../lib/julia/libLLVM-13jl.so (unknown line)

  1. used archlinuxarm virtual machine on macbook air m1 to build with ~~~march=armv8-a or MCPU=cortex-a57~~~ , build and run ok on the VM , copy the build to Annapurna Labs AL324, now julia success started , but when use versioninfo() ,it crashed again.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0-DEV.771 (2022-06-14)
 _/ |\__'_|_|_|\__'_|  |  Commit 6dae654e91* (2 days old master)
|__/                   |

julia> versioninfo()
fatal: error thrown and no exception handler available.
ReadOnlyMemoryError()
__aarch64_sync_cache_range at /workspace/srcdir/gcc-11.1.0/libgcc/config/aarch64/sync-cache.c:61
_ZN4llvm3sys6Memory26InvalidateInstructionCacheEPKvm at /hdd/src/julia/usr/bin/../lib/libLLVM-13jl.so (unknown line)

@oschulz
Copy link
Contributor

oschulz commented Jun 22, 2022

I get the same "SYSTEM: caught exception of type" (and then stall) on an aarch64 Chromebook with the official v1.7.3 and v1.8.0-rc1 build.

The aarch64 nightly build (1.9.0-DEV.834) starts, but crashes on versioninfo().

Julia v1.7.2 ran fine on the same device, even complex applications involving large packages.

@inkydragon
Copy link
Member

inkydragon commented Aug 19, 2022

  • ✔️ 1.7.2
  • ✔️ 1.7.3
  • ✔️ 1.8.0-beta1
  • ✔️ 1.8.0-beta3
  • ✔️ 1.8.0-rc1: 6368fdc
  • ❌ 1.8.0-rc2: ce5d15e
  • ❌ 1.8.0
  • ✔️ 1.9.0-DEV.911: 301b62a
1.8 error msg
root@localhost:~# julia-1.8.0/bin/julia --version
julia version 1.8.0
root@localhost:~# julia-1.8.0/bin/julia -e 'VERSION'
root@localhost:~# julia-1.8.0/bin/julia -e 'VERSION |> print'
1.8.0root@localhost:~#
root@localhost:~# julia-1.8.0/bin/julia -e 'VERSION |> println'
1.8.0
ERROR: `ccall` requires the compiler
Stacktrace:
 [1] enable_finalizers()
   @ Base.GC gcutils.jl:119
 [2] unlock(rl::ReentrantLock)
   @ Base lock.jl:133
 [3] unlock(s::Base.TTY)
   @ Base stream.jl:284
 [4] print(::Base.TTY, ::VersionNumber, ::String)
   @ Base strings/io.jl:49
 [5] println(io::Base.TTY, xs::VersionNumber)
   @ Base strings/io.jl:75
 [6] println(xs::VersionNumber)
   @ Base coreio.jl:4
 [7] |>(x::VersionNumber, f::typeof(println))
   @ Base operators.jl:911
 [8] top-level scope
   @ none:1
root@localhost:~# julia-1.8.0/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0 (2022-08-17)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |


SYSTEM: caught exception of type

test env

julia version info

julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (aarch64-unknown-linux-gnu)
  CPU: unknown
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cortex-a76)

system info

root@localhost:~# uname -a
Linux localhost 5.4.0-aidlite #1 SMP PREEMPT Thu Jun 2 19:52:17 CST 2022 aarch64 GNU/Linux

root@localhost:~# ldd --version
ldd (Debian GLIBC 2.28-10) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

root@localhost:~# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 26.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd05
CPU revision    : 0

Note: I'm testing julia inside AidLux (a Termux fork) on an android phone.

@vchuravy
Copy link
Member

What's the 1.7.3 error message?

The 1.8 message means that libjulia-compiler.so couldn't be loaded at startup.

@vchuravy
Copy link
Member

If anyone could try running the LLVM self-tests on the platform (v14 and v15) that would be helpful.

We might need #45859

@inkydragon
Copy link
Member

inkydragon commented Aug 20, 2022

What's the 1.7.3 error message?

Oh, that's my fault. 1.7.3 has NO problem. (I even used the output of 1.7.3 as version information).
I've updated the list.

@oschulz
Copy link
Contributor

oschulz commented Aug 20, 2022

If anyone could try running the LLVM self-tests on the platform (v14 and v15) that would be helpful

Can I do this with the Julia-included LLVM somehow?

@oschulz
Copy link
Contributor

oschulz commented Aug 20, 2022

On Chromebook-Linux (aarch64-unknown-linux-gnu, standard Crostini Debian Bullseye) I currently get (official Julia binaries, tested only REPL-start and ran rand(100)):

  • Julia v1.6.0: works
  • Julia v1.6.1: works
  • Julia v1.6.2: works
  • Julia v1.6.3: works
  • Julia v1.6.4: works
  • Julia v1.6.5: works
  • Julia v1.6.6: stalls at startup, no error message, no REPL prompt
  • Julia v1.6.7: stalls at startup, no error message, no REPL prompt
  • Julia v1.7.0: works
  • Julia v1.7.1: works
  • Julia v1.7.2: works
  • Julia v1.7.3: SYSTEM: caught exception of type (that's all of it, doesn't say what type) at startup, then stalls, no REPL-prompt
  • Julia v1.8.0: SYSTEM: caught exception of type (that's all of it, doesn't say what type) at startup, then stalls, no REPL-prompt
  • Julia v1.8.0: SYSTEM: caught exception of type (that's all of it, doesn't say what type) at startup, then stalls, no REPL-prompt
  • Julia v1.8.2: SYSTEM: caught exception of type (that's all of it, doesn't say what type) at startup, then stalls, no REPL-prompt
  • Julia v1.9.0-DEV.1696: REPL starts and one can do 1+1, but Julia freezes without output or error on simple things like rand(100) and versioninfo()

The same happens on NVIDIA Jetson Linux (Ubuntu binonic), at least on Julia v1.8.2 and v1.9.0-DEV.1696

I had used Julia v1.6 (early versions) on Chromebook-Linux and NVIDIA Jetson without issues in the past, for some demos that included large packages, complex code and plots.

@giordano
Copy link
Contributor

For what is worth, build of the v1.8.0 tag is successful for me on a MacBook M1:

~/repo/julia$ ./julia -q    
julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab7 (2022-08-17 13:38 UTC)
Platform Info:
  OS: Linux (aarch64-unknown-linux-gnu)
  CPU: 8 × unknown
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

The 1.8 message means that libjulia-compiler.so couldn't be loaded at startup.

That sounds related to #46409, and #46464 should help with that if LD_LIBRARY_PATH is the issue also here

@ViralBShah
Copy link
Member

We have been building on aarch64 recently and successfully. Please reopen if still an issue.

@sprig
Copy link

sprig commented Nov 4, 2024

Sorry, a bit unrelated - @armgong , how do you get arch to run on annapurna al324?

Thanks in advance!

@armgong
Copy link
Contributor Author

armgong commented Nov 4, 2024

@sprig my nas is qnap ts-532x , which run qts 5.2, I install container station on it. then install archlinuxarm lxc image in the container station.

@sprig
Copy link

sprig commented Nov 5, 2024

I understand, so not a full independant kernel.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:arm ARMv7 and AArch64 system:linux Affects only Linux
Projects
None yet
Development

No branches or pull requests

7 participants