Have a try Julia v1.4.2 for arm32bit

I’ve tried to build Julia v1.5.1 and v1.5.0 locally and found it failed.
In stead of building v.1.5.x, I’ve succeeded to build Julia 1.6-DEV (today’s master branch).
Here is my bash script to build Julia on RPI4 locally (i.e. without using Docker). I hope @nurban can do as well.

#! /bin/bash

# Usage:
# 1. Copy this file to your raspberry pi e.g. /home/pi
# 2. Run this file `bash build_locally.sh`
# 3. Tested on Raspberry Pi4 with 4 or 8 GB

sudo apt-get update && sudo apt-get install -y \
    build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config \
    git

JL_VERSION=master
JL_BUILD_DIR=build-julia-${JL_VERSION}
JL_COMMIT_HASH=3d04d15c31
JL_BUILD_DIR=build-julia-${JL_VERSION}-${JL_COMMIT_HASH}
git clone https://github.com/JuliaLang/julia.git $JL_BUILD_DIR && \
    cd ${JL_BUILD_DIR} && git checkout ${JL_COMMIT_HASH} && cd ..

cat > ${JL_BUILD_DIR}/Make.user << EOF
CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
prefix=/home/pi/julia-${JL_VERSION}-${JL_COMMIT_HASH}
USE_BINARYBUILDER=0
LDFLAGS=-latomic
CFLAGS += "-mfpu=neon-vfpv4"
CXXFLAGS += "-mfpu=neon-vfpv4"
MARCH="armv7-a"
JULIA_CPU_TARGET="armv7-a\;armv7-a,neon\;armv7-a,neon,vfp4"
EOF

cd ${JL_BUILD_DIR} && make -j `nproc` && sudo make install && cd ..

P.S.

The result of above should be:

pi@raspberrypi:~/julia-master-3d04d15c31/bin $ ./julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-DEV.718 (2020-08-25)
 _/ |\__'_|_|_|\__'_|  |  Commit 3d04d15c31* (0 days old master)
|__/                   |

julia> versioninfo()
Julia Version 1.6.0-DEV.718
Commit 3d04d15c31* (2020-08-25 10:29 UTC)
Platform Info:
  OS: Linux (arm-linux-gnueabihf)
  CPU: ARMv7 Processor rev 3 (v7l)
  WORD_SIZE: 32
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, cortex-a72)
1 Like

Hi there, have a try v1.5.1 Have a try Julia v1.5.1 for arm32bit :ping_pong:

Is it possible for you to ship these with sysimages for stuff like JSServe, AbstractPlotting, WGLMakie, LibSerialPort, maybe even Images? It’s just that these packages take ages to load and use on the RPI and are very useful for project involving the Pi Cam and server-related tasks… Just a thought!

1 Like

First, we need confirm whether these package work or not. If yes, there is a chance to compile your application via PackageCompiler.

See https://github.com/terasakisatoshi/CameraApp.jl

They do work, so that’s good. PackageCompiler is the way to go for sure, I was just thinking that while you’re shipping these docker images, you could bake into them sysimages that already include these packages precompiled. My point is, that it would be very useful for people using these docker images to already have these packages precompiled, especially on an RPI, since the use-cases for them would be wide.

Good to know they work on RPI > AbstractPlotting, WGLMakie

I was just thinking that while you’re shipping these docker images

Ah, I see. Actually, I was making a repository jlapp that adopts terasakisatoshi/jlcross:rpi3-1.1.0 as a base image. ( I was so busy at the time that I skipped out on updates. :wink: ). I think this is what you want.

Anyway it is good idea to make a Docker image including some useful Julia packages.

1 Like

I’m a real noob when it comes to docker files, is that

all it takes to make one? And then the idea would be to add a command about building a sysimage the includes all the things we (I) need? Sounds very very easy… I must be missing something :slight_smile:

Roughly speaking, Dockerfile is a kind of shell script to construct a develop environment.

Yes, it should be. Since your question is worth to try, I would like to do, too.

I need update jlapp.

Ah, I think it is useful for @yakir12