GMT.jl errors when trying to plot- problem with PNG?

For some reason, I cannot get GMT.jl to work. When I attempt to do the “Hello, World” example plot I get the following message:

Error: /undefined in PSL_movie_label_completion

 (skipping the stacktrace...)

ERROR: Something went wrong when calling the module. GMT error number = 78

The “Hello round world” plot also only fails on the plot! command with PNG formatting. I think this is a problem with GMT.jl because I was able to successfully run several of the GMT examples straight from the shell with no errors. I drilled down into the tests and found that I get the exact same error for lines 342 and 343 in runtests.jl, which are

	logo(GMTjulia=2, savefig="logo.PNG")
	logo(GMTjulia=2, savefig="logo.PNG", fmt=:PNG)

And line 489

	grdcontour(G, axis="a", fmt="png", color=cpt, pen="+c", X=1, Y=1, N=true, U=[])

and line 1224

grdcontour(G, axis="a", color=cpt, pen="+c", fmt=:png, savefig="lixo")

I don’t know nearly enough to diagnose the problem, but it is suspicious to me that they all use PNG format. This is with GMT.jl v0.25.0 on Ubuntu 20.04 with GMT v6.0.0 from the repos. I also compiled Julia from source (to avoid another issue) and the versioninfo() is

Julia Version 1.5.2
Commit 539f3ce943* (2020-09-23 23:17 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-10.0.1 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 8

Any thoughts?

Hi,
For troubles like this the best is to use the issues in the GMT.jl github, or even better, the GMT forum.

It’s not clear to me what is happening but things point to a ghostscript trouble.
GMT produces only postscript, and when users ask for a different format (png here), the ps file is converted via a ghostscript call. The default ps file is always written in /tmp/GMTjl_tmp.ps. Does that file display correctly?

Okay, I will keep that in mind for the future, I just didn’t want to open a Github issue if in fact this problem turns out to be a problem only for me and my setup. The file /tmp/GMTjl_tmp.ps does exist, but my postscript reader (evince) cannot seem to open it and just spins. I do have several PDFs that saved from my tests with command line gmt, so that did appear to work.

Thanks, that’s a good thinking. As I said, the best is to post in the GMT forum and append the ps file. Command line GMT and GMT.jl all end up in the same machinery, so we need to look at the ps file to see if there is a problem.

Will do, thanks.

[Moving thread to GMT Discourse here]