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

GDAL and ArchGDAL do not compile on julia:1.6.2-alpine3.14 docker image #6557

Closed
msbahal opened this issue Apr 12, 2023 · 2 comments
Closed

Comments

@msbahal
Copy link

msbahal commented Apr 12, 2023

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:

  • Running on a Dell XPS with intel i7
  • Platform: x86_64

Things I have tried so far:

  • adding GDAL and other libraries locally with APK (its a nightmare as a lot of the packages are not available in 3.14's APK package manager)
  • using Julia 1.8 on a Alpine3.17 image and using Overrides.toml to make julia use the local installation of GDAL install of jlls. I get quite far with this but then the locally installed libgdal library fails with error 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
@giordano
Copy link
Member

I haven't tested it, but my educated guess is that this is a duplicate of JuliaLang/julia#40556, that issue offers a workaround.

We use a Linux Alpine image for our production servers

Note that Linux x86_64 Musl is a tier 2 platform, might not be the best choice for production usage.

@ViralBShah
Copy link
Member

Closing as old.

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

3 participants