PDA

View Full Version : [SOLVED] Rebuilding ImageMagick rpm with EXR support


ragtag
15th March 2011, 02:48 PM
Hi,

I've been trying to rebuild ImageMagick with OpenEXR support. I've downloaded the SRPMs, have the build environment set up, and am able to rebuild the rpm just fine, but not with OpenEXR support. What I've been trying to do is add it to the .SPEC file.

I've added this to the .SPEC file (see attachment for complete SPEC file).
line18
BuildRequires: OpenEXR-devel, ilmbase-devel
line 46
Requires: OpenEXR-devel, ilmbase-devel
line 147 (modified)
%configure --enable-shared \
--enable-hdri \
--with-openexr \
--disable-static \
--with-modules \
--with-perl \
--with-x \
--with-threads \
--with-magick_plus_plus \
--with-gslib \
--with-wmf \
--with-lcms \
--with-rsvg \
--with-xml \
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
--without-dps \
--without-included-ltdl --with-ltdl-include=%{_includedir} \
--with-ltdl-lib=%{_libdir}

I noticed that there was also a ImageMagick.spec.in file in ~/rpmbuild/SOURCES/ImageMagick-6.6.4-1/ImageMagick-6.6.4-1.tar.xz that I don't know if is overriding my modified .spec file.

The output includes (see attachment for complete log):

checking for OPENEXR... yes

OpenEXR --with-openexr=yes yes

+ ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --disable-static --enable-hdri --with-openexr --with-modules --with-perl --with-x --with-threads --with-magick_plus_plus --with-gslib --with-wmf --with-lcms --with-rsvg --with-xml '--with-perl-options=INSTALLDIRS=vendor CC='\''gcc -L/home/fedora/rpmbuild/BUILD/ImageMagick-6.6.4-1/magick/.libs'\'' LDDLFLAGS='\''-shared -L/home/fedora/rpmbuild/BUILD/ImageMagick-6.6.4-1/magick/.libs'\''' --without-dps --without-included-ltdl --with-ltdl-include=/usr/include --with-ltdl-lib=/usr/lib64


Once built, if I do:

cd ~/rpmbuild/BUILD/ImageMagick-6.6.4-1/utilities/
./convert -list format | grep -i EXR


it returns nothing. Without the 'grep' it returns all the supported image formats, but exr is not included. Trying to convert an actual working EXR file, returns:

lt-convert: no decode delegate for this image format `bla.exr' @ error/constitute.c/ReadImage/532.
lt-convert: missing an image filename `bla.jpg' @ error/convert.c/ConvertImageCommand/2953.

I'm no expert on building stuff, so it might very well be something completely obvious I'm doing wrong. :doh:

Any ideas how to solve this?

vallimar
15th March 2011, 05:51 PM
The specfile inside the tar'd source isn't being used, that's just one they provide for others to use
if they don't already have a distro provided one or prefer to use it instead.

If the application is reporting that EXR is enabled during its configuration phase but then not
actually building it, seems like perhaps a problem with the application and not an rpm issue.

I would do a halt after the config phase and check the generated config.log and config.h or
config.mak files (whichever it uses) to see if it really got enabled and is just misreporting.

leigh123linux
15th March 2011, 06:13 PM

Try rebuilding this srpm

http://kojipkgs.fedoraproject.org/packages/ImageMagick/6.6.5.10/19.fc15/src/ImageMagick-6.6.5.10-19.fc15.src.rpm




[leigh@localhost Desktop]$ rpm -q ImageMagick
ImageMagick-6.6.5.10-19.el6.x86_64
[leigh@localhost Desktop]$ convert -list format | grep -i EXR
EXR EXR rw- High Dynamic-range (HDR)
[leigh@localhost Desktop]$

ragtag
16th March 2011, 04:48 PM
I got a little bit further with this, but am still a bit confused. :confused:

I treid downloading the package leigh suggested, and got the same result, but noticed that the version I built, did not match the version of that rpm. So I tried halting the build before %configure ran, and then run ./configure;make by hand in the BUILD folder. This time around I got EXR working and the correct version of ImageMagick. Which means that up until now, it's been using the SPEC file to create the content of the BUILD folder, but when it comes to 'make' it has gotten the source and configure from somewhere else.

So what vallimar said about it using the distro provided tar, and the tar in SOURCE is being ignored, makes sense. Except I have no idea where it's getting the source from.

Or am I just running rpmbuild wrong. I'm currently doing


cd /home/fedora/rpmbuild/SPECS
rpmbuild -bb ImageMagick.spec


Any ideas?

leigh123linux
16th March 2011, 07:04 PM
I got a little bit further with this, but am still a bit confused. :confused:

I treid downloading the package leigh suggested, and got the same result, but noticed that the version I built, did not match the version of that rpm. So I tried halting the build before %configure ran, and then run ./configure;make by hand in the BUILD folder. This time around I got EXR working and the correct version of ImageMagick. Which means that up until now, it's been using the SPEC file to create the content of the BUILD folder, but when it comes to 'make' it has gotten the source and configure from somewhere else.

So what vallimar said about it using the distro provided tar, and the tar in SOURCE is being ignored, makes sense. Except I have no idea where it's getting the source from.

Or am I just running rpmbuild wrong. I'm currently doing


cd /home/fedora/rpmbuild/SPECS
rpmbuild -bb ImageMagick.spec
Any ideas?

I used

rpmbuild --rebuild ImageMagick-6.6.5.10-19.fc15.src.rpm

ragtag
17th March 2011, 03:06 PM
Seems I was trying to do things more complex than they needed to be.

Running...

rpmbuild --rebuild ImageMagick-6.6.4.1-15.fc14.src.rpm

...created a working RPM with OpenEXR.

Thanks.