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

[Bug]: unable to run julia REPL using grun #172

Closed
ANIL80531 opened this issue Dec 16, 2023 · 3 comments · Fixed by #173
Closed

[Bug]: unable to run julia REPL using grun #172

ANIL80531 opened this issue Dec 16, 2023 · 3 comments · Fixed by #173
Labels
bug Something isn't working

Comments

@ANIL80531
Copy link

ANIL80531 commented Dec 16, 2023

I'm trying to use julia REPL using glibc grun but it's unable to find sys.so file in ~/julia/lib directory.
however it has loaded libjulia.so.1 library file.

~/julia-1.9.4/bin $ grun --list ./julia
        linux-vdso.so.1 (0x00000078e84db000)
        libdl.so.2 => /data/data/com.termux/files/usr/glibc/lib/libdl.so.2 (0x00000078e84b0000)
        libpthread.so.0 => /data/data/com.termux/files/usr/glibc/lib/libpthread.so.0 (0x00000078e8480000)
        libc.so.6 => /data/data/com.termux/files/usr/glibc/lib/libc.so.6 (0x00000078e8260000)
        libjulia.so.1 => /home/julia-1.9.4/bin/./../lib/libjulia.so.1 (0x00000078e8220000)
        /lib/ld-linux-aarch64.so.1 => ld.so (0x0000003000000000)
~/julia-1.9.4/bin $ grun ./julia
ERROR: could not load library "/usr/glibc/lib/../lib/julia/sys.so"
/usr/glibc/lib/../lib/julia/sys.so: cannot open shared object file: No such file or directory

System information

termux-info:

~/julia-1.9.4/bin $ termux-info
Termux Variables:
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=20826
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://grimler.se/termux-packages-24/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.39.6
Android version:
13
Kernel build information:
Linux localhost 4.14.186-perf-g46e858b6644e #1 SMP PREEMPT Mon Aug 28 15:26:14 CST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
22031116AI
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
@ANIL80531 ANIL80531 added the bug Something isn't working label Dec 16, 2023
@dhuux
Copy link

dhuux commented Dec 17, 2023

i have just tested it. if not inter proot environment it wouldn't work. it's throwing: bad system call. maybe there is some hardcoded paths in its source code or something i'm not sure though.
Screenshot_20231217-203811_Termux

@Maxython
Copy link
Member

it's throwing: bad system call

This happens because system call 1008 is run inside julia - https://github.com/JuliaLang/julia/blob/master/src/scheduler.c#L226. I don’t know why they want to run a non-existent system call, but apparently here need to compile julia for Termux.

@Maxython Maxython linked a pull request Dec 22, 2023 that will close this issue
@Maxython
Copy link
Member

Maxython commented Jan 1, 2024

@ANIL80531, here are the commands that install and configure julia-1.10.0 on Termux aarch64:

# Make sure you have glibc 2.38-11 installed
pacman -Syu

# Launch custom shell
grun --shell 

# Julia installation
wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.0-linux-aarch64.tar.gz
tar xf julia-1.10.0-linux-aarch64.tar.gz

# Setting up Julia
grun --set julia-1.10.0/bin/julia
ln -s ${PWD}/julia-1.10.0/lib/libjulia.so.1.10.0 ~/../usr/glibc/lib/libjulia.so.1.10
ln -s ${PWD}/julia-1.10.0/lib/julia ~/../usr/glibc/lib

# Launch of Julia
./julia-1.10.0/bin/julia 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants