Problems running 'liquid-rescale' on Mac OS X Lion

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
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Problems running 'liquid-rescale' on Mac OS X Lion

Post by pipitas »

I raised this problem already in the users forum, now I'll dare my luck here....

This happens on a Mac OSX Lion system. Initially I was using a MacPorts installation of ImageMagick (later I also built a local version from the sources, with the same results):

Code: Select all

Version: ImageMagick 6.7.8-3 2012-07-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:  OpenCL HDRI  
Running a command that should do liquid-rescale, I'm getting this error:

Code: Select all

convert long.jpg -liquid-rescale 290x310\! liquid.jpg

dyld: lazy symbol binding failed: Symbol not found: _lqr_pixel_get_rgbcol
  Referenced from: /opt/local/lib/liblqr-1.0.dylib
  Expected in: flat namespace

dyld: Symbol not found: _lqr_pixel_get_rgbcol
  Referenced from: /opt/local/lib/liblqr-1.0.dylib
  Expected in: flat namespace

Trace/BPT trap: 5
I have only very limited (user level, not developer level) understanding of what this could mean, and no idea how I could possibly resolve it.

Looking for the dynamic library dependencies with otool (similar to `ldd` on Linux) yields this output:

Code: Select all

otool -L /opt/local/bin/convert | grep lqr
	/opt/local/lib/liblqr-1.0.dylib (compatibility version 4.0.0, current version 4.1.0)

Yes, the lqr delegate is seen by ImageMagick:

Code: Select all

pip@mbp:~$ /usr/local2/bin/convert -list configure | grep DELEG
DELEGATES     bzlib djvu fftw fontconfig freetype gs jbig jpeg jng jp2 lcms2 lqr lzma mpeg openexr png rsvg tiff x11 xml zlib
                                                                             ^^^
After the MacPorts version failed, I compiled ImageMagick locally. But I got the very same, identical error message. I even tried to configure the local build without any "extra" features such as HDRI or OpenCL support doing the most "basic" build I could (but still including lqr).

