Re: InitializeMagick() causes GraphicsMagick to not find its config files

Graham Leggett <[email protected]> Fri, 19 Feb 2010 19:59:03 +0200
Newsgroups gmane.comp.video.graphicsmagick.bugs
Message-ID <[email protected]>
On 19 Feb 2010, at 6:25 PM, Bob Friesenhahn wrote:

> Please check magick/magick_config.h in the build directory to see if  
> this text is present:
>
> /* GraphicsMagick is formally installed under prefix */
> #define UseInstalledMagick 1

It is, yes.

> Also, please do 'make check' in the build directory and see if the  
> test suite works.
>
> In magick/magick.c InitializeMagickClientPathAndName() I see the  
> code which would be invoked if UseInstalledMagick is not defined.

Doing a make check results in one fail:

FAIL: PerlMagick/PerlMagickCheck.sh
[snip]
=====================
1 of 722 tests failed
See ./test-suite.log
=====================

But this is because of perl support not being turned off and seems  
unrelated.

A number of XFAILS, including but not limited to:

XFAIL: tests/rwfile_JBIG_bilevel.sh
XFAIL: tests/rwfile_JBIG_gray.sh
XFAIL: tests/rwfile_JBIG_pallette.sh
XFAIL: tests/rwfile_JBIG_truecolor.sh
XFAIL: tests/rwfile_JP2_bilevel.sh
XFAIL: tests/rwfile_JP2_gray.sh
XFAIL: tests/rwfile_JP2_pallette.sh
XFAIL: tests/rwfile_JP2_truecolor.sh
XFAIL: tests/rwfile_JP2_truecolor10.sh
XFAIL: tests/rwfile_JP2_truecolor12.sh
XFAIL: tests/rwfile_JP2_truecolor16.sh

> In the default case, the paths are substituted into magick/ 
> magick_config.h, and these paths become hard-coded into the  
> binaries.  If your build was configured for a particular directory  
> footprint, but the install was into a different footprint, then  
> there would be a problem.  Perhaps there is a bug in the configure  
> script which effectively causes this.  Please do something like:
>
>  grep Path magick/magick_config.h
>
> in the build directory and verify that the paths match what you are  
> expecting based on your configure requests.

So far, the all look sensible (for a Redhat platform, after stopping  
the RPM build process after configure was finished and make was  
running):

#define MagickBinPath "/usr/bin/"
#define MagickCoderModulesPath "/usr/lib64/GraphicsMagick-1.3.10/ 
modules-Q8/coders/"
#define MagickFilterModulesPath "/usr/lib64/GraphicsMagick-1.3.10/ 
modules-Q8/filters/"
#define MagickLibConfigPath "/usr/lib64/GraphicsMagick-1.3.10/config/"
#define MagickLibPath "/usr/lib64/GraphicsMagick-1.3.10/"
#define MagickShareConfigPath "/usr/share/GraphicsMagick-1.3.10/config/"
#define MagickSharePath "/usr/share/GraphicsMagick-1.3.10/"
#define X11ConfigurePath "X11ConfigurePath"

> Lastly, the full details of how GraphicsMagick is searching for  
> configuration files may be revealed like
>
>  env MAGICK_DEBUG=configure gm convert ...

It looks like below (on the int box where GraphicsMagick works, I've  
requested this same be done on the stage machines where the weirdness  
is occurring):

root@static007:~# MAGICK_DEBUG=configure gm convert
17:34:41 0:01 0.000u 6455 blob.c/GetConfigureBlob/1760/Configure:
   Searching for file "log.mgk" in path "/usr/share/ 
GraphicsMagick-1.3.10/config/:/usr/lib64/GraphicsMagick-1.3.10/config/"
17:34:41 0:01 0.000u 6455 blob.c/GetConfigureBlob/1783/Configure:
   Found: /usr/share/GraphicsMagick-1.3.10/config/log.mgk
17:34:41 0:01 0.000u 6455 magick.c/InitializeMagick/954/Configure:
   Initialize Magick
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 1
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 2
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 3
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 6
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 8
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 15
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 24
17:34:41 0:01 0.000u 6455 magick.c/MagickCondSignal/647/Configure:
   Registered signal handler for signal ID 25
17:34:41 0:01 0.000u 6455 blob.c/GetConfigureBlob/1760/Configure:
   Searching for file "modules.mgk" in path "/usr/share/ 
GraphicsMagick-1.3.10/config/:/usr/lib64/GraphicsMagick-1.3.10/config/"
17:34:41 0:01 0.000u 6455 blob.c/GetConfigureBlob/1783/Configure:
   Found: /usr/share/GraphicsMagick-1.3.10/config/modules.mgk
17:34:41 0:01 0.000u 6455 magick.c/InitializeMagick/1007/Configure:
   Path: "" Name: "Magick" Filename: ""
17:34:41 0:01 0.000u 6455 utility.c/SetClientName/4342/Configure:
   Client Name was set to: gm
17:34:41 0:01 0.000u 6455 utility.c/SetClientName/4342/Configure:
   Client Name was set to: gm convert
GraphicsMagick 1.3.10 2010-02-10 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2010 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Regards,
Graham
--


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev