Re: InitializeMagick() causes GraphicsMagick to not find its config files
Graham Leggett <[email protected]> Wed, 24 Feb 2010 01:51:13 +0200
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
On 19 Feb 2010, at 6:25 PM, Bob Friesenhahn wrote: > Lastly, the full details of how GraphicsMagick is searching for > configuration files may be revealed like > > env MAGICK_DEBUG=configure gm convert ... Thanks for this, this was the key - we changed configure to "all", and got this: 16:10:17 2:12 0.030u 4253 constitute.c/ReadImage/8235/Blob: Magick=JPEG, Filename= 16:10:17 2:12 0.030u 4253 module.c/OpenModule/1447/Configure: Searching for module "JPEG" using file name "jpeg.la" 16:10:17 2:12 0.030u 4253 module.c/FindMagickModule/672/Configure: Searching for coder module file "jpeg.la" ... 16:10:17 2:12 0.030u 4253 module.c/FindMagickModule/706/Configure: Searching for module file "jpeg.la" in path "/usr/lib64/ GraphicsMagick-1.3.10/modules-Q8/coders/" 16:10:17 2:12 0.030u 4253 utility.c/IsAccessible/2838/Configure: Tried: /usr/lib64/GraphicsMagick-1.3.10/modules-Q8/coders/jpeg.la [Permission denied] 16:10:17 2:12 0.030u 4253 blob.c/GetConfigureBlob/1760/Configure: The underlying error was "permission denied", which I'll go into further below, the problem was that this error wasn't communicated back to the caller (I suspect all errors are being interpreted as meaning "file not found"?). Instead, GraphicsMagick was allowed to continue, which then did this: Searching for file "delegates.mgk" in path "/usr/share/ GraphicsMagick-1.3.10/config/:/usr/lib64/GraphicsMagick-1.3.10/config/" 16:10:17 2:12 0.030u 4253 blob.c/GetConfigureBlob/1805/Configure: Tried: /usr/share/GraphicsMagick-1.3.10/config/delegates.mgk [No such file or directory] 16:10:17 2:12 0.030u 4253 blob.c/GetConfigureBlob/1783/Configure: Found: /usr/lib64/GraphicsMagick-1.3.10/config/delegates.mgk 16:10:17 2:12 0.030u 4253 constitute.c/ReadImage/8279/MissingDelegate: No decode delegate for this image format (JPEG) [Tue Feb 23 16:10:17 2010] [error] [client 172.yy.yy.yy] (20014)Internal error: ZZZ error while reading an image with recipe / etc/httpd/conf.d/recipes/homepage-generic-hero.json: MagickReadImageBlob: No decode delegate for this image format (JPEG), referer: http://static001.zzz/zzz-test/baked/ Stumbling on without a jpeg driver, GraphicsMagick now threw the error that jpegs weren't supported. Ideally, GraphcisMagick should have failed earlier, as permission denied for its configuration should either be fatal, or should be added to the "I don't support jpeg" message (like maybe "I don't support jpeg, when I tried I got permission denied"). The reason for the "permission denied" was that this machine for some reason historically had had a umask manually set of 0077. When the RPM was installed, the directories containing the config files seem to have been created in a postinstall script, instead of being declared explicitly in the spec file to have the specified ownership and permissions. As a result, the umask kicked in making the directories and the config files below them only accessible when run as root. Ideally, the spec file should declare explicit permissions for the directories below the following path: /usr/lib64/GraphicsMagick-1.3.10/modules-Q8/* Apart from fixing the umask, we had to uninstall the GraphicsMagick rpm, delete the wrong-permission directories left behind that weren't controlled by the RPM, and then reinstall GrahicsMagick, at which point it worked. Regards, Graham -- ------------------------------------------------------------------------------ Download Intel® 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