Build ImageMagick with custom build OpenExr

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Build ImageMagick with custom build OpenExr

Post by efleurant »

I have trying to configure ImageMagick to see/detect my build of OpenEXR and I'm unable to do so. I am on CentOS and it is not a yum install of openexr, it's my own build. I have tried setting CPPFLAGS and LDFLAGS to where my includes and libraries are to no avail.
Can anyone let me know if it's possible or has had any luck doing this?

Thanks in advance
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

Actually, I have noticed that the ./configure seems to ignore what I pass to CPPFLAGS
for example, if I do:

Code: Select all

./configure CPPFLAGS=-I/usr/local/include/OpenEXR
I get :

Code: Select all

Options used to compile and link:
  PREFIX          = /usr/local
  EXEC-PREFIX     = /usr/local
  VERSION         = 6.8.9
  CC              = gcc -std=gnu99 -std=gnu99
  CFLAGS          = -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
  [b]CPPFLAGS        = -I/usr/local/include/ImageMagick-6[/b]
  ...
Clearly, my argument was not passed to the CPPFLAGS list
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Build ImageMagick with custom build OpenExr

Post by magick »

Edit Makefile. You'll see
  • CPPFLAGS = ... -I/usr/local/include/OpenEXR
You'll also see MAGICK_CPPFLAGS. That is what is displayed from the configure output. We'll correct the configure script output to reflect CPPFLAGS rather than MAGICK_CPPFLAGS.
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

magick wrote:Edit Makefile. You'll see
  • CPPFLAGS = ... -I/usr/local/include/OpenEXR
You'll also see MAGICK_CPPFLAGS. That is what is displayed from the configure output. We'll correct the configure script output to reflect CPPFLAGS rather than MAGICK_CPPFLAGS.
Ok, I see it in the Makefile... but why is it not detecting OpenEXR then? I have also tried to put LDFLAGS to my openexr lib dir with no result. It just won't see my openexr custom build.

I alos tried to export OPENEXR_LIBS and OPENEXR_CFLAGS, and still nothing

Any suggestion?
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

Also, does ImageMagick support OpenEXR 2.x+? Because I have compiled version 2.0.1 and I'm wondering if thiws is why I am having issue
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Build ImageMagick with custom build OpenExr

Post by magick »

Did you set PKG_CONFIG_PATH to /usr/local/lib/pkgconfig? When we do, ImageMagick compiles without complaint with OpenEXR 2.1.0.
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

Wow, I know this is old, but I am giving this another shot with version 7.0.3 of imagemagick and I'm still having trouble to link my own build of OpenEXR.

Again, I tried settings LDFLAGS and CPPFLAGS to the dir where OpenEXR is install but this doesn't seem sufficient for configure to find what it needs. The configure log shows the added LD and CPP flags, but the following line pretty much proves that it is not working:
OpenEXR --with-openexr=yes no

What am I missing here?

*EDIT: Corrected the ImageMagick version number.
Last edited by efleurant on 2016-09-29T06:23:25-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build ImageMagick with custom build OpenExr

Post by fmw42 »

FYI, there is no such version of Imagemagick as 1.7. What do you get from

convert -version

That will tell you the proper version number.

Sorry, I do not know much about configuring Linux.
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

I stand corrected, I meant version 7.0.3, sorry.
efleurant
Posts: 7
Joined: 2014-04-28T07:52:48-07:00
Authentication code: 6789

Re: Build ImageMagick with custom build OpenExr

Post by efleurant »

So is there any chance I can compile imagemagick with my own static build of OpenEXR? Setting the compile flags doesn't seem to have any effect when compiling...
Post Reply