Bug 201726 - graphics/ImageMagick-noX11: Updating fails, because installing ghostscript9-noX11 fails (duplicate install during update process?)
Summary: graphics/ImageMagick-noX11: Updating fails, because installing ghostscript9-n...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 22:41 UTC by Christoph Sold
Modified: 2016-08-10 10:22 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Sold 2015-07-20 22:41:34 UTC
Upgrading ports/ImageMagick-noX11 fails as follows:
pre-install check cannot locate ghostscript9, but installing it fails fails because it is already installed. Another -noX11 problem like bug #199268?

Build output follows. 
cs@home[ports/graphics/ImageMagick]% sudo make all install clean
===>   ImageMagick-nox11-6.9.1.9,1 depends on executable: gmake - found
===>   ImageMagick-nox11-6.9.1.9,1 depends on executable: pkgconf - found
===>   ImageMagick-nox11-6.9.1.9,1 depends on file: ghostscript9>=0 - not found
===>  Installing for ghostscript9-nox11-9.06_10
===>   ghostscript9-nox11-9.06_10 depends on file: /usr/local/share/ghostscript/fonts/a010013l.pfb - found
===>   ghostscript9-nox11-9.06_10 depends on shared library: libexpat.so - found (/usr/local/lib/libexpat.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libidn.so - found (/usr/local/lib/libidn.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libjbig2dec.so - found (/usr/local/lib/libjbig2dec.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libtiff.so - found (/usr/local/lib/libtiff.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: liblcms2.so - found (/usr/local/lib/liblcms2.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libpaper.so - found (/usr/local/lib/libpaper.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libvga.so - found (/usr/local/lib/libvga.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so)
===>   ghostscript9-nox11-9.06_10 depends on shared library: libjpeg.so - found (/usr/local/lib/libjpeg.so)
===>  Checking if ghostscript9-nox11 already installed
===>   ghostscript9-nox11-9.06_10 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of ghostscript9-nox11
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/print/ghostscript9
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/print/ghostscript9
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/ImageMagick
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/ImageMagick
Comment 1 Christoph Sold 2015-07-20 23:45:33 UTC
After manually reinstalling graphics/ghostscript9-nox11, ImageMagick fails to detect the already installed port during installation:

cs@home[ports/graphics/ImageMagick]% pkg info -a | grep ghost
ghostscript9-nox11-9.06_10     Ghostscript 9.x PostScript interpreter
cs@doppelhertz[ports/graphics/ImageMagick]% sudo portmaster ImageMagick
   [...many lines omitted...|
====> Compressing man pages (compress-man)
===>  Installing for ghostscript9-nox11-9.06_10
===>  Checking if ghostscript9-nox11 already installed
===>   ghostscript9-nox11-9.06_10 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of ghostscript9-nox11
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/print/ghostscript9
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/print/ghostscript9
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/ImageMagick
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/ImageMagick

===>>> make build failed for graphics/ImageMagick
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> graphics/ImageMagick
Comment 2 Matthias Pfaller 2015-07-21 12:11:26 UTC
The following patch will resolve the problem:
--- Makefile~   2015-07-18 22:30:49.000000000 +0200
+++ Makefile    2015-07-21 14:02:05.932470957 +0200
@@ -356,7 +356,11 @@
 
 # PDF (Adobe Portable Document Format) support
 .if ${PORT_OPTIONS:MPDF}
+. if ${PORT_OPTIONS:MX11}
 USES+=                 ghostscript
+. else
+USES+=                 ghostscript:nox11
+. endif
 .endif
 
 .if ! ${PORT_OPTIONS:MX11}
Comment 3 Laurence 'GreenReaper' Parry 2015-07-23 18:22:36 UTC
This issue affected me, and the modifications within in #2 allow the installation to proceed (although the patch didn't want to apply for me, possibly due to copy-paste differences).
Comment 4 Christoph Sold 2015-08-08 14:13:42 UTC
(In reply to Matthias Pfaller from comment #2)

Retried using  
   # $FreeBSD: head/graphics/ImageMagick/Makefile 393436 2015-08-02 18:13:16Z kwm $
Proposed patch is present in ports Makefile.
Problem persists.

  cs@home[~]% sudo portmaster -a
    <snip>
   ===>>> The following actions will be taken if you choose to proceed:
           Upgrade ImageMagick-nox11-6.9.1.9,1 to ImageMagick-nox11-6.9.1.10_1,1
           Install print/ghostscript9-nox11
   ===>>> Proceed? y/n [y] n
   <snip>
   cs@home[~]% pkg info -a|grep ghostsc
   ghostscript9-nox11-9.06_10     Ghostscript 9.x PostScript interpreter
Comment 5 Christoph Sold 2015-08-08 14:14:40 UTC
(In reply to Matthias Pfaller from comment #2)

Retried using  
   # $FreeBSD: head/graphics/ImageMagick/Makefile 393436 2015-08-02 18:13:16Z kwm $
Proposed patch is present in ports Makefile.
Problem persists.

  cs@home[~]% sudo portmaster -a
    <snip>
   ===>>> The following actions will be taken if you choose to proceed:
           Upgrade ImageMagick-nox11-6.9.1.9,1 to ImageMagick-nox11-6.9.1.10_1,1
           Install print/ghostscript9-nox11
   ===>>> Proceed? y/n [y] n
   <snip>
   cs@home[~]% pkg info -a|grep ghostsc
   ghostscript9-nox11-9.06_10     Ghostscript 9.x PostScript interpreter
Comment 6 VK freebsd_triage 2015-08-09 12:06:05 UTC
I actually have different error with ghostscript9 when building ImageMagick:

===>   Installing existing package /packages/All/ghostscript9-nox11-9.06_10.txz
[cherri.irealone.com] Installing ghostscript9-nox11-9.06_10...
[cherri.irealone.com] `-- Installing expat-2.1.0_2...
[cherri.irealone.com] `-- Extracting expat-2.1.0_2: .......... done
[cherri.irealone.com] `-- Installing freetype2-2.6_1...
[cherri.irealone.com] `-- Extracting freetype2-2.6_1: .......... done
[cherri.irealone.com] `-- Installing gsfonts-8.11_6...
[cherri.irealone.com] `-- Extracting gsfonts-8.11_6: .......... done
[cherri.irealone.com] `-- Installing jbig2dec-0.11_4...
[cherri.irealone.com] |   `-- Installing png-1.6.17_1...
[cherri.irealone.com] |   `-- Extracting png-1.6.17_1: .......... done
[cherri.irealone.com] `-- Extracting jbig2dec-0.11_4: .......... done
[cherri.irealone.com] `-- Installing jpeg-8_6...
[cherri.irealone.com] `-- Extracting jpeg-8_6: .......... done
[cherri.irealone.com] `-- Installing lcms2-2.7...
[cherri.irealone.com] |   `-- Installing tiff-4.0.4...
[cherri.irealone.com] |   | `-- Installing jbigkit-2.1_1...
[cherri.irealone.com] |   | `-- Extracting jbigkit-2.1_1: .......... done
[cherri.irealone.com] |   `-- Extracting tiff-4.0.4: .......... done
[cherri.irealone.com] `-- Extracting lcms2-2.7: .......... done
pkg-static: Missing dependency 'libidn-1.31'

Failed to install the following 1 package(s): /packages/All/ghostscript9-nox11-9.06_10.txz
*** Error code 70
Comment 7 VK freebsd_triage 2015-08-09 12:34:23 UTC
Just a quick reply to my comment in #6. I forced poudriere to rebuild ghostscript9-nox11, because it appears that for some reason a change in ImageMagick that made it a new dependency did not trigger a rebuild of ghostscript9-nox11.

Now ImageMagick builds fine (with poudriere), ghostscript9-nox11 builds fine, dns/libidn was added as a dependency (I have no idea why it wasn't added before with installation of gs, especially since this jail was created much after libidn addition to gs).
Comment 8 commit-hook freebsd_committer 2016-08-10 10:00:53 UTC
A commit references this bug:

Author: kwm
Date: Wed Aug 10 10:00:41 UTC 2016
New revision: 420002
URL: https://svnweb.freebsd.org/changeset/ports/420002

Log:
  Update ImageMagick7 to 7.0.2.7.

  Register indirect dependancies.

  PR:		201726 (based on)

Changes:
  head/graphics/ImageMagick7/Makefile
  head/graphics/ImageMagick7/distinfo
Comment 9 Koop Mast freebsd_committer 2016-08-10 10:22:05 UTC
Woops listed the wrong bug in the commit...

The whole ghostscript mess was reworked into something beter. So there will be no more conflict between the normal ghostscript and gs-nox11 port.