[Sfw-team] [OpenIndiana Distribution - Bug #885] libgd is miscompiled

illumos project devnull at illumos.org
Thu Apr 21 12:46:48 UTC 2011


Issue #885 has been updated by Ryo Murakawa.

Assigned to set to OI SFW


----------------------------------------
Bug #885: libgd is miscompiled
https://www.illumos.org/issues/885

Author: River Tarnell
Status: New
Priority: Normal
Assigned to: OI SFW
Category: SFW (Solaris Freeware)
Target version: 


library/gd is compiled to use libpng.h from libpng 1.4, but links against libpng 1.2.  This means it doesn't work.  The following patch fixes the problem:

<pre>--- configure.ac.old    Wed Apr  6 22:24:52 2011
+++ configure.ac        Wed Apr  6 22:26:55 2011
@@ -350,14 +350,8 @@
 # authors decide to do this AGAIN. Which I really hope they won't. TBB
 
 if test "$withval" != no; then
-  AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config])
   AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
-  if test -n "$LIBPNG12_CONFIG"; then
-    libpng_CPPFLAGS=`libpng12-config --cflags`
-    # should be --ldopts, but it's currently broken
-    libpng_LDFLAGS=`libpng12-config --ldflags`
-    libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
-  elif test -n "$LIBPNG_CONFIG"; then
+  if test -n "$LIBPNG_CONFIG"; then
     libpng_CPPFLAGS=`libpng-config --cflags`
     # should be --ldopts, but it's currently broken
     libpng_LDFLAGS=`libpng-config --ldflags`
@@ -375,14 +369,7 @@
   _ldflags="$LDFLAGS"
   LDFLAGS="$libpng_LDFLAGS $LDFLAGS"
 
-  if test -n "$LIBPNG12_CONFIG"; then
-    AC_CHECK_LIB(png12,png_create_read_struct,
-      [LIBS="-lpng12 $LIBS"
-       FEATURES="GD_PNG $FEATURES"
-       AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
-      [LDFLAGS="$_ldflags"  
-       AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
-  elif test -n "$LIBPNG_CONFIG"; then
+  if test -n "$LIBPNG_CONFIG"; then
     AC_CHECK_LIB(png,png_create_read_struct,
       [LIBS="-lpng $LIBS" 
        FEATURES="GD_PNG $FEATURES"</pre>


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://www.illumos.org/my/account



More information about the Sfw-team mailing list