JuliaGeo / Proj.jl

Julia wrapper for the PROJ cartographic projections library
MIT License
48 stars 9 forks source link

Failed to precompile Proj4 on M1 #61

Closed AshtonSBradley closed 2 years ago

AshtonSBradley commented 2 years ago

This came up when trying to install GeoMakie.jl. However, I get it just installing Proj4

(@v1.7) pkg> add Proj4

ERROR: Failed to precompile Proj4 [9a7e659c-8ee8-5706-894e-f68f43bc57ea] to /Users/abradley/.julia/compiled/v1.7/Proj4/jl_6eSBAd.
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

on

julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.2.0)
  CPU: Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Environment:
  JULIA_PKG_DEVDIR = /Users/abradley/Dropbox/Julia/Dev
  JULIA_NUM_THREADS = 8

(@v1.7) pkg> st Proj4
      Status `~/.julia/environments/v1.7/Project.toml`
  [9a7e659c] Proj4 v0.7.6

I also get the same error on the Julia 1.8 beta-3.

asinghvi17 commented 2 years ago

See #57

AshtonSBradley commented 2 years ago

On 1.8-beta3 I get

[ Info: Precompiling Proj4 [9a7e659c-8ee8-5706-894e-f68f43bc57ea]
ERROR: LoadError: UndefVarError: libproj not defined
Stacktrace:
 [1] _get_release
   @ ~/.julia/packages/Proj4/mEdFr/src/proj_capi.jl:138 [inlined]
 [2] _version()
   @ Proj4 ~/.julia/packages/Proj4/mEdFr/src/Proj4.jl:31
 [3] top-level scope
   @ ~/.julia/packages/Proj4/mEdFr/src/Proj4.jl:35
 [4] include
   @ ./Base.jl:422 [inlined]
 [5] 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:1400
 [6] top-level scope
   @ stdin:1
in expression starting at /Users/abradley/.julia/packages/Proj4/mEdFr/src/Proj4.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Proj4 [9a7e659c-8ee8-5706-894e-f68f43bc57ea] to /Users/abradley/.julia/compiled/v1.8/Proj4/jl_kSEN5v.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1551
 [3] compilecache
   @ ./loading.jl:1495 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1199
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1084
 [6] macro expansion
   @ ./loading.jl:1064 [inlined]
 [7] macro expansion
   @ ./lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1028
visr commented 2 years ago

Would be great if you can confirm that M1 works on master (the renamed Proj.jl will be tagged in 3 days).

asinghvi17 commented 2 years ago

I can confirm that master compiles and passes all tests on M1.

AshtonSBradley commented 2 years ago

also confirmed

visr commented 2 years ago

Great, thanks!