Re: ERROR: function LockSemaphoreInfo, file magick/semaphore.c, line 525

Ron Lussier <[email protected]> Tue, 30 Mar 2010 11:10:45 -0700
Newsgroups gmane.comp.video.graphicsmagick.bugs
Message-ID <[email protected]>
On Mar 29, 2010, at 5:48 PM, Ron Lussier wrote:

> <bottom>
> 
> On Mon, Mar 29, 2010 at 5:46 PM, <[email protected]> wrote:
> 
> ----- Original Message -----
> From: "Bob Friesenhahn" <[email protected]>
> To: "Ron Lussier" <[email protected]>
> Cc: [email protected]
> Sent: Monday, March 29, 2010 5:58:54 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [GM-bugs] ERROR: function LockSemaphoreInfo, file magick/semaphore.c, line 525
> 
> On Mon, 29 Mar 2010, Ron Lussier wrote:
> >
> > I get:
> >       trotter /opt/jagundi/devtools > gm convert -list formats | grep PNG
> >
> >             PNG P  rw-  Portable Network Graphics (libpng 1.4.1,1.2.41, zlib 1.2.3)
> >
> >                   See http://www.libpng.org/ for information on PNG..
> >     PNG24 P  rw-  24-bit RGB PNG, opaque only (libpng 1.4.1,1.2.41, zlib 1.2.3)
> >     PNG32 P  rw-  32-bit RGBA PNG, semitransparency OK (libpng 1.4.1,1.2.41, zlib 1.2.3)
> >      PNG8 P  rw-  8-bit indexed PNG, binary transparency only (libpng 1.4.1,1.2.41, zlib 1.2.3)
> >
> >
> > I'm not sure why I'm getting the double-libraries.  I uninstalled libpng and installed an earlier version (1.2.39):
> 
> That is really interesting.  From looking at the png.c code, I see
> that first a PNG_LIBPNG_VER_STRING from the PNG header files is
> consulted, and then png_get_libpng_ver() is used to get the actual
> (maybe shared) library version.  My guess is that your libpng header
> files don't match the library version which was used.  It seems that
> newer headers were used, but the linkage was against an older libpng.
> 
>      Yes.
> 
> This may indicate a problem with the linker search options.
> 
>      Yes.
> 
> >             PNG P  rw-  Portable Network Graphics (libpng 1.2.39,1.2.41, zlib 1.2.3)
> 
> It seems that even here, there are two different libpng versions
> involved.
> 
>      This is not a problem, since 1.2.39 and 1.2.41 are ABI compatible.
> 
>      But 1.4.1,1.2.41 is a problem, since 1.4.x is incompatible with 1.2.x.
> 
>      Go ahead and reinstall 1.4.1, but then you must reconfigure and rebuild
>      GraphicsMagick.  Another libpng-1.2.41 seems to be lurking on your system
>      (i.e., you did not succeed in uninstalling it) so you will need to use
>      LDFLAGS to prevent that one from being used to satisfy the linker.
> 
>      Glenn
> 
> Is it possible that the standard build for libpng builds both?  When I deleted libpng, GM showed no png support.


I figured out what's happening.  On OSX, the X11 system includes a bunch of libpng installations, all of them version 1.2.  Here's a dump from 'locate':

> /Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/Tcl/Tcllib/png.html
> /Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/Tcl/TkImg/img-png.html
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/wx-2.5/wx/imagpng.h
> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/png.h
> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng12/png.h
> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/png.h
> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wx-2.8/wx/imagpng.h
> /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/libpng12/png.h
> /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/png.h
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/wx-2.8/wx/imagpng.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/.svn/prop-base/png.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/.svn/text-base/png.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/.svn/prop-base/readpng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/.svn/prop-base/writepng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/.svn/text-base/readpng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/.svn/text-base/writepng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/readpng.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/contrib/gregbook/writepng.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.2.39/png.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/.svn/prop-base/png.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/.svn/text-base/png.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/.svn/prop-base/readpng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/.svn/prop-base/writepng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/.svn/text-base/readpng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/.svn/text-base/writepng.h.svn-base
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/readpng.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/contrib/gregbook/writepng.h
> /opt/jagundi/devtools/imageProcessing/libpng/1.4.1/png.h
> /usr/X11/include/libpng12/png.h
> /usr/X11/include/png.h
> /usr/include/wx-2.8/wx/imagpng.h
> /usr/local/include/libpng14/png.h
> /usr/local/include/png.h

When I build libpng 1.4 myself, it conflicts with the built-in libpng that OSX supplies.  I'm not sure if this is a problem for GM... I'll leave that for you guys to decide.

coyote

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Graphicsmagick-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-bugs