Julia on Raspberry Pi: error building HDF5 package

Since in Julia 1.3 new Artifact system was added, seems like this problem can be solved by providing precompiled binaries specifically for RPi?

Julia 1.3 didn’t change much (apart from making the installation process easier for the developers): the new artifact system is a merging of BinaryProvider.jl directly into Pkg.jl.

Do you have them?

In an ideal world, HDF5 could be cross-compiled and we’d be much more happy

Yes, I have compiled binaries for RPi 4. Should I upload it here?

Yes, please upload somewhere a tarball with the library. What’s the exact triplet of the platform?

Ok, I will figure the exact triplet and upload binaries in two or three weeks.

If you need some specific compiler settings for that platform, please let me know, so I could compile it again.

1 Like

Like all libraries for Julia, it needs to be a shared library built with -fPIC. An as old as possible compiler would help (in BinaryBuilder we use GCC 4.8.2 with binutils 2.24), but I assume you don’t have much control over that

1 Like

Raspberry Pi 4, Model B, BCM2711

Linux version 4.19.66-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1253 SMP

HDF5 v1.10.5 binaries: 1.10.5.zip — Yandex.Disk

1 Like

I’ve noticed that PR was merged into JuliaPackaging/Yggdrasil. Does it work with HDF5.jl package already? What Julia version should I use to check it working on RPi?

Yes, it’s now also merged in General.

Julia 1.3

1 Like

I’ve tried recently to install HDF5.jl on RPi, seems like the error remains the same: Error building HDF5.jl package on Raspberry Pi · Issue #588 · JuliaIO/HDF5.jl · GitHub

What version are you using? If you still get the error

┌ Error: Error building HDF5: 
│ [ Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/Zlib.v1.2.11.arm-linux-gnueabihf.tar.gz to /home/pi/.julia/packages/HDF5/rF1Fe/deps/usr/downloads/Zlib.v1.2.11.arm-linux-gnueabihf.tar.gz...
│ ERROR: LoadError: LoadError: MethodError: no method matching iterate(::Nothing)
│ Closest candidates are:
│   iterate(!Matched::Core.SimpleVector) at essentials.jl:604
│   iterate(!Matched::Core.SimpleVector, !Matched::Any) at essentials.jl:604
│   iterate(!Matched::ExponentialBackOff) at error.jl:214
│   ...

you’re definitely not installing the JLL package of HDF5_jll

Ok, the problem was with old julia version installed with
sudo apt install julia
as stated here https://juliaberry.github.io/

So, I’ve downloaded 1.3.1 version tarball 32-bit (ARMv7-a hard float) (GPG) from Download Julia , and simply extracted it and run bin/julia, it then creates 1.3 environment.

Then I run old Julia 1.0 console and remove HDF5 from 1.0 environment:

]rm HDF5
gc

Then I run new Julia 1.3 console (that from from extracted tarball) and add HDF5 to 1.3 environment:

]add HDF5

But it fails again with the same error.

Maybe I should manually install 1.3 tarball somehow, or change path variables? Or there are some scripts to install it from tarball?

Or should I completely delete previous 1.0 version and work with extracted binaries?

Julia 1.0 and Julia 1.3 have a different package environment.
If you have installed Julia 1.0 with some packages und then start Julia 1.3, you’ll have to reinstall all packages.
So your error must be in the HDF5 package.

Even if I set system-provided binaries path ENV["JULIA_HDF5_LIBRARY_PATH"] = "/home/pi/hdf5/1.10.5" and then rebuild HDF5, it crashes with the same error.

What version of HDF5.jl are you trying to install?

]add HDF5#master solved the problem.
By default it was 0.12.5 release, and now its 0.13.0 #master.

1 Like

Any chance we could get v1.12 binaries ?

Cannot say - I just don’t have physical access to that RPi for now.

Out of curiosity, what does this mean for Julia running on Raspberry Pi, in general ?

It seems like this means: Julia currently runs on Pi except for anything that relies on HDF5. (Maybe this is Julia itself/herself ??)

The NVIDIA Jetson Nano same situation ?

It works with HDF5 precompiled library, that is loaded as a binary artifact. I’ve tried it only with RPi4.

1 Like