jpjones76 / SeisIO.jl

Julia language support for geophysical time series data
http://seisio.readthedocs.org
Other
47 stars 21 forks source link

SeisIO v1.2.1 fails to compile on M1 Mac #93

Open haakon-e opened 1 year ago

haakon-e commented 1 year ago

There seems to be two sources of this issue, both related binaries / BinaryBuilder (see e.g. https://github.com/JuliaPackaging/Yggdrasil/issues/4105)

LightXML

This package is currently pinned to 0.8.1. Trying to precompile with that version leads to the following error:

LightXML error message ```julia (SeisIO) pkg> precompile Precompiling project... ✗ BinaryProvider ✗ HDF5 ✗ LightXML ✗ SeisIO 0 dependencies successfully precompiled in 3 seconds. 47 already precompiled. ERROR: The following 3 direct dependencies failed to precompile: HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to /Users/username/.julia/compiled/v1.8/HDF5/jl_D5wiSh. ERROR: LoadError: UndefVarError: libhdf5 not defined Stacktrace: [1] h5_get_libversion() @ HDF5 ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:39 [2] top-level scope @ ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:44 [3] include @ ./Base.jl:419 [inlined] [4] 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:1554 [5] top-level scope @ stdin:1 in expression starting at /Users/username/.julia/packages/HDF5/YX0jU/src/HDF5.jl:1 in expression starting at stdin:1 SeisIO [b372bb87-02dd-52bb-bcf6-c30dd83fd342] Failed to precompile SeisIO [b372bb87-02dd-52bb-bcf6-c30dd83fd342] to /Users/username/.julia/compiled/v1.8/SeisIO/jl_VPFNXy. ERROR: LoadError: LightXML is not properly installed. Run `Pkg.build("LightXML")` and restart Julia. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] top-level scope @ ~/.julia/packages/LightXML/W8FVT/src/LightXML.jl:6 [3] include @ ./Base.jl:419 [inlined] [4] 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:1554 [5] top-level scope @ stdin:1 in expression starting at /Users/username/.julia/packages/LightXML/W8FVT/src/LightXML.jl:2 in expression starting at stdin:1 ERROR: LoadError: Failed to precompile LightXML [9c8b4983-aa76-5018-a973-4c85ecc9e179] to /Users/username/.julia/compiled/v1.8/LightXML/jl_EjhqTM. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base ./loading.jl:1707 [3] compilecache @ ./loading.jl:1651 [inlined] [4] _require(pkg::Base.PkgId) @ Base ./loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base ./loading.jl:1200 [6] macro expansion @ ./loading.jl:1180 [inlined] [7] macro expansion @ ./lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base ./loading.jl:1144 [9] include @ ./Base.jl:419 [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::Nothing) @ Base ./loading.jl:1554 [11] top-level scope @ stdin:1 in expression starting at /Users/username/Documents/test/SeisIO.jl/src/SeisIO.jl:2 in expression starting at stdin:1 LightXML [9c8b4983-aa76-5018-a973-4c85ecc9e179] Failed to precompile LightXML [9c8b4983-aa76-5018-a973-4c85ecc9e179] to /Users/username/.julia/compiled/v1.8/LightXML/jl_w9BwdH. ERROR: LoadError: LightXML is not properly installed. Run `Pkg.build("LightXML")` and restart Julia. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] top-level scope @ ~/.julia/packages/LightXML/W8FVT/src/LightXML.jl:6 [3] include @ ./Base.jl:419 [inlined] [4] 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:1554 [5] top-level scope @ stdin:1 in expression starting at /Users/username/.julia/packages/LightXML/W8FVT/src/LightXML.jl:2 in expression starting at stdin:1 ```

Updating to 0.9.0 appears to resolve the issue.

HDF5

This package is currently pinned to 0.12.3 or 0.13. Trying to precompile with that version leads to the following error:

HDF5 error message ```julia (SeisIO) pkg> precompile Precompiling project... ✗ HDF5 ✗ SeisIO 0 dependencies successfully precompiled in 6 seconds. 50 already precompiled. ERROR: The following 2 direct dependencies failed to precompile: HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to /Users/username/.julia/compiled/v1.8/HDF5/jl_chOIJJ. ERROR: LoadError: UndefVarError: libhdf5 not defined Stacktrace: [1] h5_get_libversion() @ HDF5 ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:39 [2] top-level scope @ ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:44 [3] include @ ./Base.jl:419 [inlined] [4] 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:1554 [5] top-level scope @ stdin:1 in expression starting at /Users/username/.julia/packages/HDF5/YX0jU/src/HDF5.jl:1 in expression starting at stdin:1 SeisIO [b372bb87-02dd-52bb-bcf6-c30dd83fd342] Failed to precompile SeisIO [b372bb87-02dd-52bb-bcf6-c30dd83fd342] to /Users/username/.julia/compiled/v1.8/SeisIO/jl_xDakbk. WARNING: method definition for GenResp at /Users/username/Documents/test/SeisIO.jl/src/Types/InstResp.jl:69 declares type variable T but does not use it. ERROR: LoadError: UndefVarError: libhdf5 not defined Stacktrace: [1] h5_get_libversion() @ HDF5 ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:39 [2] top-level scope @ ~/.julia/packages/HDF5/YX0jU/src/HDF5.jl:44 [3] include @ ./Base.jl:419 [inlined] [4] 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:1554 [5] top-level scope @ stdin:1 in expression starting at /Users/username/.julia/packages/HDF5/YX0jU/src/HDF5.jl:1 in expression starting at stdin:1 ERROR: LoadError: Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to /Users/username/.julia/compiled/v1.8/HDF5/jl_mU2oQ3. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base ./loading.jl:1707 [3] compilecache @ ./loading.jl:1651 [inlined] [4] _require(pkg::Base.PkgId) @ Base ./loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base ./loading.jl:1200 [6] macro expansion @ ./loading.jl:1180 [inlined] [7] macro expansion @ ./lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base ./loading.jl:1144 [9] include(mod::Module, _path::String) @ Base ./Base.jl:419 [10] include(x::String) @ SeisIO ~/Documents/test/SeisIO.jl/src/SeisIO.jl:2 [11] top-level scope @ ~/Documents/test/SeisIO.jl/src/SeisIO.jl:141 [12] include @ ./Base.jl:419 [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::Nothing) @ Base ./loading.jl:1554 [14] top-level scope @ stdin:1 in expression starting at /Users/username/Documents/test/SeisIO.jl/src/Submodules/SeisHDF.jl:1 in expression starting at /Users/username/Documents/test/SeisIO.jl/src/SeisIO.jl:2 in expression starting at stdin:1 ```

Updating to at least 0.14.2 appears to resolve the issue.

Comment:

I was not able to test SeisIO after bumping the package versions due to the following error:

ERROR: LoadError: download failed. Is a command-line SVN client installed?

    (type "run(`svn --version`)"; if an error occurs, SVN isn't installed.)

    Subversion for Ubuntu: sudo apt install subversion
    Subversion for OS X: pkg_add subversion
    SlikSVN Windows client: https://sliksvn.com/download/

but at least the package loads.

Versioninfo:

julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores