M1 Mac Faile to install BinaryProvider Package

When I try to run Julia on the new m1 mac, it would break from time to time. I checked if there is any package that’s broken, and found this after doing the precompile

Precompiling project...
  ✗ BinaryProvider
  0 dependencies successfully precompiled in 1 seconds (192 already precompiled)

anyone know how to compile the BinaryProivder package on the m1 Mac?

BinaryProvider is an old package which was developed way before M1 was even a thing to provide binary prebuilt libraries. There is no way anything using BinaryProvider is compatible with the architecture of your M1 anyway, so in a sense your question is pointless.

What package in particular is causing you this problem?

1 Like

I checked that GLPK used by JuMP is using the BinaryProvider.

In my experience GLPK still works on M1 even though BinaryProvider is not compiling.
Just try to run something using GLPK and ignore the statement that BinaryProvider did not compile.
I beleive the plan is to remove BinaryProvider dependency as it is not needed anymore in next version of JuMP.

2 Likes

Yes let me do so.

Yes, BinaryProvider will be dropped in an upcoming 1.0 release. For now it is safe to ignore the error message.

I’m having the same problem when trying to build the Parquet package, as the Snappy dependency depends on BinaryProvider. I don’t actually need to load Snappy-compressed Parquet. Does anybody know a way around this dependency to get Parquet to build? At the moment it seems impossible to load Parquet files in Julia on M1.

Can you please post the exact error message? Parquet.jl doesn’t depend directly on BinaryProvider, the error must be somewhere else.

Sorry, I meant that it seems to be a dependency of Snappy.jl, which depends on BinaryProvider.jl. Here’s the output:

julia> Pkg.build("Parquet")
    Building Snappy → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/25620a91907972a05863941d6028791c2613888e/build.log`
ERROR: Error building `Snappy`:
┌ Warning: Platform `arm64-apple-darwin21.2.0` is not an officially supported platform
└ @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
ERROR: LoadError: KeyError: key "unknown" not found
Stacktrace:
  [1] getindex
    @ ./dict.jl:481 [inlined]
  [2] parse_dl_name_version
    @ ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:511 [inlined]
  [3] detect_libgfortran_abi(libgfortran_name::String, platform::BinaryProvider.UnknownPlatform) (repeats 2 times)
    @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:555
  [4] detect_libgfortran_abi
    @ ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:584 [inlined]
  [5] detect_compiler_abi()
    @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:667
  [6] top-level scope
    @ ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:685
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] include(x::String)
    @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/BinaryProvider.jl:1
  [9] top-level scope
    @ ~/.julia/packages/BinaryProvider/U2dKK/src/BinaryProvider.jl:12
 [10] include
    @ ./Base.jl:418 [inlined]
 [11] 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:1318
 [12] top-level scope
    @ none:1
 [13] eval
    @ ./boot.jl:373 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [15] top-level scope
    @ none:1
in expression starting at /Users/michael/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:685
in expression starting at /Users/michael/.julia/packages/BinaryProvider/U2dKK/src/BinaryProvider.jl:1
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to /Users/michael/.julia/compiled/v1.7/BinaryProvider/jl_tfJcfe.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
 [7] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [8] top-level scope
   @ none:5
in expression starting at /Users/michael/.julia/packages/Snappy/O2CHr/deps/build.jl:1
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
  [2] (::Pkg.Operations.var"#62#67"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec})()
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:962
  [3] withenv(::Pkg.Operations.var"#62#67"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, ::Pair{String, String}, ::Vararg{Pair{String}})
    @ Base ./env.jl:172
  [4] (::Pkg.Operations.var"#99#103"{String, Bool, Bool, Bool, Pkg.Operations.var"#62#67"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec})()
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1506
  [5] with_temp_env(fn::Pkg.Operations.var"#99#103"{String, Bool, Bool, Bool, Pkg.Operations.var"#62#67"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec}, temp_env::String)
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1390
  [6] (::Pkg.Operations.var"#98#102"{Bool, Bool, Bool, Pkg.Operations.var"#62#67"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1469
  [7] mktempdir(fn::Pkg.Operations.var"#98#102"{Bool, Bool, Bool, Pkg.Operations.var"#62#67"{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:750
  [8] mktempdir(fn::Function, parent::String) (repeats 2 times)
    @ Base.Filesystem ./file.jl:748
  [9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project; force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1435
 [10] 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 /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1432
 [11] build_versions(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}; verbose::Bool)
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:943
 [12] build(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}, verbose::Bool)
    @ Pkg.Operations /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:822
 [13] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; verbose::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:992
 [14] build(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:149
 [15] build(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:144
 [16] #build#99
    @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [17] build
    @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [18] #build#98
    @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
 [19] build(pkg::String)
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:141
 [20] top-level scope
    @ REPL[2]:1

Wow, Snappy.jl was last touched 4 years ago… However there is a pull request which should help. You can try it out with

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

You may want to bump the pull request

Done, thank you! Indeed that version of Snappy.jl is installable, but attempting to install Parquet.jl leads to:

ERROR: Unsatisfiable requirements detected for package Parquet [626c502c]:
 Parquet [626c502c] log:
 ├─possible versions are: 0.2.0-0.8.3 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.2.0-0.8.3
 └─restricted by compatibility requirements with Snappy [59d4ed8c] to versions: uninstalled — no versions left
   └─Snappy [59d4ed8c] log:
     ├─possible versions are: 0.4.0 or uninstalled
     └─Snappy [59d4ed8c] is fixed to version 0.4.0

Right. That’s because the PR changed the version number to v0.4.0. Ok, next thing you can try just locally to make this work is this:

using Pkg
Pkg.develop(url="https://github.com/staticfloat/Snappy.jl")
cd(joinpath(Pkg.devdir(), "Snappy"))
run(`git checkout -b sf/jll_upgrade origin/sf/jll_upgrade`)

And now you can edit ~/.julia/dev/Snappy/Project.toml and change the version number to v0.3.1. This should get you working, but the maintainer of Snappy should eventually update the package

Phew, thanks, you really saved me here! I just had to make some adjustments due to this:

julia> Pkg.develop(url="https://github.com/staticfloat/Snappy.jl")
     Cloning git-repo `https://github.com/staticfloat/Snappy.jl`
ERROR: could not find project file in package at `https://github.com/staticfloat/Snappy.jl` maybe `subdir` needs to be specified
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
  [2] resolve_projectfile!(env::Pkg.Types.EnvCache, pkg::Pkg.Types.PackageSpec, project_path::String)
    @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:751
  [3] handle_repo_develop!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec, shared::Bool)
    @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:560
  [4] handle_repos_develop!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, shared::Bool)
    @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:601
  [5] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; shared::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:204
  [6] develop(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:149
  [7] develop(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:144
  [8] #develop#14
    @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
  [9] develop
    @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
 [10] develop(; name::Nothing, uuid::Nothing, version::Nothing, url::String, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:166
 [11] top-level scope
    @ REPL[14]:1

To get this working I did the following:

mkdir ~/.julia/dev && cd ~/.julia/dev
git clone https://github.com/staticfloat/Snappy.jl Snappy

Then in Julia:

cd(joinpath(Pkg.devdir(), "Snappy"))
run(`git checkout -b sf/jll_upgrade origin/sf/jll_upgrade`)

Then edited ~/.julia/dev/Snappy/Project.toml changing the version number to v0.3.1.

Then in Julia:

]develop Snappy
1 Like