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

Cause of error: GMT_Create_Session not defined #402

Closed
anmiri opened this issue Jul 22, 2020 · 5 comments
Closed

Cause of error: GMT_Create_Session not defined #402

anmiri opened this issue Jul 22, 2020 · 5 comments

Comments

@anmiri
Copy link

anmiri commented Jul 22, 2020

Hello! I'm new to GMT and somewhat new to Julia as well, so excuse my inexperience. I downloaded GMT for Windows64; it's in my system path and I can access it from the command prompt. I'm not sure what else could be wrong as I've tried all the fixes I could find in the issues so far (like push!(Libdl.DL_LOAD_PATH, "path/to/lib"). But there seems to be no problem with the path or precompiling.

The issue is that when I try to call a gmt function/module like coast (with any arguments), it returns the same error:
UndefVarError: GMT_Create_Session not defined.

Do you have any idea what might be causing this error?
Thanks a lot in advance!

PS. Sorry if this is not the right place to ask this. You guessed it, I'm also new to GitHub. If this isn't where I should post a question like this, I would really appreciate any suggestions on where to do so in the future. :)

@joa-quim
Copy link
Member

@anmiri Hope you will appreciate after this first quirk.

push!(Libdl.DL_LOAD_PATH, "path/to/lib")

That was (hopefully no more) for Unix only that is very messy in finding it own stuff.

Did you start with?

using GMT

@joa-quim
Copy link
Member

No, that error looks like a broken GMT.jl installation. The GMT_Create_Session is defined inside libgmt.jl, which is included by GMT.jl, so some of these look missing/corrupted.

@anmiri
Copy link
Author

anmiri commented Jul 22, 2020

Hi @joa-quim, yes, I realise it was for a messy case and not for Windows. I wanted to try it just in case; and I got the same error before I tried that, anyway.

I did do using GMT after installing the package and so on. It's doubly strange because when I type GMT_Create_Session in my REPL, it knows that this is a function and recognises it as part of the GMT package. Maybe I'll try uninstalling and reinstalling it.

Maybe I should mention that I'm using the GMT package within a specific environment (i.e. not my default environment) as I'm trying to manage my packages better. Do you think that could have corrupted the installation somehow?

@joa-quim
Copy link
Member

Hmm, what do you mean by your 3rd paragraph? The error you posted is strange (first time I see it) because it makes think the module is not loaded (GMT.jl file holds the module definition). Ofc running ] test GMT will fail as well?

@anmiri
Copy link
Author

anmiri commented Jul 22, 2020

I mean that I've activated a Project.toml for a specific environment (with activate . and instantiate). I'm not sure how else to explain it, but after uninstalling it and reinstalling it on my default environment (without activating an environment), it works! For some reason, the first installation was corrupted. It could be because of the environment issue, but I'm not sure. Closing the issue and thanks for your 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