Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError for libgomp with Pkg.precompile() on alpine 3.12 (docker) #988

Closed
kiwiroy opened this issue Jan 8, 2021 · 2 comments
Closed

Comments

@kiwiroy
Copy link

kiwiroy commented Jan 8, 2021

Trusting that this is a suitable place to report this.

While using the alpine docker image, precompiling a project is failing. The same workflow does not reproduce for the buster image.

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

julia> using Pkg; Pkg.add("StatsFuns"); Pkg.precompile();

<snip>

Precompiling project...
[ Info: Precompiling StatsFuns [4c63d2b9-4356-54db-8cca-17b64c39e42c]
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.
<snip>

Alpine and other musl based dists use a patch that addresses this error message about relocation.

@giordano
Copy link
Member

giordano commented Jan 8, 2021

Unfortunately JLL packages require Julia v1.6 to work reliably on Musl-based systems, like Alpine Linux. For reference: JuliaPackaging/Yggdrasil#1418, fixed by JuliaPackaging/Yggdrasil#1720

@giordano giordano closed this as completed Jan 8, 2021
@giordano
Copy link
Member

giordano commented Jan 8, 2021

You are quite lucky, the first beta version of Julia v1.6 has been just published: https://discourse.julialang.org/t/julia-v1-6-0-beta1-is-now-available/53065. There might be a Docker image of Julia on Alpine soon:tm:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants