Changeset 32909 for gs2-extensions


Ignore:
Timestamp:
2019-03-15T22:35:54+13:00 (5 years ago)
Author:
ak19
Message:

Rebuilding linux imagemagick tarball after testing GS3 binary on Ubuntu 18.04 showed that its imagemagick installation was broken because identify linked to a png library on the system, which then needed a different version of libz as it found the one included incompatible and nothing compatible on the syste. And so the identify command in the bundled imagemagick failed. During the course of producing a new ImageMagick tarball, I went through the checks in the README written since the El Capitan tarball was created which required the binary ImageMagicks that we bundle to support GIF, JPEG, PNG and TIFF. However the old and locally rebuilt ImageMagick tarball didn't have TIFF support. In order to get TIFF support in the Linux ImageMagick tarball (which we didn't have before), needed to switch to a newer ImageMagick version at least. However, I first tried switching to a newer tiff library and left that in as the date for the newer ImageMagick match better with the date for the newer tiff. Upgrading Tiff from 3.9.4 to versions 3.9.7 and 4.0.7 made no difference. Neither did 4.0.10, until Imagemagick got upgraded alongside to 6.9.10-33. Then ImageMagick finally had tiff support and so listed tiff among its delegates. The older ImageMagick 6.9.5.4 worked with tiff-3.9.4 on El Capitan to produce Imagemagick binaries with tiff support. In case El Capitan breaks with the update, we can switch back to those versions for El Capitan.

Location:
gs2-extensions/imagemagick/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/imagemagick/trunk/README

    r32016 r32909  
    25253. See section THINGS TO CHECK below and perform the tests there to check the compiled up imagemagick works.
    2626
    27 4. Create an imagemagick folder containing only setup.bash, setup.bat and the darwin folder.
     274. Create an imagemagick folder containing only setup.bash, setup.bat and the darwin folder (or the "linux" folder on linux machines).
    2828
    29 The darwin folder should only contain the following 4 folders, so remove the rest:
     294a. (This seems to be a Darwin-only step, as we don't cut-down the products in the linux folder the same way.)
     30The darwin folder from step 4 should only contain the following 4 folders, so remove the rest:
    3031- script
    3132- etc
    3233- lib
    3334- bin: cut down to just the following
     35  convert
     36  identify
     37  Magick-config
    3438  Magick++-config
    35   Magick-config
    3639  MagickCore-config
    3740  MagickWand-config
    3841  Wand-config
    39   identify
    40   convert
    4142
    4243Note: As per the El Capitan release-kit (kits/rk3/ant-scripts/compile.xml), only the darwin folder within the tarball (and not the setup scripts) will get copied over as the "imagemagick" folder into gs2build/bin/darwin. (So the "darwin" folder will be named "imagemagick" in the final binary.)
     
    5152THINGS TO CHECK
    5253
    53 To test imagemagick works:
     54To test imagemagick works
     55
     560. cd into src/<OS>/bin
    5457
    55581. ./identify -list format
     
    161164-rwxrwxr-x  1 anupama  wheel  9653688 24 Aug 14:03 identify
    162165
     166------------------------------------------------------------------------
     16715 Mar 2019
     168ak19
     169
     170On an Ubuntu 18.04 VM, we found that GLI launched and said imagemagick wasn't installed (despite being bundled) and it would have to find a system version.
     171
     172The included imagemagick was from a tarball, and when you ran "gs-magick.pl identify", the problem it was finding a system libpng which resulted in the secondary problem that this system libpng then required a different zlib from the bundled zlib:
     173
     174~/GS309_21Feb2019$ gs-magick.pl identify
     175identify: /home/anupama/GS309_21Feb2019/gs2build/bin/linux/imagemagick/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
     176
     177
     178Since the linux 64 tarball of imagemagick had been built 6 years ago, while the El Capitan imagemagick tarball was built 2 years ago, we hoped that rebuilding imagemagick again would produce a more static binary that would then bypass the above issue.
     179
     180Although imagemagick compiled successfully,
     181* the command "identify -list format" under section THINGS TO CHECK above, did not include TIFF as one of the supported formats. We require support for gif, jp(e)g, png and tiff.
     182* and the command "convert -list configure" did not list "tiff" among the delegates in the DELEGATES line, see https://imagemagick.org/discourse-server/viewtopic.php?t=20635
     183
     184The imagemagick config.log showed that there were errors with tiff when configuiring imagemagick.
     185Searching through ImageMagick's config.log for occurrences of --with-tiff showed that despite --with-tiff being switched on, it got switched off because of failed configure tests. (See https://imagemagick.org/discourse-server/viewtopic.php?t=18039)
     186
     187PROBLEM AND SOLUTION:
     188That was with tiff-3.9.4.tar.gz and ImageMagick-6.9.5-4.tar.gz, which was fine on El Capitan but not on Linux where TIFF was not supported (not just Ubuntu v18.04 but also v16.04).
     189* The suggestion at http://lists.endsoftwarepatents.org/archive/html/discuss-gnustep/2001-07/msg00025.html was not helpful: we already appended -lz to our LDFLAGS for ImageMagick to help tiff along on Macs. The same line was already active for Linux too. And preceding the -lz with the insertion of -ltiff made no meaningful difference.
     190* Just hiking up the tiff version gradually to tiff-4.0.10 (downloadable along with intermediate versions from https://download.osgeo.org/libtiff/ with tiff 4.0.10 being the latest) made no difference.
     191* But in conjunction with ImageMagick-6.9.10-33.tar.gz, the most conservative version available at https://imagemagick.org/download/, compiled successfully with tiff-4.0.10, so that TIFF was now finally a listed format and had "rw" support when `identify -list format` is run. And doing "./convert logo: logo.tiff" followed by "file logo.tiff" shows the logo.tiff file resulting from the conversion to indeed be a TIFF file.
     192
     193
     194It is possible that versions of ImageMagick and Tiff intermediate to those above would succeed as well, but that will be a rather long experiment with too many combinations of ImageMagick and Tiff. Since the GS3 tutorials still need to be tested on Mac and Linux machines, I'll see if the tarball can be successfully created on the linux-64bit lsb machine and works on Ubuntu 18.04.
     195
     196------------------------------------------------------------------------
  • gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/IMAGEMAGICK.sh

    r31145 r32909  
    22
    33package=ImageMagick
    4 version=-6.9.5-4
     4#version=-6.9.5-4
     5version=-6.9.10-33
    56
    67progname=$0
  • gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/TIFF.sh

    r30675 r32909  
    22
    33package=tiff
    4 version=-3.9.4
     4#version=-3.9.4
     5version=-4.0.10
    56
    67progname=$0
Note: See TracChangeset for help on using the changeset viewer.