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

Macports now has gs 9.50 so no need to build separately #1993

Closed
wants to merge 1 commit into from

Conversation

PaulWessel
Copy link
Member

We can now use the macports version of gs in our bundle building. @seisman, I built a test gmt-6.0.1-darwin-x86_64.dmg in the usual ftp dir if you want to check. This gs uses libgs.dylib and a symbolic link gs to gsc which is the ghostcsript application in macports. Worked for me, and a basic plot worked.

We can now use the macports version of gs in our bundle bulding.
@seisman
Copy link
Member

seisman commented Nov 6, 2019

gs doesn't work:

GPL Ghostscript 9.50: Can't find initialization file gs_init.ps.

The search path of the macports gs is:

   /usr/local/Cellar/ghostscript/9.50/share/ghostscript/9.50/Resource/Init :
   /usr/local/Cellar/ghostscript/9.50/share/ghostscript/9.50/lib :
   /usr/local/Cellar/ghostscript/9.50/share/ghostscript/9.50/Resource/Font :
   /usr/local/Cellar/ghostscript/9.50/share/ghostscript/fonts :
   /usr/local/Cellar/ghostscript/9.50/share/fonts/default/ghostscript :
   /usr/local/Cellar/ghostscript/9.50/share/fonts/default/Type1 :
   /usr/local/Cellar/ghostscript/9.50/share/fonts/default/TrueType :
   /usr/lib/DPS/outline/base : /usr/openwin/lib/X11/fonts/Type1 :
   /usr/openwin/lib/X11/fonts/TrueType

while the gs search path in the 6.0.0 bundle (your own build) is:

Search path:
   %rom%Resource/Init/ : %rom%lib/ :
   /opt/share/ghostscript/9.50/Resource/Init :
   /opt/share/ghostscript/9.50/lib :
   /opt/share/ghostscript/9.50/Resource/Font :
   /opt/share/ghostscript/fonts : /opt/share/fonts/default/ghostscript :
   /opt/share/fonts/default/Type1 : /opt/share/fonts/default/TrueType :
   /usr/lib/DPS/outline/base : /usr/openwin/lib/X11/fonts/Type1 :
   /usr/openwin/lib/X11/fonts/TrueType : /usr/share/cups/fonts

The macports gs doesn't search %rom%Resource/Init and %rom%lib because macports uses the option --disable-compile-inits when building.

@PaulWessel
Copy link
Member Author

OK, maybe now you need to set GS_LIB=.....

@seisman
Copy link
Member

seisman commented Nov 6, 2019

No luck. gs needs more parameters than we thought.

@PaulWessel
Copy link
Member Author

Stoopid stuff. So per man page:

  1. the directories specified by the -I switches in the command line (see below), if any;
  2. the directories specified by the GS_LIB environment variable, if any;
  3. the directories specified by the GS_LIB_DEFAULT macro in the Ghostscript makefile when the executable was built. When gs is built on Unix, GS_LIB_DEFAULT is usually "/usr/local/share/ghostscript/#.##:/usr/local/share/ghostscript/fonts" where "#.##" represents the Ghostscript version number.

But GS_LIB is supposed to point to initialization files and fonts. Also GS_FONTPATH...

@PaulWessel
Copy link
Member Author

What did you set GS_LIB to? /Applicationsgmt.../share/ghostscript/9.50 ? Maybe add GS_FONTPATH to .../fonts ?

@seisman
Copy link
Member

seisman commented Nov 6, 2019

Followed your suggestion and still doesn't work.

Running gs gives:

GPL Ghostscript 9.50: Can't find initialization file gs_init.ps.

Setting GS_LIB:

export GS_LIB=/Applications/GMT-6.0.1.app/Contents/Resources/share/ghostscript/9.50/Resource/Init

Then gs reports something wrong with GenericResourceDir.

GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 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.

*** Warning: GenericResourceDir doesn't point to a valid resource directory.
               the -sGenericResourceDir=... option can be used to set this.

  ./base/gsicc_manage.c:1254: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:2272: gsicc_init_iccmanager(): cannot find default icc profile
**** Unable to open the initial device, quitting.

Running gs -sGenericResourceDir=/Applications/GMT-6.0.1.app/Contents/Resources/share/ghostscript/9.50/Resource/ gives:

GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 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.
  ./base/gsicc_manage.c:1254: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:2272: gsicc_init_iccmanager(): cannot find default icc profile
**** Unable to open the initial device, quitting.

@PaulWessel
Copy link
Member Author

Looks like the macports gs installation is not relocatable.

@seisman
Copy link
Member

seisman commented Nov 6, 2019

Yes, the homebrew gs is also not relocatable.

@PaulWessel
Copy link
Member Author

OK, so we will stick with our own compiled version and delete this PR.

@seisman seisman closed this Nov 6, 2019
@seisman seisman deleted the updatebuildscript branch November 6, 2019 19:01
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

Successfully merging this pull request may close these issues.

None yet

2 participants