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

GMT Julia and Ubuntu 18 #503

Closed
charperflow opened this issue Jan 26, 2021 · 1 comment
Closed

GMT Julia and Ubuntu 18 #503

charperflow opened this issue Jan 26, 2021 · 1 comment

Comments

@charperflow
Copy link

charperflow commented Jan 26, 2021

I know this is a well documented issue. I have followed all of the steps I could find, but I am still having a problem. My current steps to resolve this issue are shown below:

I am aware that installing GMT with Julia only adds the wrapper. I have downloaded GMT and followed the directions from its git repository: https://github.com/GenericMappingTools/gmt/blob/master/INSTALL.md.

GMT is installed and runs fine from my terminal. However whenever I try to use GMT in Julia I get the following message:

    You don't seem to have GMT installed and I don't install it automatically,
    so you will have to do it yourself.
    https://github.com/GenericMappingTools/gmt/blob/master/INSTALL.md#linux

This is a common problem where the solution is to show julia where my gmt library is. I did this by adding the following lines to my startup.jl:

    using Libdl
    push!(Libdl.DL_LOAD_PATH, "/usr/lib/x86_64-linux-gnu/libgmt.so.5")
    push!(Libdl.DL_LOAD_PATH, "/usr/lib/x86_64-linux-gnu/libgmt.so.5.4.3")

I added both paths because I was not sure which one was the correct library (running gmt --version says its version 5.4.3)

However, when I load GMT I get the same message as before. Furthermore when I do ] test GMT
I get the following error:

    You don't seem to have GMT installed and I don't install it automatically,
    so you will have to do it yourself.
    https://github.com/GenericMappingTools/gmt/blob/master/INSTALL.md#linux
    5.4.3
    ERROR: LoadError: UndefVarError: GMT_Get_Version not defined
    Stacktrace:
     [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
     [2] top-level scope at /home/charper/.julia/packages/GMT/3tQ7w/test/runtests.jl:17
     [3] include(::String) at ./client.jl:439
     [4] top-level scope at none:6
    in expression starting at /home/charper/.julia/packages/GMT/3tQ7w/test/runtests.jl:12
    ERROR: Package GMT errored during testing

Here are the first 20 ish lines of runtest.jl

    using GMT
    using Test
    
    try
    	run(`gmt --version`)	# Will fail if GMT is not installed.
    	global got_it = true
    catch
    	@test 1 == 1			# Let tests pass for sake of not triggering a PkgEval failure
    	global got_it = false
    end
    
    if (got_it)					# Otherwise go straight to end
    
    	const dbg2 = 3			# Either 2 or 3. 3 to test the used kwargs
    	const dbg0 = 0			# With 0 prints only the non-consumed options. Set to -1 to ignore this Vd
    
    	GMT.GMT_Get_Version();
    	ma=[0];mi=[0];pa=[0];
    	GMT.GMT_Get_Version(ma,mi,pa);
    	API = GMT.GMT_Create_Session("GMT", 2, GMT.GMT_SESSION_NOEXIT + GMT.GMT_SESSION_EXTERNAL);
    	GMT.GMT_Get_Ctrl(API);

Not sure what to do next, any help is appreciated!

@joa-quim
Copy link
Member

Sorry, this issue passed unnoticed to me since it was also in the forum. Issue solved, so I'm closing it.

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