OpenExr support on Linux
OpenExr support on Linux
I would like to build ImageMagick with OpenEXR support on a unix machine. I have the openexr-1.4.0 libs, but can not (do not want to) install them. I would like to know how I can override the ./configure behaviour and have it detect my built libs?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: OpenExr support on Linux
On my Mac/unix system all I did was:
install openEXR, then just reinstall IM. IM should detect it automatically. you can verify by
convert -list configure
the line starting with DELEGATES should contain openexr
On my system:
DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg openexr png rsvg tiff x11 xml zlib
install openEXR, then just reinstall IM. IM should detect it automatically. you can verify by
convert -list configure
the line starting with DELEGATES should contain openexr
On my system:
DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg openexr png rsvg tiff x11 xml zlib
Re: OpenExr support on Linux
RIght. It's the "install" it part I'm looking to avoid as I would like to be able to checkout and build this project on any machine.
I see that ./configure has some options OPENEXR_LIBS and OPENEXR_CFLAGS, but I can't find any docs on how to use them. I'm hoping there is a way to explicitly specify to ./configure the location of my libs.
Thanks
I see that ./configure has some options OPENEXR_LIBS and OPENEXR_CFLAGS, but I can't find any docs on how to use them. I'm hoping there is a way to explicitly specify to ./configure the location of my libs.
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: OpenExr support on Linux
Sorry that is about all I know. You will need help from one of the IM experts.
Note that as far as I know, IM only supports openEXR "half" format.
Note that as far as I know, IM only supports openEXR "half" format.
Re: OpenExr support on Linux
I'm trying to do the same (avoid 'installing' openexr into the OS directories).
I like to extract the source for each package on my file server, each in a separate dir, so I can build them on various platforms. I like to build them in such a way that they do NOT install themselves onto my build machines, cluttering up the OS, and making it hard to keep multiple versions of packages separate. I prefer these packages install into their own dir on my file server so that the files don't spread out all over the operating system, and stay contained in the same dir as the source code. Then, when building higher level packages, refer them to these directories to find the libs.
The key appears to be 'pkg-config', a tool that both openexr and IM appear to make use of when it exists, which they use to both register themselves (so other packages can link against them) and to find other packages.
For instance, both openexr and IM use pkg-config to register themselves (ie. the compiler flags/lib flags one would need to build against them).
Also, IM uses pkg-config to find openexr so that it can build against it.
Since Macs don't appear to come with pkg-config, it helps to install pkg-config first, then build the other packages so that they can register themselves and inquire about each other.
So if you build openexr with special flags to install itself in its own dir, it will tell pkg-config this info. Later when you build IM, it asks pkg-config where openexr is, and it will pass all the correct build info so that IM can find it in the locations you setup.
Without pkg-config, you're kind of 'on your own' to try to figure out what environment variables to set to get the build to fly.. which can be tricky.
As an example, I did the following to build IM with openexr. Note the use of --prefix `pwd` to ensure the 'make install' doesn't put files outside the build dir. (Note: I first downloaded/installed pkg-info.. I let it install itself into the OS, since it's a global tool.)
1) Download openexr, ilmbase, and IM in separate dirs on my file server (/net/tmp/xxx)
2) Build ilmbase first:
3) Build openexr next:
4) Build IM next:
This will get you the happy result during IM's configure output:
..which means IM found openexr.
I like to extract the source for each package on my file server, each in a separate dir, so I can build them on various platforms. I like to build them in such a way that they do NOT install themselves onto my build machines, cluttering up the OS, and making it hard to keep multiple versions of packages separate. I prefer these packages install into their own dir on my file server so that the files don't spread out all over the operating system, and stay contained in the same dir as the source code. Then, when building higher level packages, refer them to these directories to find the libs.
The key appears to be 'pkg-config', a tool that both openexr and IM appear to make use of when it exists, which they use to both register themselves (so other packages can link against them) and to find other packages.
For instance, both openexr and IM use pkg-config to register themselves (ie. the compiler flags/lib flags one would need to build against them).
Also, IM uses pkg-config to find openexr so that it can build against it.
Since Macs don't appear to come with pkg-config, it helps to install pkg-config first, then build the other packages so that they can register themselves and inquire about each other.
So if you build openexr with special flags to install itself in its own dir, it will tell pkg-config this info. Later when you build IM, it asks pkg-config where openexr is, and it will pass all the correct build info so that IM can find it in the locations you setup.
Without pkg-config, you're kind of 'on your own' to try to figure out what environment variables to set to get the build to fly.. which can be tricky.
As an example, I did the following to build IM with openexr. Note the use of --prefix `pwd` to ensure the 'make install' doesn't put files outside the build dir. (Note: I first downloaded/installed pkg-info.. I let it install itself into the OS, since it's a global tool.)
1) Download openexr, ilmbase, and IM in separate dirs on my file server (/net/tmp/xxx)
2) Build ilmbase first:
Code: Select all
cd /net/tmp/ilmbase-1.0.1
./configure --prefix `pwd`
make
make install
Code: Select all
cd /net/tmp/openexr-1.7.0
./configure --prefix=`pwd` --with-ilmbase-prefix=/net/tmp/ilmbase-1.0.1
make
make install
Code: Select all
cd /net/tmp/ImageMagick-6.6.3-9
./configure --prefix=`pwd` --with-openexr=yes
make
make install
Code: Select all
..
OpenEXR --with-openexr=yes >> yes <<
..