-
Notifications
You must be signed in to change notification settings - Fork 13
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
GDAL does not compile in Alpine:3.14 Linux docker container #151
Comments
So this is on an older Julia version, and probably requires a musl based build. I advise to move to more recent Julia versions, it will probably work out of the box. |
We do have musl builds for GDAL_jll: https://github.com/JuliaBinaryWrappers/GDAL_jll.jl/releases It would be good to know what version of GDAL_jll and dependencies you see this on ( |
@evetion @visr Thanks for the quick responses. I have put together a Dockerfile that I can use to test different combinations of julia and Alpine. All of the docker images fail to build GDAL_jl. I use Dockerfile RUN apk add --update --upgrade --no-cache gcc openssh netcat-openbsd zip unzip curl gnu-libiconv musl-dev postgresql-client aws-cli RUN adduser -u 1000 -S runtime --home /runtime ENV JULIA_DEPOT_PATH=/runtime/.julia WORKDIR /app RUN julia -e 'using Pkg; Pkg.instantiate()' RUN julia -e 'using Pkg; Pkg.add("GDAL"); Pkg.precompile()'
Running (@v1.8) pkg> st -m |
Thanks for the info. So this happens on the latest GDAL_jll and latest Julia. The key error is this:
This could be caused by new libzstd builds breaking the libtiff build, you could try Zstd_jll v1.5.2, see if that resolves it. If so, we probably need to trigger a new build of libtiff and possibly GDAL in Yggdrasil. https://github.com/JuliaBinaryWrappers/Zstd_jll.jl/releases |
@visr How do I enforce the use of Zstd_jll@1.5.2. I tried the following inside a Julia project within an Alpine docker container and it didn't work: bash> docker run -it julia:1.8-alpine3.17
|
What you did worked to get that version, although unfortunately it doesn't seem to work. I saw you opened the same issue in Yggdrasil. Probably the workaround suggested there would be the next thing to try: JuliaPackaging/Yggdrasil#6557 (comment). |
Thanks @visr . I'll give that workaround a go and see if that fixes things. I'm not sure if I will be able to use that workaround in our production system but atleast that will help us pinpoint the issue. I'll update here once I've tried that. |
We use a Linux Alpine image for our production servers however, GDAL does not compile on the docker container. The steps to reproduce this are:
`
sh> docker pull julia:1.6.2-alpine3.14
sh> docker run -it julia:1.6.2-alpine3.14
julia> ]
Pkg> add GDAL
to see detailed errors run the below
Pkg> precompile
`
Test environment:
Things I have tried so far:
Error relocating /usr/lib/libgssapi_krb5.so.2: k5_sname_compare: symbol not found
.Error:
`
(@v1.6) pkg> precompile
Precompiling project...
✗ PROJ_jll
✗ LittleCMS_jll
✗ OpenJpeg_jll
✗ libgeotiff_jll
✗ GDAL_jll
✗ GDAL
0 dependencies successfully precompiled in 8 seconds (29 already precompiled)
ERROR: The following 1 direct dependency failed to precompile:
GDAL [add2ef01-049f-52c4-9ee2-e494f65e021a]
Failed to precompile GDAL [add2ef01-049f-52c4-9ee2-e494f65e021a] to /root/.julia/compiled/v1.6/GDAL/jl_iHjPOh.
ERROR: LoadError: LoadError: InitError: could not load library "/root/.julia/artifacts/4d94fac9395da1d9e54143cd9329aa4ed2882f36/lib/libtiff.so"
Error loading shared library libzstd.so.1: No such file or directory (needed by /root/.julia/artifacts/4d94fac9395da1d9e54143cd9329aa4ed2882f36/lib/libtiff.so)
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:114
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl ./libdl.jl:114
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
[4] init()
@ Libtiff_jll ~/.julia/packages/Libtiff_jll/5VD1s/src/wrappers/x86_64-linux-musl.jl:12
[5] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:696
[6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:782
[7] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1020
[8] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:936
[9] require(into::Module, mod::Symbol)
@ Base ./loading.jl:923
[10] include(mod::Module, _path::String)
@ Base ./Base.jl:386
[11] top-level scope
@ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
[12] include
@ ./Base.jl:386 [inlined]
[13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1235
[14] top-level scope
@ none:1
[15] eval
@ ./boot.jl:360 [inlined]
[16] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[17] top-level scope
@ none:1
during initialization of module Libtiff_jll
in expression starting at /root/.julia/packages/PROJ_jll/oT9sV/src/wrappers/x86_64-linux-musl-cxx11.jl:5
in expression starting at /root/.julia/packages/PROJ_jll/oT9sV/src/PROJ_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile PROJ_jll [58948b4f-47e0-5654-a9ad-f609743f8632] to /root/.julia/compiled/v1.6/PROJ_jll/jl_PjLclO.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1385
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1329
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1043
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:936
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:923
[7] include(mod::Module, _path::String)
@ Base ./Base.jl:386
[8] top-level scope
@ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
[9] include
@ ./Base.jl:386 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1235
[11] top-level scope
@ none:1
[12] eval
@ ./boot.jl:360 [inlined]
[13] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[14] top-level scope
@ none:1
in expression starting at /root/.julia/packages/GDAL_jll/mKGP0/src/wrappers/x86_64-linux-musl-cxx11.jl:5
in expression starting at /root/.julia/packages/GDAL_jll/mKGP0/src/GDAL_jll.jl:2
ERROR: LoadError: Failed to precompile GDAL_jll [a7073274-a066-55f0-b90d-d619367d196c] to /root/.julia/compiled/v1.6/GDAL_jll/jl_AKFeLI.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1385
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1329
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1043
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:936
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:923
[7] include
@ ./Base.jl:386 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base ./loading.jl:1235
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:360 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[12] top-level scope
@ none:1
in expression starting at /root/.julia/packages/GDAL/wjbw2/src/GDAL.jl:1
`
The text was updated successfully, but these errors were encountered: