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

Error in library libgmt installation #14

Closed
mforets opened this issue Feb 19, 2018 · 4 comments
Closed

Error in library libgmt installation #14

mforets opened this issue Feb 19, 2018 · 4 comments

Comments

@mforets
Copy link

mforets commented Feb 19, 2018

Hi,
do you have some idea how to fix the error below?

julia> using GMT

julia> plot(collect(1:10),rand(10), lw=1, lc="blue", fmt="png", marker="square",
            markeredgecolor=0, size=0.2, markerfacecolor="red", title="Hello World",
            x_label="Spoons", y_label="Forks", show=true)
ERROR: ccall: could not find function gmt_manage_workflow in library libgmt
Stacktrace:
 [1] gmt_manage_workflow(::Ptr{Void}, ::Int64, ::Ptr{Void}) at /Users/forets/.julia/v0.6/GMT/src/libgmt.jl:388
 [2] gmt(::String, ::Array{Float64,2}, ::Vararg{Array{Float64,2},N} where N) at /Users/forets/.julia/v0.6/GMT/src/gmt_main.jl:152
 [3] read_data(::Array{Any,1}, ::String, ::Array{Float64,2}, ::String, ::String, ::String, ::String) at /Users/forets/.julia/v0.6/GMT/src/common_options.jl:918
 [4] #xy#97(::String, ::Array{Any,1}, ::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::String, ::Array{Float64,2}) at /Users/forets/.julia/v0.6/GMT/src/psxy.jl:129
 [5] (::GMT.#kw##xy)(::Array{Any,1}, ::GMT.#xy, ::String, ::Array{Float64,2}) at ./<missing>:0
 [6] #plot#112(::String, ::Array{Any,1}, ::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::Array{Int64,1}, ::Array{Float64,1}) at /Users/forets/.julia/v0.6/GMT/src/plot.jl:108
 [7] (::GMT.#kw##plot)(::Array{Any,1}, ::GMT.#plot, ::Array{Int64,1}, ::Array{Float64,1}) at ./<missing>:0

My system is a Mac OSX 10.11.6, and i did a $ brew install gmt. Strangely enough, the plot command of above was working until i updated some packages with Pkg.update(). Perhaps i should try deleting and reinstalling the command line tool and the julia package?

@joa-quim
Copy link
Member

Ok, What is happening is the following. To the master version of GMT.jl slipped one instruction that works only with the (soon) future GMT6. Think I fixed this case so try do a Pkg.checkout("GMT").

@mforets
Copy link
Author

mforets commented Feb 19, 2018

Great, thanks. Now i'm getting a different error (perhaps an issue with my julia version? Version 0.6.1 (2017-10-24 22:15 UTC))

julia> using GMT

julia> plot(collect(1:10),rand(10), lw=1, lc="blue", fmt="png", marker="square",
            markeredgecolor=0, size=0.2, markerfacecolor="red", title="Hello World",
            x_label="Spoons", y_label="Forks", show=true)
ERROR: MethodError: no method matching lowercase(::Tuple{String,String})
Closest candidates are:
  lowercase(::Char) at strings/utf8proc.jl:200
  lowercase(::AbstractString) at strings/basic.jl:415
Stacktrace:
 [1] gmt(::String) at /Users/forets/.julia/v0.6/GMT/src/gmt_main.jl:171
 [2] showfig(::String, ::String, ::String, ::Bool, ::String) at /Users/forets/.julia/v0.6/GMT/src/common_options.jl:957
 [3] finish_PS_module(::Dict{Symbol,Any}, ::Array{String,1}, ::String, ::Array{Float64,2}, ::Array{Any,1}, ::Int64, ::String, ::String, ::String, ::Bool, ::String) at /Users/forets/.julia/v0.6/GMT/src/common_options.jl:1080
 [4] #xy#97(::String, ::Array{Any,1}, ::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::String, ::Array{Float64,2}) at /Users/forets/.julia/v0.6/GMT/src/psxy.jl:246
 [5] (::GMT.#kw##xy)(::Array{Any,1}, ::GMT.#xy, ::String, ::Array{Float64,2}) at ./<missing>:0
 [6] #plot#112(::String, ::Array{Any,1}, ::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::Array{Int64,1}, ::Array{Float64,1}) at /Users/forets/.julia/v0.6/GMT/src/plot.jl:108
 [7] (::GMT.#kw##plot)(::Array{Any,1}, ::GMT.#plot, ::Array{Int64,1}, ::Array{Float64,1}) at ./<missing>:0

@joa-quim
Copy link
Member

Hmm, sorry my fault. Please update and try again. But notice that the master version may fail time to time.
For example, to run the tests I'm obliged to use the GMT6dev version and that is set in the GMT.jl file. You'll see there a line with

const GMTver = 5.0
or
const GMTver = 6.0

Since you have GMT5 you want the first setting but sometimes (e.g. for running the tests) I need to set it to 6.0. When you have the wrong combination julia will probably crash.

@mforets
Copy link
Author

mforets commented Feb 20, 2018

Great! It works now, thanks for the help.

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