Page 1 of 1

ImageMagick Configuration Broken

Posted: 2014-07-04T11:48:25-07:00
by Picklepaws
A couple days ago I decided I wanted to install Perl-Magick to do some scripting on my images. I seem to have broken ImageMagick's delegates and created multiple versions. I'm not entirely sure... I'm fairly new to linux. I traced back my command paths as best as I could and I will try to guide you along what I did.
**Note: I don't care or want the perl component anymore. I just want a working version of ImageMagick (namely with support for JPEG and PNG)

Before deciding to install Perl-Magick (from source), I had version 6.7.7 of ImageMagick and it worked great.
I pretty much followed the instructions here to install Perl-Magick.

http://www.imagemagick.org/script/perl-magick.php

Code: Select all

            tar xczf ImageMagick.tar.gz
            ./configure -with-perl
            make
            sudo make install
The make had an error, stating that I was missing lbperl (I think that's what it was. I don't have any output logs.)
So for whatever reason I thought moving to the imagemagick directory and trying again might fix it.

Code: Select all

            cd ImageMagick-6.8.9-5
            ./configure -with-perl
            make
            sudo make install
Make failed again so I thought moving the imagemagick directory to another directory might fix it.

Code: Select all

            mv ImageMagick-6.8.9-5 /usr/share
            sudo su
            perl -e "use Image::Magick; print Image::Magick->QuantumDepth"
The test command didn't work. Tried messing around a bit more.

Code: Select all

            sudo ldconfig usr/local/lib
            ./configure -with-perl
             sudo make install
            cd PerlMagick
At this point I realized that there were some errors when I tried to convert a PNG. I think the primary error being that the delegate code for PNG was no longer there.
Tried a bunch of ways to get rid of it so I could reinstall it clean.

Code: Select all

            sudo apt-get install --reinstall imagemagick
            sudo apt-get remove imagemagick
            rm -rf ImageMagick-6.8.9-5
            sudo apt-get install --reinstall imagemagick
            sudo ldconfig usr/local/lib
            sudo apt-get --purge remove imagemagick
            sudo apt-get install imagemagick
            sudo apt-get --purge remove imagemagick
            sudo apt-get install imagemagick
            sudo apt-get install --reinstall imagemagick
At this point I was pretty frustrated so I asked a senior programmer if he could help me figure it out. He suggested doing the make again with a make uninstall.

Code: Select all

            tar xczf ImageMagick.tar.gz
            ./configure -with-perl
            sudo make uninstall
Discovered that PerlMagick doesn't support "uninstall." (How the heck am I supposed to remove it?)

Code: Select all

            sudo make install

            sudo apt-get install libperl-dev
            sudo make install
The core of the issue for my work purposes comes down to the fact that I can't do anything with PNGs.. so I got the png lib and extracted the tar. Still no luck. :(

Code: Select all

            tar xvfz libpng-1.6.12.tar.gz
Today I went to my /usr/local/lib directory and found this:

Code: Select all

            Jul  2 15:34 ImageMagick-6.8.9
            Jul  2 15:34 libMagickCore-6.Q16.a
            Jul  2 15:34 libMagickCore-6.Q16.la
            Jul  2 15:34 libMagickCore-6.Q16.so -> libMagickCore-6.Q16.so.2.0.0
            Jul  2 15:34 libMagickCore-6.Q16.so.2 -> libMagickCore-6.Q16.so.2.0.0
            Jul  2 15:34 libMagickCore-6.Q16.so.2.0.0
            Jul  2 15:34 libMagickWand-6.Q16.a
            Jul  2 15:34 libMagickWand-6.Q16.la
            Jul  2 15:34 libMagickWand-6.Q16.so -> libMagickWand-6.Q16.so.2.0.0
            Jul  2 15:34 libMagickWand-6.Q16.so.2 -> libMagickWand-6.Q16.so.2.0.0
            Jul  2 15:34 libMagickWand-6.Q16.so.2.0.0
            Jul  2 15:34 perl
            Jul  2 15:34 pkgconfig
I don't know if that's supposed to be there... I have this development environment that I can connect to which also has imagemagick installed and I didn't find anything like this in the same directory.

Also, I did a dpkg --list | less and found this:

Code: Select all

            ii  imagemagick                  8:6.7.7.10-5ubuntu3.1
            ii  imagemagick-common           8:6.7.7.10-5ubuntu3.1 
Also, I checked out my /usr/libls - and I don't have anything for ImageMagick-6.8.9 but I do have a directory for ImageMagick-6.7.7 but all it has is three XML files, "english.xml", "french.xml", "locale.xml." I would assume that means I'm missing all of the configuration files. Is there no easy way for me to completely remove this mess and get a pre-configured version of imagemagick?

One more bit of information. I took a look at usr/local/lib/ImageMagick-6.8.9/config-Q16/configure.xml and am missing the the png delegate. Tried configuring it with ./configure --with-png=yes. Still nothing.

Okay. I think that's everything.

EDIT: Here's the results of the config run

Code: Select all

                  Shared libraries  --enable-shared=yes		yes
                  Static libraries  --enable-static=yes		yes
                  Module support    --with-modules=no		no
                  GNU ld            --with-gnu-ld=yes		yes
                  Quantum depth     --with-quantum-depth=16	16
                  High Dynamic Range Imagery
                  --enable-hdri=no		no

                  Install documentation:		yes

                  Delegate Configuration:
                  BZLIB             --with-bzlib=yes		no
                  Autotrace         --with-autotrace=no		no
                  Dejavu fonts      --with-dejavu-font-dir=default	none
                  DJVU              --with-djvu=yes		no
                  DPS               --with-dps=yes		no
                  FFTW              --with-fftw=yes		no
                  FlashPIX          --with-fpx=yes		no
                  FontConfig        --with-fontconfig=yes		no
                  FreeType          --with-freetype=yes		no
                  GhostPCL          None				pcl6 (unknown)
                  GhostXPS          None				gxps (unknown)
                  Ghostscript       None				gs (9.10)
                  Ghostscript fonts --with-gs-font-dir=default	/usr/share/fonts/type1/gsfonts/
                  Ghostscript lib   --with-gslib=no		no
                  Graphviz          --with-gvc=no		
                  JBIG              --with-jbig=yes		no
                  JPEG v1           --with-jpeg=yes		no
                  JPEG-2000         --with-jp2=		
                  LCMS v1           --with-lcms=yes		no
                  LCMS v2           --with-lcms2=yes		no
                  LQR               --with-lqr=yes		no
                  LTDL              --with-ltdl=yes		no
                  LZMA              --with-lzma=yes		no
                  Magick++          --with-magick-plus-plus=yes	no (failed tests)
                  OpenEXR           --with-openexr=yes		no
                  OpenJP2           --with-openjp2=yes		no
                  PANGO             --with-pango=yes		no
                  PERL              --with-perl=no		no
                  PNG               --with-png=yes		no
                  RSVG              --with-rsvg=no		no
                  TIFF              --with-tiff=yes		no
                  WEBP              --with-webp=yes		no
                  Windows fonts     --with-windows-font-dir=	none
                  WMF               --with-wmf=no		no
                  X11               --with-x=			yes
                  XML               --with-xml=yes		no
                  ZLIB              --with-zlib=yes		no

                  X11 Configuration:
                        X_CFLAGS        = 
                        X_PRE_LIBS      = -lSM -lICE
                        X_LIBS          = 
                        X_EXTRA_LIBS    = 

                  Options used to compile and link:
                    PREFIX          = /usr/local
                    EXEC-PREFIX     = /usr/local
                    VERSION         = 6.8.9
                    CC              = gcc -std=gnu99 -std=gnu99
                    CFLAGS          = -fopenmp -g -O2 -Wall -march=corei7-avx -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
                    CPPFLAGS        = -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
                    PCFLAGS         = 
                    DEFS            = -DHAVE_CONFIG_H
                    LDFLAGS         = 
                    LIBS            = 
                    CXX             = g++
                    CXXFLAGS        = -pthread
                    FEATURES        = DPC OpenMP
                    DELEGATES       = mpeg ps x

Re: ImageMagick Configuration Broken

Posted: 2014-07-04T11:58:32-07:00
by fmw42
I do not know anything about Perl or Perlmagick. I am on a Mac (unix). When installing IM from source, you have to install all the delegates you want first. Then install IM.

I would suggest you uninstall all IM components with make uninstall. Then do

find /usr | grep "ImageMagick"

and manually remove all related files pertaining to your manual IM install, especially in the directories where you tried to install it. Then start from scratch and install your delegates and then IM. Be sure you do not have multiple versions of IM installed in different places.

If you install binaries using RPM, then those should have your basic delegates pre-installed.

But take this with a grain of salt, since installing on the Mac is different from Linux.


See
http://www.imagemagick.org/script/insta ... e.php#unix
http://www.imagemagick.org/script/advan ... lation.php
http://www.imagemagick.org/script/binary-releases.php

Re: ImageMagick Configuration Broken

Posted: 2014-07-04T12:32:16-07:00
by Picklepaws
Hey thank you so much. I just did the uninstall and the older version of IM that I had on my machine was still configured properly.
Everything is working great now!
I think my issue is that I installed the tar file for the most recent version and never properly configured it. Silly mistake.

Re: ImageMagick Configuration Broken

Posted: 2015-06-29T14:38:21-07:00
by Picklepaws
Sorry to reopen a dead topic. I came back to the same job this summer and realized that the newer version of ImageMagick likely did not work because I had reached end of life support for the particular release of Ubuntu that I was running.

Re: ImageMagick Configuration Broken

Posted: 2015-06-29T15:16:39-07:00
by fmw42
Sorry, I do not know anything about Ubuntu or life support nor how that affects Imagemagick. Perhaps you need to question this on a Ubuntu forum.