Bug #885
libgd is miscompiled
Start date:
2011-04-06
Due date:
2011-09-14
% Done:
100%
Estimated time:
8.00 h
Difficulty:
Medium
Tags:
needs-triage
Description
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:
--- 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"
Updated by Ken Mays over 9 years ago
- Due date set to 2011-09-14
- Status changed from New to Resolved
- Target version set to oi_151_stable
- % Done changed from 0 to 100
- Estimated time set to 8.00 h
- Difficulty set to Medium
- Tags set to needs-triage
Fixed in oi_151.