its-pointless / julia

The Julia Language: A fresh approach to technical computing. Termux/Android

Home Page:https://julialang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault when building from source

martinbiel opened this issue · comments

When building Julia from source in termux (on aarch64) I get a segfault when bulding the system image:

"make[2]: *** [Makefile:220: /data/data/com.termux/files/home/julia/usr/lib/julia/corecompiler.ji] Segmentation fault"

Do you have any experiences of this? Sidenote: If I install using "apt install julia" I get a working binary, but it fires a lot of ReadOnlyMemoryExceptions.

Regarding building julia from source
I got those errors when using an unpatched llvm. There are patches applied to llvm. Install julia-llvm and set export PATH=$PREFIX/opt/julia-llvm/bin:$PATH . The patches are from deps/ in the source for julia.

ReadOnlyMemoryExceptions .. ?
Depends on the code. If you can show me an example i will have a look.

Hm, it segfaulted at the same place. Any other pointers?

"echo $PATH
[22:56:44]/data/data/com.termux/files/usr/opt/texlive/2017/bin/custom/ /data/data/com.termux/files/usr/bin /data/data/com.termux/files/usr/bin/applets /data/data/com.termux/files/usr/opt/julia-llvm/bin/"

/data/data/com.termux/files/usr/opt/julia-llvm/bin
Should be first not last?

also use
./buildjulia-termux.sh

Yes right:
"echo $PATH
/data/data/com.termux/files/usr/opt/julia-llvm/bin/ /data/data/com.termux/files/usr/opt/texlive/2017/bin/custom/ /data/data/com.termux/files/usr/bin /data/data/com.termux/files/usr/bin/applets"

I have been using buildjulia-termux.sh throughout. Still segfaults att corecompiler.jl.

what is output of ldd libjulia.so ?

"ldd libjulia.so
libm.so
libcompiler_rt-termux.so
libandroid-support.so
libopenblas.so
lbbthread.so
libgfortran.so.5
libLLVM-6.0julia.so
libdl.so
libc.so
libc++_shared.so
"

Update: I tried building the patched llvm directly from deps/ folder (i.e. without USE_SYSTEM_LLVM:=1) and it still segfaults when building corecompiler.

could try using system compiler_rt.
ln -sf /system/lib64/libcompiler_rt.so /data/data/com.termux/files/usr/lib/libcompiler_rt-termux.so

Same result I am afraid.
"
ldd libjulia.so.1.0 [07:17:38]
libm.so
libcompiler_rt.so
libandroid-support.so
libopenblas.so
libbthread.so
libgfortran.so.5
libLLVM-6.0julia.so
libdl.so
libc.so
libc++_shared.so
"
"make[1]: *** [Makefile:218: /data/data/com.termux/files/home/julia/usr/lib/julia/corecompiler.ji] Segmentation fault"

Anyone try a recent master? I believe Julia is now working with LLVM 8