Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw-w64-imagemagick: missing ENV variables #1885

Closed
peterbud opened this issue Nov 1, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@peterbud
Copy link
Contributor

commented Nov 1, 2016

After you install mingw-w64-imagemagick with pacman, apparently it cannot locate its coder modules and configure path. Symptoms are the following errors::

$ convert -resize "800x800" test.jpg test.png
convert.exe: no decode delegate for this image format `JPG' @ error/constitute.c/ReadImage/508.
convert.exe: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3253.

Adding the following to your bash_profile solves the problem:

export MAGICK_HOME="/mingw64/bin"
export MAGICK_CONFIGURE_PATH="/mingw64/etc/ImageMagick-7"
export MAGICK_CODER_MODULE_PATH="/mingw64/lib/ImageMagick-7.0.3/modules-Q16HDRI/coders"

convert -resize 800X800 test.jpg test.png runs without error

Should have been these variables defined at compile time? Or should they be defined with a profile.d script?

@schmittl

This comment has been minimized.

Copy link

commented Nov 6, 2016

Just came across the same problem.

I am just guessing here, but the 001-7.0.1.3-relocate.patch for the imagemagick package seems suspicious to me:

+CODER.XML      IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\coder.xml"
+COLORS.XML     IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\colors.xml"
+CONFIGURE.XML     IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\configure.xml"
+DELEGATES.XML  IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\delegates.xml"
+ENGLISH.XML    IMAGEMAGICK DISCARDABLE "..\\share\\ImageMagick-6\\english.xml"
+LOCALE.XML     IMAGEMAGICK DISCARDABLE "..\\share\\ImageMagick-6\\locale.xml"
+LOG.XML        IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\log.xml"
+MAGIC.XML      IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\magic.xml"
+THRESHOLDS.XML  IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\thresholds.xml"
+TYPE.XML       IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\type.xml"
+TYPE-GHOSTSCRIPT.XML  IMAGEMAGICK DISCARDABLE "..\\etc\\ImageMagick-6\\type-ghostscript.xml"

The directories should probably point toImageMagick-7 instead of ImageMagick-6

@mati865

This comment has been minimized.

Copy link
Contributor

commented Nov 6, 2016

@schmittl you are right, @JPeterMugaas probably missed it when updating patch.

@peterbud

This comment has been minimized.

Copy link
Contributor Author

commented Nov 6, 2016

Unfortunately its not so easy. I have just tried to fix that patch with "ImageMagick-7", then recompiled and installed, but still does not work. I believe what we need is to set at compile time properly the MAGICK_CODER_MODULE_PATH. I'll do some more research.

@Ede123

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2017

Quick related question:
It seems the relocation is hardwired to ..\etc and ..\bin? It seems this breaks proper relocation for package structures where a programs main executable and the libraries are located directly in the root for the installation (i.e. the .. is wrong).

Do you have any elegant workarounds for that or do I have to set environment variables / rewrite the relocations patches?

@paulalanthompson

This comment has been minimized.

Copy link

commented Feb 24, 2018

I am continuing to get the error of locating the configure.xml file

convert.exe: unable to locate configure file 'configure.xml'

I found it in a different place, and when I copied it to

..\etc\ImageMagick-7

the error went away. I am still out the 3 days that it took to figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.