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

Windows tests are broken because gm can't find gs #4231

Closed
seisman opened this issue Sep 18, 2020 · 12 comments
Closed

Windows tests are broken because gm can't find gs #4231

seisman opened this issue Sep 18, 2020 · 12 comments
Labels
bug Something isn't working

Comments

@seisman
Copy link
Member

seisman commented Sep 18, 2020

Now all Windows tests are broken, most likely because gs changes its version scheme.

C:\Program Files\GraphicsMagick-1.3.32-Q8\gm.exe compare: Failed to find Ghostscript (not installed?). ("" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r200x200 -g1700x2200 "-sOutputFile=C:\Users\VSSADM~1\AppData\Local\Temp\gmfCMNSq" -- "C:\Users\VSSADM~1\AppData\Local\Temp\gm4AN0ch" -c quit).
test/grdview/categorical.ps: RMS Error = NA [FAIL]
memtrack errors: 0
exit status: 1
@seisman seisman changed the title Windows tests are broken because gm can Windows tests are broken because gm can't find gs Sep 18, 2020
@seisman seisman added the bug Something isn't working label Sep 18, 2020
@joa-quim
Copy link
Member

joa-quim commented Sep 18, 2020

I was wondering why that was not happening too. Yes, Artifex messed it all up.

@seisman
Copy link
Member Author

seisman commented Sep 18, 2020

Adding gs's bin to PATH doesn't fix the issue.

@PaulWessel
Copy link
Member

To what extent is this gm’s fault vs our setup? Does psconvert find gs?

@seisman
Copy link
Member Author

seisman commented Sep 18, 2020

After @joa-quim's PR #4223, psconvert can find gs correctly. For example:

psconvert [DEBUG]: Running: @"C:\Program Files\gs\gs9.53.1\bin\gswin64c.exe" -q -dNOPAUSE -dBATCH -dNOSAFER -dPDFSETTINGS=/prepress -dDownsampleColorImages=false -dDownsampleGrayImages=false -dDownsampleMonoImages=false -dUseFlateCompression=true -dEmbedAllFonts=true -dSubsetFonts=true -dMonoImageFilter=/FlateEncode -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dSCANCONVERTERTYPE=2 -dALLOWPSTRANSPARENCY -dMaxBitmap=2147483647 -dUseFastColor=true -sDEVICE=pdfwrite  -g3254x1433 -r720 -sOutputFile="map.pdf" "C:/Users/VssAdministrator/.gmt/sessions/gmt_session.3344/psconvert_3132d.eps"
psconvert [DEBUG]: Delete C:/Users/VssAdministrator/.gmt/sessions/gmt_session.3344/psconvert_3132d.eps
psconvert [DEBUG]: Final input buffer length was 256

But gm still says:

C:\Program Files\GraphicsMagick-1.3.32-Q8\gm.exe compare: Failed to find Ghostscript (not installed?). ("" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r200x200 -g1700x2200 "-sOutputFile=C:\Users\VSSADM~1\AppData\Local\Temp\gmNhIiPf" -- "C:\Users\VSSADM~1\AppData\Local\Temp\gmndt4uz" -c quit).
doc/scripts/GMT_tut_13.ps: RMS Error = NA [FAIL]
memtrack errors: 0
exit status: 1

@PaulWessel
Copy link
Member

Maybe post or email GM developer?

@seisman
Copy link
Member Author

seisman commented Sep 18, 2020

The Windows CI is using gm 1.3.32 but the latest is 1.3.35. Will try if GM 1.3.35 works or not.

@seisman
Copy link
Member Author

seisman commented Sep 19, 2020

Tried GM 1.3.35. It can find gs 9.52 but can't find gs 9.53.1.

@PaulWessel
Copy link
Member

Is this still a problem or can it be closed?

@seisman
Copy link
Member Author

seisman commented Nov 11, 2020

It's still a problem.

@amagamedov-sas
Copy link

GM is trying to find Ghostscript by reading the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\X.XX" where X is a digit. Ghostscript changed versioning by adding additional subversion and now creates keys like "GPL Ghostscript\X.XX.X" I just created new registry key like "GPL Ghostscript\9.54" and copied all values from "GPL Ghostscript\9.54.0" key. I checked GM source code and found that they are searching the registry for "GPL Ghostscript\X.XX" pattern only. Originally I got this issue with GS 9.53.3
GS

@seisman
Copy link
Member Author

seisman commented Jun 25, 2021

The problem was reported to GM in https://sourceforge.net/p/graphicsmagick/bugs/636/ and a fix was committed.

I think the next GraphicsMagick release (1.3.37) should work with the latest Ghostscript versions, but we have to wait for the new GM release.

@joa-quim
Copy link
Member

Can we close this now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants