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 ..
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!
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. ). I think this is what you want.
Anyway it is good idea to make a Docker image including some useful Julia packages.
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