Any ideas what could be the issue?
Last edited by pipitas on 2012-08-15T05:45:19-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: Problems running 'liquid-rescale' (MacPorts version of I

Post by fmw42 »

Just a thought. Might you have multiple versions of liblqr installed. Perhaps one in /opt and one in /usr. Or any multiple dependencies that liblqr needs. Or perhaps it is finding either a too new or too old dependency. Does MacPorts show any dependencies for liblqr?
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: Problems running 'liquid-rescale' (MacPorts version of I

Post by pipitas »

Thanks for the additional input, fmw42.
fmw42 wrote:Just a thought. Might you have multiple versions of liblqr installed. Perhaps one in /opt and one in /usr. Or any multiple dependencies that liblqr needs. Or perhaps it is finding either a too new or too old dependency. Does MacPorts show any dependencies for liblqr?
'
Ok, let's first look for the multiple versions of liblqr. I'm using the commandline interface to 'Spotlight', mdfind:

Code: Select all

pip@mbp:~$  mdfind liblqr 2>&1 | grep liblqr
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/liblqr
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/liblqr/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/liblqr
/opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/liblqr/Portfile
/opt/local/var/macports/sources/lil.fr.rsync.macports.org/release/ports/graphics/liblqr
/opt/local/var/macports/sources/lil.fr.rsync.macports.org/release/ports/graphics/liblqr/Portfile
/opt/local/var/macports/logs/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr/main.log
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr/work/pkg_resources/English.lproj/Welcome.html
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr/work/liblqr-1-0.4.1.pkg
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr/work/destroot/opt/local/lib/liblqr-1.la
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr/work/destroot/opt/local/lib/liblqr-1.0.dylib
/opt/local/var/macports/logs/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr
/opt/local/var/macports/logs/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr/liblqr
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_graphics_liblqr
/usr/local/Library/Formula/liblqr.rb
/Users/kurtpfeifle/Downloads/opencsw/unstable/i386/5.10/liblqr_devel-0.4.1,REV=2010.03.22-SunOS5.8-i386-CSW.pkg.gz
/opt/local/lib/liblqr-1.la
               ^^^^^^^^^^^
/opt/local/lib/liblqr-1.0.dylib
               ^^^^^^^^^^^^^^^^
/opt/local/var/macports/software/liblqr/liblqr-1-0.4.1_0.darwin_11.x86_64.tbz2
/opt/local/var/macports/distfiles/liblqr/liblqr-1-0.4.1.tar.bz2
/opt/local/var/macports/distfiles/liblqr
/opt/local/var/macports/software/liblqr
(The only relevant hits are highlighted by me.) Now for the dependencies of liblqr itself. One way to look is again via otool -L (which is similar to the Linux ldd command):
pip@mbp:~$ otool -L /opt/local/lib/liblqr-1.0.dylib

Code: Select all

/opt/local/lib/liblqr-1.0.dylib:
	/opt/local/lib/liblqr-1.0.dylib (compatibility version 4.0.0, current version 4.1.0)
	/opt/local/lib/libglib-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.8.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 46.0.0)
	/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
I would be extremely pleased to see what results other Mac users do get for this command -- even if they are on Snow Leopard or on Mountain Lion (not Lion as I am).

Next, the ports (forward, reverse, build, runtime and whatnot) dependencies for the package liblqr are:

Code: Select all

pip@mbp:~$  port -v dependents liblqr
ImageMagick depends on liblqr (by port:)
gimp-lqr-plugin depends on liblqr (by port:)

pip@mbp:~$  port -v deps liblqr      
Full Name: liblqr @1-0.4.1_0
Build Dependencies:   port:pkgconfig
Library Dependencies: path:lib/pkgconfig/glib-2.0.pc:glib2

pip@mbp:~$  port -v rdeps liblqr --full                   # 'r': recursive
The following ports are dependencies of liblqr @1-0.4.1_0:
  port:pkgconfig
    path:lib/pkgconfig/glib-2.0.pc:glib2
      bin:xz:xz
        port:libiconv
          port:gperf
        port:gettext
          port:libiconv
            port:gperf
          port:ncurses
          port:expat
      port:gettext
        port:libiconv
          port:gperf
        port:ncurses
        port:expat
      port:libiconv
        port:gperf
      port:zlib
      port:libffi
      path:bin/perl:perl5
        port:perl5.12
          port:gdbm
            port:gettext
              port:libiconv
                port:gperf
              port:ncurses
              port:expat

pip@mbp:~$  port -v rdependents liblqr --full            # 'r': recursive
The following ports are dependent on liblqr:
  ImageMagick
    autotrace
    cuneiform
    inkscape
    pstoedit
      autotrace
    wv
  gimp-lqr-plugin
    gimp
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems running 'liquid-rescale' (MacPorts version of I

Post by fmw42 »

I get this on my Snow Leopard

Code: Select all

otool -L /opt/local/lib/liblqr-1.0.dylib
/opt/local/lib/liblqr-1.0.dylib:
	/opt/local/lib/liblqr-1.0.dylib (compatibility version 4.0.0, current version 4.1.0)
	/opt/local/lib/libglib-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.8.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 41.0.0)
	/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: Problems running 'liquid-rescale' (MacPorts version of I

Post by pipitas »

So the differences between what Snow Leopard uses to the Lion versions can be boiled down to these items currently:

Snow Leopard:
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 41.0.0)
Lion:
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 46.0.0)

Snow Leopard:
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
Lion:
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)

Snow Leopard:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
Lion:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

Snow Leopard:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
Lion:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)

Is there any Lion user in this forum reading this who has liquid-rescale working? What about Mountain Lion users?
coughlinjake
Posts: 1
Joined: 2012-10-01T09:25:43-07:00
Authentication code: 67789

Re: Problems running 'liquid-rescale' on Mac OS X Lion

Post by coughlinjake »

Has anyone resolved this issue on OS X Lion?

I'm actually using Homebrew to build/install ImageMagick, but I'm seeing exactly the same problems reported in this thread. ImageMagick builds and installs, but when I try to build PerlMagick (which I've downloaded from CPAN and building manually), I get:

Code: Select all

[~/Dropbox/src2/Perl/PerlMagick-6.77]$ make test
PERL_DL_NONLAZY=1 /usr/local/perl-5.16.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/jpeg/*.t t/jng/*.t t/jp2/*.t t/png/*.t t/tiff/*.t t/x11/*.t t/zlib/*.t
t/blob.t .......... Can't load '/Users/jakec/Dropbox/src2/Perl/PerlMagick-6.77/blib/arch/auto/Image/Magick/Magick.bundle' for module Image::Magick: dlopen(/Users/jakec/Dropbox/src2/Perl/PerlMagick-6.77/blib/arch/auto/Image/Magick/Magick.bundle, 2): Symbol not found: _lqr_pixel_get_rgbcol
  Referenced from: /usr/local/lib/liblqr-1.0.dylib
  Expected in: flat namespace
 in /usr/local/lib/liblqr-1.0.dylib at /usr/local/perl-5.16.1/lib/5.16.1/darwin-2level/DynaLoader.pm line 194.
 at t/blob.t line 20.
Compilation failed in require at t/blob.t line 20.
BEGIN failed--compilation aborted at t/blob.t line 20.
t/blob.t .......... 1/1 &Image::Magick::constant not defined. The required ImageMagick libraries are not installed or not installed properly.
END failed--call queue aborted at t/blob.t line 20.
t/blob.t .......... Dubious, test returned 22 (wstat 5632, 0x1600)
Here's the output from convert -list configure (since others have posted their results):

Code: Select all

[~]$ convert -list configure

Path: /usr/local/Cellar/imagemagick/6.7.7-6/lib/ImageMagick/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            cc
CFLAGS        -I/usr/local/Cellar/liblqr/0.4.1/include/lqr-1 -I/usr/local/Cellar/glib/2.32.4/include/glib-2.0 -I/usr/local/Cellar/glib/2.32.4/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -D_THREAD_SAFE -D_THREAD_SAFE -pthread -g -O2 -Wall -D_THREAD_SAFE -pthread
CODER_PATH    /usr/local/Cellar/imagemagick/6.7.7-6/lib/ImageMagick/modules-Q16/coders
CONFIGURE     ./configure  '--disable-osx-universal-binary' '--without-perl' '--prefix=/usr/local/Cellar/imagemagick/6.7.7-6' '--disable-dependency-tracking' '--enable-shared' '--disable-static' '--without-pango' '--with-included-ltdl' '--with-modules' '--disable-openmp' '--without-gslib' '--with-gs-font-dir=/usr/local/share/ghostscript/fonts' '--with-quantum-depth=16' '--with-rsvg' 'CC=cc' 'CXX=c++'
CONFIGURE_PATH /usr/local/Cellar/imagemagick/6.7.7-6/etc/ImageMagick/
COPYRIGHT     Copyright (C) 1999-2012 ImageMagick Studio LLC
CPPFLAGS      -I/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick
CXX           c++
CXXFLAGS      -g -O2 -D_THREAD_SAFE -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg jng jp2 lcms lqr lzma png rsvg tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS 'CC=cc' 'CXX=c++' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gs-font-dir=/usr/local/share/ghostscript/fonts --with-pango=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/Cellar/imagemagick/6.7.7-6/share/doc/ImageMagick
EXEC-PREFIX   /usr/local/Cellar/imagemagick/6.7.7-6
EXECUTABLE_PATH /usr/local/Cellar/imagemagick/6.7.7-6/bin
FEATURES      OpenCL
FILTER_PATH   /usr/local/Cellar/imagemagick/6.7.7-6/lib/ImageMagick/modules-Q16/filters
HOST          x86_64-apple-darwin11.4.2
INCLUDE_PATH  /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick
LDFLAGS       -L/usr/local/Cellar/imagemagick/6.7.7-6/lib -L/usr/X11/lib
LIB_VERSION   0x677
LIB_VERSION_NUMBER 6,7,7,6
LIBRARY_PATH  /usr/local/Cellar/imagemagick/6.7.7-6/lib/ImageMagick
LIBS          -lMagickCore -llcms -ltiff -lfreetype -ljpeg -L/usr/local/Cellar/glib/2.32.4/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -llqr-1 -lglib-2.0 -lintl -L/usr/X11/lib -lfontconfig -lXext -lSM -lICE -lX11 -lXt -L/usr/local/Cellar/xz/5.0.4/lib -llzma -lbz2 -lz -lm -Wl,-framework,OpenCL -lm -lpthread
NAME          ImageMagick
PCFLAGS
PREFIX        /usr/local/Cellar/imagemagick/6.7.7-6
QuantumDepth  16
RELEASE_DATE  2012-10-01
SHARE_PATH    /usr/local/Cellar/imagemagick/6.7.7-6/share/ImageMagick
SVN_REVISION  8165
TARGET_CPU    x86_64
TARGET_OS     darwin11.4.2
TARGET_VENDOR apple
VERSION       6.7.7
WEBSITE       http://www.imagemagick.org

Path: [built-in]

Name          Value
-------------------------------------------------------------------------------
NAME          ImageMagick
I used Homebrew build/install liblqr, and I've tried wiping ImageMagick and building without liblqr, but I get the same results.
Post Reply