Have a try Julia v1.5.1 for arm32bit

Similar to Have a try Julia v1.4.2 for arm32bit, have a try Julia v1.5.1 for arm32bit :tada:

How to install

yourmainPC $ ssh pi@raspberrypi.local # Assume You are going to login to your Pi via SSH
pi@raspberrypi $ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
pi@raspberrypi $ sudo gpasswd -a $USER docker # if you like to skip `sudo`
pi@raspberrypi $ exit
yourmainPC $ ssh pi@raspberrypi.local # login again
pi@raspberrypi $ JL_VERSION=v1.5.1
pi@raspberrypi $ IMAGE_NAME=terasakisatoshi/jlcross:rpi3-${JL_VERSION}
pi@raspberrypi $ CONTAINER_NAME=jltmp_${JL_VERSION}
pi@raspberrypi $ docker run --name ${CONTAINER_NAME} $IMAGE_NAME /bin/bash
pi@raspberrypi $ docker cp ${CONTAINER_NAME}:/home/pi/julia-${JL_VERSION} .
pi@raspberrypi $ docker rm ${CONTAINER_NAME}
pi@raspberrypi $ ls 
julia-v1.5.1 # <---- this is it
pi@raspberrypi $ cd julia-v1.5.1/bin
pi@raspberrypi $ ./julia # tada!!!

Enjoy Julia on your Raspberry Pi !!!

23 Likes

Also enjoy Julia on your Raspberry Pi Zero !!!

# set IMAGE_NAME as
$ IMAGE_NAME=terasakisatoshi/jlcross:rpizero-${JL_VERSION}

6 Likes

Hi, there Enjoy Julia v1.5.2.

5 Likes

Also RPi3 and RPi4

5 Likes

Enjoy Julia 1.5.3 on your RPIZero.

9 Likes

omg amazing! and thank you.

1 Like

Try Julia 1.5.3 on your Raspberry Pi 3/4

7 Likes

You can build Julia1.6-DEV by yourself (without using Docker).

1 Like

I’ve made a HelloWorld application that utilizes C++ resources. It runs not only standard platform(e.g. 64bit Windows, Linux, Mac) but also RaspberryPi with armv7l.

Checkout LibHello.jl or run the following commands.

git clone https://github.com/terasakisatoshi/LibHello.jl.git
cd LibHello.jl
julia --project=@. -e 'using Pkg; Pkg.add(url="https://github.com/terasakisatoshi/libhello_jll.jl.git", rev="libhello-v0.1.2+0")'
julia --project=@. -e 'using Pkg; Pkg.add("CxxWrap")'
# Should install libcxxwrap_julia_jll v0.8.2 if you try to run on your RaspberryPi with armv7l,
# otherwise you can pass it since CxxWrap installs libcxxwrap_julia_jll v0.8.0
julia --project=@. -e 'using Pkg; Pkg.add(PackageSpec(name="libcxxwrap_julia_jll", rev="b5edd5de8ab5b80e8f945bf1829048ef7a4feee0"))'
# test out
julia --project=@. -e 'using Pkg; Pkg.test()'

I tried the docker-based installation of Julia v1.5.3 on a Raspberry Pi Zero W 1.1, and it works but shows an error message on startup:

$ julia
WARNING: Error during initialization of module LinearAlgebra:
ErrorException("could not load symbol "openblas_get_config":
/home/pi/apps/julia-v1.5.3/bin/../lib/julia/libblas.so: undefined symbol: openblas_get_config")

So far everything seems to work, but I imagine I’ll eventually run into trouble with whatever is wrong with BLAS. I’m going to try building 1.6-DEV just to see what happens.

2 Likes

If you try it for RPI Zero, you need install dependencies via apt-get install…

sudo apt-get update && \
    sudo apt-get install -y build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config \
    libopenblas-dev \
    liblapack-dev \
    libgmp3-dev \
    libmpfr-dev

See

and

If you set USE_xxx_=0 and building procedure is passed, please let me know.

2 Likes

How?! wow…

1 Like

Hi, @yakir12

I’ve just installed Plots.jl via julia> using Pkg; Pkg.add("Plots")

Good news! this example of Dash.jl runs on RaspberryPi4
Also if Pluto.jl team will accept this PR, it will also run.

Sorry everyone. I don’t have a lot of free time to be able to build Julia 1.6.x …

3 Likes

Enjoy Julia 1.5.4 for armv7l :tada:

3 Likes

Good news, we can build julia on your RPI4 directly(=without using Docker or cross-compilation)

note: we need prepare Make.user as follow:

MARCH=armv7-a
LDFLAGS=-latomic
4 Likes

This worked great but I’m now having issues using packages in Julia:

using PortAudio
[ Info: Precompiling PortAudio [80ea8bcb-4634-5cb3-8ee8-a132660d1d2d]
Invalid ARM instruction at 0xa511e054: 0xe30f1fff

signal (4): Illegal instruction
in expression starting at /home/pi/.julia/packages/FFMPEG_jll/xCSqL/src/wrappers/armv7l-linux-gnueabihf.jl:12
_GLOBAL__sub_I_motion.cpp at /home/pi/.julia/artifacts/4aa3a4154795fad4cba5fdb55d9be30840315788/lib/libx265.so (unknown line)
Allocations: 5207652 (Pool: 5207253; Big: 399); GC: 13
ERROR: LoadError: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to /home/pi/.julia/compiled/v1.5/FFMPEG_jll/uSD0T_djzcu.ji.
...

It seems like Julia is trying to use an armv7l version of FFMPEG_jll. Any ideas how to fix this?

OK I’ve worked out why - there is no armv6l version of FFMPEG_jll - GitHub - JuliaBinaryWrappers/FFMPEG_jll.jl

I guess there’s no way around this?