All started when I decided to tell students to follow the official installing recommendations of using juliaup to install Julia. No problems in this first step (other than the slowness as comparing to install using the manual installer). But the true problems came when we tried to install and run GMT. Again, no problems with the install step (but see below) but when we tried to run the first example all computers with Windows errored when Ghostcript was called to convert the PostScript (that’s what GMT produces) into png. The error was about not finding libz.dll, though it is located in Julia’s bin dir. It sure is another of those compatibility issues that the OSs into that type of very misleading message.
Meanwhile, when I was finally able to reproduce the error in a VM, and very likely because very recently I added a new command to the pre-compilation workflow, I was faced wit another error:
makecpt [ERROR]: Unable to open file gmtapi_colors2cpt_9772.cpt file for writing
Now this is stranger and arises when the C lib tries to write that file to the temporary dir. So, a very odd permissions trouble came in.
Guess what. Installed the LTS version with the manual installer and no problems whatsoever. Not so surprising as the CI tests use that type of installation and never had a report of such type of errors.
Not sure where to open a issue to report this.
1 Like
More on the libz.dll issue. I think I found the problem. When on install with juliaup what gets into the path is:
C:\Users\j>where julia
C:\Users\j\AppData\Local\Microsoft\WindowsApps\julia.exe
and if we run this in the Windows cmd
C:\Users\j>C:\\Users\\j\\.julia\\artifacts\\bf8f14a072d574839afd40d235e4ce6cd9e91a78\\bin\\gs.exe
We get a popup window saying libz.dll was not found. And that is TRUE because it lives in the
C:\Users\j\.julia\juliaup\julia-1.12.5+0.x64.w64.mingw32\bin
which is not in the path. Now the same must happen when gs is called from within a Julia session. When I added the julia\bin to the path, everything run well. Both the cmd call as well as the julia/GMT commands.
C:\Users\j>where julia
C:\Users\j\.julia\juliaup\julia-1.12.5+0.x64.w64.mingw32\bin\julia.exe
C:\Users\j\AppData\Local\Microsoft\WindowsApps\julia.exe
C:\Users\j>C:\\Users\\j\\.julia\\artifacts\\bf8f14a072d574839afd40d235e4ce6cd9e91a78\\bin\\gs.exe
GPL Ghostscript 9.55.0 (2021-09-27)
Copyright (C) 2021 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
But the other problem (the permissions problem) is still there:
julia> bar(1:5, (20, 35, 30, 35, 27), width=0.5, color=:lightblue, limits=(0.5,5.5,0,40))
makecpt [ERROR]: Unable to open file gmtapi_colors2cpt_11240.cpt file for writing
ERROR: Something went wrong when calling the module. GMT error number = 8
This works perfectly fine when using a Julia installation done with manual installers down loaded from Manual Downloads
1 Like