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

Bob Friesenhahn <[email protected]> Wed, 17 Feb 2010 11:58:44 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.bugs
Message-ID <[email protected]>
On Wed, 17 Feb 2010, Graham Leggett wrote:

> Hi all,
>
> While attempting to hunt down a leak of threads on RHEL5 (installed
> from RPM), first port of call was to upgrade GraphicsMagick from
> v1.3.7 to v1.3.10.
>
> The release notes tell us that the InitializeMagick() call is now
> mandatory, so we added the call on startup, passing NULL as a
> parameter. We are now getting the following error:
>
> Unable to access configuration file (delegates.mgk)

Not good.

> Picking apart the InitializeMagick() call, it leads me to
> GetExecutionPath(), which makes various attempts on various OS'es to
> find the executable name.

Normally this code path would only be used if the --disable-installed 
option is provided to configure.  Is that option being used?

> What isn't clear though is what the path is used for, and how this
> path relates to the location of the GraphicsMagick config files. In
> theory, as GraphicsMagick is installed as an RPM, the location of the
> config files should be set in stone at compile time (obviously this
> isn't relevant for GraphicsMagick built on Windows, etc).

For the "uninstalled" case, GraphicsMagick does not use fixed paths to 
find its components and so it needs to figure this out based on where 
the executable (argv[0]) resides.  Usually this works fine, but it 
depends on a particular install tree footprint.  Under Unix it expects 
a 'bin' 'lib' 'share' type install tree so the program is expected to 
live in 'bin', from which it can find its files in the adjoining 
directories.

Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev