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.11.1 and GMT 6.6.0 build error #1589

Open
chiyu-chiu opened this issue Nov 15, 2024 · 4 comments
Open

Julia 1.11.1 and GMT 6.6.0 build error #1589

chiyu-chiu opened this issue Nov 15, 2024 · 4 comments

Comments

@chiyu-chiu
Copy link

Hello,

I'm new to GMT with Julia, I have installed Julia 1.11.1 and GMT 6.6.0_76621d8_2024.11.14 in an ARM64 MacOS 15.1 environment.

But there is an error during precompilation while using the module. The following is the error message:

PkgPrecompileError: The following 2 direct dependencies failed to precompile:

GMT

Failed to precompile GMT [5752ebe1-31b9-557e-87aa-f909b540aa54] to "/Users/chiu/.julia/compiled/v1.11/GMT/jl_36suxf".
ERROR: LoadError: UndefVarError: _GMTver not defined in GMT
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/GMT/XtN6V/src/GMT.jl:62
[2] include
@ ./Base.jl:557 [inlined]
[3] 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, UInt128}}, source::Nothing)
@ Base ./loading.jl:2790
[4] top-level scope
@ stdin:5
in expression starting at /Users/chiu/.julia/packages/GMT/XtN6V/src/GMT.jl:1
in expression starting at stdin:5
GMTDataFramesExt

Failed to precompile GMTDataFramesExt [b0121151-b40e-578b-8798-214dacfa5da6] to "/Users/chiu/.julia/compiled/v1.11/GMTDataFramesExt/jl_zUFOiE".
ERROR: LoadError: UndefVarError: _GMTver not defined in GMT
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/GMT/XtN6V/src/GMT.jl:62
[2] include
@ ./Base.jl:557 [inlined]
[3] 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, UInt128}}, source::String)
@ Base ./loading.jl:2790
[4] top-level scope
@ stdin:5
in expression starting at /Users/chiu/.julia/packages/GMT/XtN6V/src/GMT.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile GMT [5752ebe1-31b9-557e-87aa-f909b540aa54] to "/Users/chiu/.julia/compiled/v1.11/GMT/jl_zyCnU8".
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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, isext::Bool)
@ Base ./loading.jl:3085
[3] (::Base.var"#1082#1083"{Base.PkgId})()
@ Base ./loading.jl:2492
[4] mkpidlock(f::Base.var"#1082#1083"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
[5] #mkpidlock#6
@ ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
[7] #invokelatest#2
@ ./essentials.jl:1057 [inlined]
[8] invokelatest
@ ./essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1082#1083"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:3609
[10] maybe_cachefile_lock
@ ./loading.jl:3606 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:2488
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2315
[13] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[14] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2302
[16] macro expansion
@ ./loading.jl:2241 [inlined]
[17] macro expansion
@ ./lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2198
[19] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[20] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2191
[22] include
@ ./Base.jl:557 [inlined]
[23] 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, UInt128}}, source::Nothing)
@ Base ./loading.jl:2790
[24] top-level scope
@ stdin:5
in expression starting at /Users/chiu/.julia/packages/GMT/XtN6V/ext/GMTDataFramesExt/GMTDataFramesExt.jl:1
in expression starting at stdin:5

Any help would be much appreciated. Thanks you.

@joa-quim
Copy link
Member

Hard to tell because I don't have access to one of those machines and the CI tests build fine on the MacOS provided by the Github servers.

But, let's try to debug it. What does this print on the Julia REPL?

readlines(`gmt --version`)

What is the contents of this file in you system?

/Users/chiu/.julia/packages/GMT/XtN6V/deps/deps.jl

You said "I'm new to GMT with Julia". Does this mean that you are command line GMT user and have GMT previously installed in your computer?

@chiyu-chiu
Copy link
Author

Hi, Joaquim,

Thanks for your response. I have utilized GMT shell scripts for many years; however, I now intend to transition my scripts to Julia due to its convenient interface for handling input and output data.

After following your suggestion, the result was shown as the following:

julia> readlines(gmt --version)
1-element Vector{String}:
"6.6.0_76621d8_2024.11.14"

But there was no contents of the "deps.jl" file on my system.

@joa-quim
Copy link
Member

I have utilized GMT shell scripts for many years; however, I now intend to transition my scripts to Julia due to its convenient interface for handling input and output data.

Good, and good decision (I don't use GMT CLI anymore)

But there was no contents of the "deps.jl" file on my system

That is the real cause of the pre-compiling error. Something went wrong when running the build.jl file. Can you please do

import Pkg
build(GMT)

and see if any revealing error message pops up

@joa-quim
Copy link
Member

joa-quim commented Jan 6, 2025

Ping

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