# Have a try Julia v1.4.2 for arm32bit

**URL:** <https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284>\
**Category:** Tooling\
**Tags:** announcement\
**Created:** [May 27, 2020, 7:14pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284 "2020-05-27T19:14:17Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [August 26, 2020, 12:07am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/22 "2020-08-26T00:07:47Z")

</div>

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.

```bash
#! /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:

```julia
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)

```

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [August 26, 2020, 7:59am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/23 "2020-08-26T07:59:04Z")

</div>

Hi there, have a try v1.5.1 [Have a try Julia v1.5.1 for arm32bit](https://discourse.julialang.org/t/have-a-try-julia-v1-5-1-for-arm32bit/45558) 🏓

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 22, 2020, 2:24pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/24 "2020-11-22T14:24:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 22, 2020, 2:42pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/25 "2020-11-22T14:42:04Z")

</div>

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](https://github.com/terasakisatoshi/CameraApp.jl)

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 22, 2020, 2:50pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/26 "2020-11-22T14:50:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 23, 2020, 8:01am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/27 "2020-11-23T08:01:39Z")

</div>

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](https://github.com/terasakisatoshi/jlapp/blob/master/rpi3/jl_cross/Dockerfile) 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.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 23, 2020, 8:11am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/28 "2020-11-23T08:11:07Z")

</div>

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

> [@terasakisatoshi](#):
>
> [jlapp](https://github.com/terasakisatoshi/jlapp/blob/master/rpi3/jl_cross/Dockerfile)

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 🙂

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 23, 2020, 8:55am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/29 "2020-11-23T08:55:58Z")

</div>

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

> [@yakir12](#):
>
> And then the idea would be to add a command about building a sysimage the includes all the things we (I) need?

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

I need update jlapp.

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 23, 2020, 8:59am UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/30 "2020-11-23T08:59:26Z")

</div>

Ah, I think it is useful for @yakir12

> [@Have a try Julia v1.4.2 for arm32bit](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/11):
>
> I’ve updated the Dockerfile above by adding keyword argumnet precompile\_execution\_file. It will improve performance. See [https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/](https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/) fore more information. FROM terasakisatoshi/jlcross:rpizero-v1.4.2 RUN julia -e 'using Pkg; \ Pkg.add(["PackageCompiler", "StaticArrays"]); \ # precompile pacakges; \ using PackageCompiler, StaticArrays' RUN mkdir /sysimages RUN echo 'using StaticArrays; s1=SVector{3}(0.0,0.0,0.0); s2=SVector…

[Previous page](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284.md?page=1)
