Julia:alpine + SpecialFunctions issue

Trying to use julia:alpine from docker hub but I’m getting errors when compiling SpecialFunctions.jl:

$ docker run -ti --rm julia:alpine
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.5) pkg> add SpecialFunctions
 Installing known registries into `~/.julia`
Connecting to pkg.julialang.org (151.101.130.217:443)
Connecting to us-east2.pkg.julialang.org (18.212.158.78:443)
saving to '/tmp/jl__jeEAgi-download.gz'
jl__jeEAgi-download. 100% |********************************************************************************************| 2540k  0:00:00 ETA
'/tmp/jl__jeEAgi-download.gz' saved
      Added registry `General` to `~/.julia/registries/General`
  Resolving package versions...
  Installed Artifacts ──────────────────── v1.3.0
  Installed MuladdMacro ────────────────── v0.2.2
  Installed CompilerSupportLibraries_jll ─ v0.3.4+0
  Installed OpenSpecFun_jll ────────────── v0.5.3+4
  Installed JLLWrappers ────────────────── v1.2.0
  Installed ChainRulesCore ─────────────── v0.9.24
  Installed SpecialFunctions ───────────── v1.2.1
Downloading artifact: CompilerSupportLibraries
Connecting to pkg.julialang.org (151.101.66.217:443)
Connecting to us-east2.pkg.julialang.org (18.212.158.78:443)
saving to '/tmp/jl__FHGfJJ-download.gz'
jl__FHGfJJ-download. 100% |********************************************************************************************| 14.7M  0:00:00 ETA
Downloading artifact: OpenSpecFun
Connecting to pkg.julialang.org (151.101.66.217:443)
Connecting to us-east2.pkg.julialang.org (18.212.158.78:443)
saving to '/tmp/jl__klOffe-download.gz'
jl__klOffe-download. 100% |********************************************************************************************|  226k  0:00:00 ETA
Updating `~/.julia/environments/v1.5/Project.toml`
  [276daf66] + SpecialFunctions v1.2.1
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [56f22d72] + Artifacts v1.3.0
  [d360d2e6] + ChainRulesCore v0.9.24
  [e66e0078] + CompilerSupportLibraries_jll v0.3.4+0
  [692b3bcd] + JLLWrappers v1.2.0
  [46d2c3a1] + MuladdMacro v0.2.2
  [efe28fd5] + OpenSpecFun_jll v0.5.3+4
  [276daf66] + SpecialFunctions v1.2.1
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode

julia> using SpecialFunctions
[ Info: Precompiling SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b]
ERROR: LoadError: LoadError: InitError: could not load library "/root/.julia/artifacts/82a4d5a335f8504b9e4831f23b99908ec2807982/lib/libgomp.so.1"
Error relocating /root/.julia/artifacts/82a4d5a335f8504b9e4831f23b99908ec2807982/lib/libgomp.so.1: __cxa_finalize: initial-exec TLS resolves to dynamic definition in /root/.julia/artifacts/82a4d5a335f8504b9e4831f23b99908ec2807982/lib/libgomp.so.1
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
 [2] dlopen(::String, ::UInt32) at /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
 [3] macro expansion at /root/.julia/packages/JLLWrappers/WnWcZ/src/products/library_generators.jl:63 [inlined]
 [4] __init__() at /root/.julia/packages/CompilerSupportLibraries_jll/790hI/src/wrappers/x86_64-linux-musl-libgfortran4.jl:30
 [5] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [6] _require_from_serialized(::String) at ./loading.jl:749
 [7] _require(::Base.PkgId) at ./loading.jl:1040
 [8] require(::Base.PkgId) at ./loading.jl:928
 [9] require(::Module, ::Symbol) at ./loading.jl:923
 [10] include(::Function, ::Module, ::String) at ./Base.jl:380
 [11] include(::Module, ::String) at ./Base.jl:368
 [12] top-level scope at /root/.julia/packages/JLLWrappers/WnWcZ/src/toplevel_generators.jl:170
 [13] include(::Function, ::Module, ::String) at ./Base.jl:380
 [14] include(::Module, ::String) at ./Base.jl:368
 [15] top-level scope at none:2
 [16] eval at ./boot.jl:331 [inlined]
 [17] eval(::Expr) at ./client.jl:467
 [18] top-level scope at ./none:3
during initialization of module CompilerSupportLibraries_jll
in expression starting at /root/.julia/packages/OpenSpecFun_jll/Xw8XK/src/wrappers/x86_64-linux-musl-libgfortran4.jl:4
in expression starting at /root/.julia/packages/OpenSpecFun_jll/Xw8XK/src/OpenSpecFun_jll.jl:8
ERROR: LoadError: Failed to precompile OpenSpecFun_jll [efe28fd5-8261-553b-a9e1-b2916fc3738e] to /root/.julia/compiled/v1.5/OpenSpecFun_jll/TDl1L_nrrZo.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /root/.julia/packages/SpecialFunctions/ERZOU/src/SpecialFunctions.jl:5
ERROR: Failed to precompile SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] to /root/.julia/compiled/v1.5/SpecialFunctions/78gOt_nrrZo.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

Not sure where to open an issue, or if I’m supposed to add some package myself to the image.
Any ideas?

https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/988

TL;DR: it’ll work in Julia v1.6, not previous versions

2 Likes

Thanks for pointing to the right direction!