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

Segmentation fault when building from source #4

Open
martinbiel opened this issue Oct 28, 2018 · 11 comments
Open

Segmentation fault when building from source #4

martinbiel opened this issue Oct 28, 2018 · 11 comments

Comments

@martinbiel
Copy link

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.

@its-pointless
Copy link
Owner

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.

@martinbiel
Copy link
Author

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/"

@its-pointless
Copy link
Owner

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

@its-pointless
Copy link
Owner

also use
./buildjulia-termux.sh

@martinbiel
Copy link
Author

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.

@its-pointless
Copy link
Owner

what is output of ldd libjulia.so ?

@martinbiel
Copy link
Author

"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
"

@martinbiel
Copy link
Author

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.

@its-pointless
Copy link
Owner

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

@martinbiel
Copy link
Author

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"

@robsmith11
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants