Can't disable EXR support

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Can't disable EXR support

Post by mi »

Although I explicitly disable OpenEXR support by passing the --without-exr option to configure:

Code: Select all

Host system type : amd64-portbld-freebsd6.2

                  Option                        Value
-------------------------------------------------------------------------------
Shared libraries  --enable-shared=yes           yes
Static libraries  --enable-static=yes           yes
Module support    --with-modules=yes            yes
GNU ld            --with-gnu-ld=yes             yes
Quantum depth     --with-quantum-depth=16       16
High Dynamic Range Imagery
                  --enable-hdri=no              no

Delegate Configuration:
BZLIB             --with-bzlib=yes              yes
DJVU              --with-djvu=no                no
DPS               --with-dps=no         no
FlashPIX          --with-fpx=no         no
FontConfig        --with-fontconfig=yes         yes
FreeType          --with-freetype=yes           yes
GhostPCL          None                          pcl6 (unknown)
Ghostscript       None                          gs (8.57)
result_ghostscript_font_dir='none'
Ghostscript fonts --with-gs-font-dir=default
Ghostscript lib   --with-gslib=yes              no
Graphviz          --with-gvc=yes                yes
JBIG              --with-jbig=yes               yes
JPEG v1           --with-jpeg=yes               yes
JPEG-2000         --with-jp2=yes                yes
LCMS              --with-lcms=yes               yes
Magick++          --with-magick-plus-plus=yes   yes
OpenEXR           --with-openexr=no             no
PERL              --with-perl=/opt/bin/perl5.8.8                /opt/bin/perl5.8.8
PNG               --with-png=yes                yes
RSVG              --with-rsvg=yes               yes
TIFF              --with-tiff=yes               yes
result_windows_font_dir='none'
Windows fonts     --with-windows-font-dir=
WMF               --with-wmf=yes                yes
X11               --with-x=yes                  yes
XML               --with-xml=yes                yes
ZLIB              --with-zlib=yes               yes

X11 Configuration:
      X_CFLAGS        = -I/opt/include
      X_PRE_LIBS      = -lSM -lICE
      X_LIBS          = -L/opt/lib -R/opt/lib
      X_EXTRA_LIBS    = 

Options used to compile and link:
  PREFIX          = /opt
  EXEC-PREFIX     = /opt
  VERSION         = 6.3.6
  CC              = cc
  CFLAGS          = -O2 -fno-strict-aliasing -pipe -march=opteron -I/opt/include/graphviz -Wall -W
  MAGICK_CFLAGS   = -O2 -fno-strict-aliasing -pipe -march=opteron -I/opt/include/graphviz -Wall -W
  CPPFLAGS        = -I/opt/include
  PCFLAGS         = 
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -L/opt/lib -L/opt/lib/graphviz -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib
  MAGICK_LDFLAGS  = -L/opt/lib -L/opt/lib -L/opt/lib/graphviz -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib
  LIBS            = -lMagick -llcms -ltiff -lfreetype -ljpeg -L/opt/lib -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm
  CXX             = c++
  CXXFLAGS        = -O2 -fno-strict-aliasing -pipe -march=opteron -I/opt/include/graphviz -Wall -W
the exr-module is getting built anyway -- because I happen to have OpenEXR libraries/headers installed:

Code: Select all

-rw-rw-r--  1 mi  wheel  16654 Oct  5 17:44 work/ImageMagick-6.3.6/coders/exr.c
-rw-rw-r--  1 mi  wheel   1719 Oct 30 12:57 work/ImageMagick-6.3.6/coders/exr.la
-rw-rw-r--  1 mi  wheel  2314 Oct 30 12:57 work/ImageMagick-6.3.6/coders/.libs/exr.a
-rw-rw-r--  1 mi  wheel    36 Oct 30 12:57 work/ImageMagick-6.3.6/coders/.libs/exr.exp
lrwxrwxr-x  1 mi  wheel     9 Oct 30 12:57 work/ImageMagick-6.3.6/coders/.libs/exr.la -> ../exr.la
-rw-rw-r--  1 mi  wheel  1132 Oct 30 12:57 work/ImageMagick-6.3.6/coders/.libs/exr.lai
-rwxrwxr-x  1 mi  wheel  6125 Oct 30 12:57 work/ImageMagick-6.3.6/coders/.libs/exr.so
Please, advise. Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

If you disable EXR support, the module is compiled but it is just a stub. Type
  • identify -list format
Under the EXR tag you see a mode '---' which means this format can neither be read or written. We have a mechanism to not create a module if support is disabled but we thought showing a user that ImageMagick is capable of supporting the format is more informative. What is your preference?
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: Can't disable EXR support

Post by mi »

magick wrote:We have a mechanism to not create a module if support is disabled but we thought showing a user that ImageMagick is capable of supporting the format is more informative. What is your preference?
Uhm, I would think, that in the case of it being a stub, the use of an external module can be avoided, even if other modules are enabled and other formats are compiled as modules.

My preference would be for all modules to be treated consistently. Disabling FPX, for example, prevents fpx-module from getting created (as one would expect). But EXR is always built -- as a real module or as a stub...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

We are going for consistency for the next point release. Like FPX, and TIFF, if EXR is disabled, the exr.so module will not be built. Will have a patch in ImageMagick SVN within a day or two. Thanks.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: Can't disable EXR support

Post by mi »

magick wrote:Under the EXR tag you see a mode '---' which means this format can neither be read or written.
Wait a minute. If that is "just a stub", why is it linked with OpenEXR's libraries (and all the others)? Search the ldd's output below for "libIlm" (for Industrial Light and Magick):

Code: Select all

mi@aldan:ports/graphics/ImageMagick (1058) ldd work/ImageMagick-6.3.6/coders/.libs/exr.so 
work/ImageMagick-6.3.6/coders/.libs/exr.so:
        libfreetype.so.9 => /opt/lib/libfreetype.so.9 (0x80093d000)
        libz.so.3 => /lib/libz.so.3 (0x800ab3000)
        libMagick.so.10 => /opt/lib/libMagick.so.10 (0x800bc7000)
        libm.so.4 => /lib/libm.so.4 (0x801060000)
        libjbig.so.1 => /opt/lib/libjbig.so.1 (0x80117c000)
        liblcms.so.1 => /opt/lib/liblcms.so.1 (0x801289000)
        libtiff.so.4 => /opt/lib/libtiff.so.4 (0x8013be000)
        libjasper.so.4 => /opt/lib/libjasper.so.4 (0x801515000)
        libjpeg.so.9 => /opt/lib/libjpeg.so.9 (0x801665000)
        libpng.so.5 => /opt/lib/libpng.so.5 (0x801785000)
        libfontconfig.so.1 => /opt/lib/libfontconfig.so.1 (0x8018ab000)
        libwmflite.so.7 => /opt/lib/libwmflite.so.7 (0x8019de000)
        libXext.so.6 => /opt/lib/libXext.so.6 (0x801af9000)
        libXt.so.6 => /opt/lib/libXt.so.6 (0x801c0a000)
        libSM.so.6 => /opt/lib/libSM.so.6 (0x801d6a000)
        libICE.so.6 => /opt/lib/libICE.so.6 (0x801e72000)
        libX11.so.6 => /opt/lib/libX11.so.6 (0x801f8c000)
        libbz2.so.2 => /usr/lib/libbz2.so.2 (0x802193000)
        libIlmImf.so.6 => /opt/lib/libIlmImf.so.6 (0x8022a2000)
        libImath.so.6 => /opt/lib/libImath.so.6 (0x802470000)
        libHalf.so.6 => /opt/lib/libHalf.so.6 (0x802575000)
        libIex.so.6 => /opt/lib/libIex.so.6 (0x8026b7000)
        libIlmThread.so.6 => /opt/lib/libIlmThread.so.6 (0x8027cd000)
        librsvg-2.so.2 => /opt/lib/librsvg-2.so.2 (0x8028d3000)
        libgdk_pixbuf-2.0.so.0 => /opt/lib/libgdk_pixbuf-2.0.so.0 (0x802a09000)
        libgobject-2.0.so.0 => /opt/lib/libgobject-2.0.so.0 (0x802b20000)
        libgmodule-2.0.so.0 => /opt/lib/libgmodule-2.0.so.0 (0x802c5f000)
        libglib-2.0.so.0 => /opt/lib/libglib-2.0.so.0 (0x802d62000)
        libiconv.so.3 => /opt/lib/libiconv.so.3 (0x802f00000)
        libxml2.so.5 => /opt/lib/libxml2.so.5 (0x8030f3000)
        libgvc.so.4 => /opt/lib/graphviz/libgvc.so.4 (0x803334000)
        libexpat.so.6 => /opt/lib/libexpat.so.6 (0x8034ae000)
        libXau.so.6 => /opt/lib/libXau.so.6 (0x8035d0000)
        libXdmcp.so.6 => /opt/lib/libXdmcp.so.6 (0x8036d3000)
        librpcsvc.so.3 => /usr/lib/librpcsvc.so.3 (0x8037d8000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x8038e0000)
        libgsf-1.so.114 => /opt/lib/libgsf-1.so.114 (0x803ad7000)
        libcroco-0.6.so.3 => /opt/lib/libcroco-0.6.so.3 (0x803c0b000)
        libpangocairo-1.0.so.0 => /opt/lib/libpangocairo-1.0.so.0 (0x803d44000)
        libpangoft2-1.0.so.0 => /opt/lib/libpangoft2-1.0.so.0 (0x803e4e000)
        libpango-1.0.so.0 => /opt/lib/libpango-1.0.so.0 (0x803f7e000)
        libcairo.so.2 => /opt/lib/libcairo.so.2 (0x8040c1000)
        libintl.so.8 => /opt/lib/libintl.so.8 (0x804240000)
        libicui18n.so.36 => /opt/lib/libicui18n.so.36 (0x804349000)
        libcdt.so.4 => /opt/lib/graphviz/libcdt.so.4 (0x804588000)
        libgraph.so.4 => /opt/lib/graphviz/libgraph.so.4 (0x80468d000)
        libpathplan.so.4 => /opt/lib/graphviz/libpathplan.so.4 (0x804799000)
        libltdl.so.4 => /opt/lib/libltdl.so.4 (0x8048a4000)
        libglitz.so.1 => /opt/lib/libglitz.so.1 (0x8049ac000)
        libXrender.so.1 => /opt/lib/libXrender.so.1 (0x804ad6000)
        libicuuc.so.36 => /opt/lib/libicuuc.so.36 (0x804bdf000)
        libicudata.so.36 => /opt/lib/libicudata.so.36 (0x804e0e000)
        libpthread.so.2 => /lib/libpthread.so.2 (0x8058d5000)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

Check coders/exr.c and you will see that no OpenEXR code is called unless HasOPENEXR is defined (and HasOPENEXR is not defined unless OPENEXR support is enabled at configure time). No matter though, we patched ImageMagick 6.3.6-5 so that the EXR module is not compiled or installed if OPENEXR is not enabled at configure time.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: Can't disable EXR support

Post by mi »

magick wrote:No matter though, we patched ImageMagick 6.3.6-5 so that the EXR module is not compiled or installed if OPENEXR is not enabled at configure time.
Trying to build the newly released 6.3.6-5 (with OpenEXR configured)

Code: Select all

...
magick/.libs/libMagick.so: undefined reference to `UnregisterEXRImage'
magick/.libs/libMagick.so: undefined reference to `RegisterEXRImage'
*** Error code 1
Please, advise.

Here is the full configure and build log.

Before you ask, the errors quoted above strike regardless of whether OpenEXR is enabled. Here is the log of the build with OpenEXR disabled -- same linkage error.

I must, once again, express serious doubts, that ImageMagick releases are subjected to automated tests before being, uhm, released :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

> magick/.libs/libMagick.so: undefined reference to `UnregisterEXRImage'

Oopsies. Will have a fix momentarily. Thanks.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: Can't disable EXR support

Post by mi »

magick wrote:Oopsies. Will have a fix momentarily. Thanks.
Noticed the re-rolled 6.3.6-5 release on the FTP-site (a bad thing, BTW -- you should've published a patch or released a 6.3.6-6). Downloaded and tried rebuilding... Same failure.

"Oopsies" indeed. Here is the new log, if you care.

It is fairly clear, that you are lacking the resources to perform not only the post-build tests, but even to fully rebuild the software before publishing a release.

I can offer an account on my FreeBSD/amd64 box. It has a static-IP and is almost always online. Please, reply privately with the public SSH-key and the desired /etc/passwd entry.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

Curious. Register/UnregisterEXRImage() is conditionally compiled only if HasOPENEXR is defined suggesting if configure fails to detect the OpenEXR library or if OpenEXR is disabled these methods will not be called. In coders/Makefile.am we conditionally compile coders/exr.c only if HasOPENEXR is defined. If you spot the flaw in this logic let us know.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Can't enable EXR support

Post by mi »

magick wrote:Curious. Register/UnregisterEXRImage() is conditionally compiled only if HasOPENEXR is defined suggesting if configure fails to detect the OpenEXR library or if OpenEXR is disabled these methods will not be called. In coders/Makefile.am we conditionally compile coders/exr.c only if HasOPENEXR is defined. If you spot the flaw in this logic let us know.
Yes, indeed, there is no problem any more with OpenEXR disabled.

The problem strikes when OpenEXR support is enabled.

Something is still problematic, and I'm still waiting for a confirmation, that it does, indeed, work on systems other than FreeBSD.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't disable EXR support

Post by magick »

We have a fix for the OpenEXR problem in 6.3.6-7 which will be released tonight.
Hero

Re: Can't disable EXR support

Post by Hero »

Hi folks,
I'd just like to say that you people kick ass and your work is much appreciated
(both programming and bug-hunting!!)

thanks!! :D


Best regards

/H
ps giving the developers axxess to a FreeBSD-boxen sounds like a great idea, easiest with root on a jail with full developer package installed maybe
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Shell access to a FreeBSD box

Post by mi »

Hero wrote:ps giving the developers axxess to a FreeBSD-boxen sounds like a great idea, easiest with root on a jail with full developer package installed maybe
Yes. My offer of a login-access to my box (aldan.algebra.com) still stands...
Post Reply