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

Julia 1.6 Dependency "Snappy" Fails to build on Alpine Linux #40299

Closed
bryannagle opened this issue Apr 1, 2021 · 2 comments
Closed

Julia 1.6 Dependency "Snappy" Fails to build on Alpine Linux #40299

bryannagle opened this issue Apr 1, 2021 · 2 comments

Comments

@bryannagle
Copy link

Under Julia 1.6, dependency "Snappy" fails to build on Alpine Linux. It builds fine under buster (Ubuntu).

Steps to reproduce:

  1. Create a docker file that uses the Julia 1.6 alpine3.13 image, i.e. FROM julia:1.6.0-alpine3.13
  2. Create or use a julia module that has Snappy as a dependency.
  3. Have the docker file install dependencies, i.e. RUN julia -e "using Pkg;Pkg.activate(".");Pkg.instantiate()"

Log Example:
Installed PrettyTables ──────────────── v0.11.1
Installed Requires ──────────────────── v1.1.3
Installed HTTP ──────────────────────── v0.9.5
Installed FilePathsBase ─────────────── v0.9.10
Installed CSV ───────────────────────── v0.8.4
Installed AWS ───────────────────────── v1.32.0
Building Snappy ───→ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/25620a91907972a05863941d6028791c2613888e/build.log
ERROR: Error building Snappy:
[ Info: Directory /root/.julia/packages/Snappy/O2CHr/deps/usr/lib does not exist!
ERROR: LoadError: Your platform x86_64-linux-musl is not supported by this package!
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ ~/.julia/packages/Snappy/O2CHr/deps/build.jl:33
[3] include(fname::String)
@ Base.MainInclude ./client.jl:444
[4] top-level scope
@ none:5
in expression starting at /root/.julia/packages/Snappy/O2CHr/deps/build.jl:24
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
[2] (::Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec})()
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1040
[3] withenv(::Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, ::Pair{String, String}, ::Vararg{Pair{String, B} where B, N} where N)
@ Base ./env.jl:161
[4] (::Pkg.Operations.var"#108#112"{String, Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec})()
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1540
[5] with_temp_env(fn::Pkg.Operations.var"#108#112"{String, Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec}, temp_env::String)
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1442
[6] (::Pkg.Operations.var"#107#111"{Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1515
[7] mktempdir(fn::Pkg.Operations.var"#107#111"{Pkg.Operations.var"#81#86"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
@ Base.Filesystem ./file.jl:729
[8] mktempdir(fn::Function, parent::String) (repeats 2 times)
@ Base.Filesystem ./file.jl:727
[9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project)
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1481
[10] build_versions(ctx::Pkg.Types.Context, uuids::Vector{Base.UUID}; verbose::Bool)
@ Pkg.Operations /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1021
[11] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1365
[12] instantiate
@ /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1276 [inlined]
[13] #instantiate#246
@ /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1272 [inlined]
[14] instantiate()
@ Pkg.API /buildworker/worker/package_musl64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1272
[15] top-level scope
@ none:1
The command '/bin/sh -c eval ssh-agent -s && ssh-add ./liquid_hudson && julia -e "using Pkg;Pkg.activate(".");Pkg.instantiate()"' returned a non-zero code: 1

@staticfloat
Copy link
Member

staticfloat commented Apr 1, 2021

This is because Snappy.jl has not been updated for a while, and needs to be updated to use Snappy_jll instead of the old binaries which have very limited platform support. Either that, or don't use a musl-based linux distribution and use a glibc-based one instead.

This issue is best resolved in the Snappy.jl repository, try opening an issue there and seeing if you can get one of the developers to update the package.

@staticfloat
Copy link
Member

I looked into it, and the upgrade was quite easy. Here is the pull request: JuliaIO/Snappy.jl#25

To install that particular version, simply run

pkg> add https://github.com/staticfloat/Snappy.jl#sf/jll_upgrade

This will install precisely that version; once a new version of Snappy.jl is released, you will want to free it to be managed by the package version resolver (so you can receive future updates), so you'll use pkg> free Snappy to no longer pin to this version exactly.

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