ID:               46015
 Updated by:       paj...@php.net
 Reported By:      Fedora at FamilleCollet dot com
-Status:           No Feedback
+Status:           Closed
 Bug Type:         GD related
 Operating System: Linux (Fedora 9)
 PHP Version:      5.3.0alpha2
 Assigned To:      pajoye
 New Comment:

Fixed in 5.3.0 and later.


Previous Comments:
------------------------------------------------------------------------

[2009-04-15 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2009-04-07 09:27:06] paj...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[2009-03-27 18:50:40] tsteiner at nerdclub dot net

Here's a quick patch that removes support for building against an
external libgd and replaces it with an error message.  It seems to work
as intended but I am by no means experienced with the autoconf system.

--- php-5.3.0RC1.orig/ext/gd/config.m4       2009-01-14
13:05:59.000000000 -0600
+++ php-5.3.0RC1/ext/gd/config.m4   2009-03-27 13:42:01.071603975
-0500
@@ -262,7 +262,6 @@
 dnl
 
 if test "$PHP_GD" = "yes"; then
-  GD_MODULE_TYPE=builtin
   extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c
libgd/gd_io_dp.c \
                  libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c
libgd/gd_png.c libgd/gd_jpeg.c \
                  libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c
libgd/gdfontmb.c libgd/gdfontl.c \
@@ -339,57 +338,7 @@
 else
 
  if test "$PHP_GD" != "no"; then
-  GD_MODULE_TYPE=external
-  extra_sources="gdcache.c"
-
-dnl Various checks for GD features
-  PHP_GD_ZLIB
-  PHP_GD_TTSTR
-  PHP_GD_JPEG
-  PHP_GD_PNG
-  PHP_GD_XPM
-  PHP_GD_FREETYPE2
-  PHP_GD_T1LIB
-
-dnl Header path
-  for i in include/gd1.3 include/gd include gd1.3 gd ""; do
-    test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i"
-  done
-
-dnl Library path
-  for i in $PHP_LIBDIR/gd1.3 $PHP_LIBDIR/gd $PHP_LIBDIR gd1.3 gd "";
do
-    test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" || test -f
"$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i"
-  done
-
-  if test -n "$GD_INCLUDE" && test -n "$GD_LIB"; then
-    PHP_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB, GD_SHARED_LIBADD)
-    AC_DEFINE(HAVE_LIBGD,1,[ ])
-    PHP_GD_CHECK_VERSION
-  elif test -z "$GD_INCLUDE"; then
-    AC_MSG_ERROR([Unable to find gd.h anywhere under $PHP_GD])
-  else
-    AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under
$PHP_GD])
-  fi
-
-  PHP_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE)
-
-  dnl
-  dnl Check for gd 2.0.4 greater availability
-  dnl
-  old_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS=-I$GD_INCLUDE
-  AC_TRY_COMPILE([
-#include <gd.h>
-#include <stdlib.h>
-  ], [
-gdIOCtx *ctx;
-ctx = malloc(sizeof(gdIOCtx));
-ctx->gd_free = 1;
-  ], [
-    AC_DEFINE(HAVE_LIBGD204, 1, [ ])
-  ])
-  CPPFLAGS=$old_CPPFLAGS
-
+  AC_MSG_ERROR([Building the GD extension against an external libgd is
not supported.])
  fi
 fi
 
@@ -399,23 +348,13 @@
 if test "$PHP_GD" != "no"; then
   PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,,
\\$(GDLIB_CFLAGS))
 
-  if test "$GD_MODULE_TYPE" = "builtin"; then
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
-    PHP_ADD_BUILD_DIR($ext_builddir/libgd)
-    GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
-
-    PHP_TEST_BUILD(foobar, [], [
-      AC_MSG_ERROR([GD build test failed. Please check the config.log
for details.])
-    ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
-  else
-    GD_HEADER_DIRS="ext/gd/"
-    GDLIB_CFLAGS="-I$GD_INCLUDE $GDLIB_CFLAGS"
-    PHP_ADD_INCLUDE($GD_INCLUDE)
-
-    PHP_CHECK_LIBRARY(gd, gdImageCreate, [], [
-      AC_MSG_ERROR([GD build test failed. Please check the config.log
for details.])
-    ], [ -L$GD_LIB $GD_SHARED_LIBADD ])
-  fi
+  GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
+  PHP_ADD_BUILD_DIR($ext_builddir/libgd)
+  GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
+
+  PHP_TEST_BUILD(foobar, [], [
+    AC_MSG_ERROR([GD build test failed. Please check the config.log
for details.])
+  ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
 
   PHP_INSTALL_HEADERS([$GD_HEADER_DIRS])
   PHP_SUBST(GDLIB_CFLAGS)

------------------------------------------------------------------------

[2009-03-27 18:03:22] tsteiner at nerdclub dot net

This is still an issue in 5.3.0RC1.  If building against an external
version of GD is no longer supported, the configure script should
probably be updated to throw an error or at least a warning should one
try to do so.  Currently, the build just fails during "make" with the
error:

ext/gd/gd.c:72:23: error: gdhelpers.h: No such file or directory

leaving the user with no idea what to do.

------------------------------------------------------------------------

[2008-12-05 18:53:05] php-bugs-2008 at ryandesign dot com

Thanks for letting us know why specifically the bundled libgd is
superior (the imagefilter and imagerotate functions). Given this, I will
switch MacPorts php5 back to using the bundled libgd.

You must admit however there is room for confusion. The first sentence
on the installation instructions [1] says "If you have the GD library
(available at ยป http://www.libgd.org/) you will also be able to create
and manipulate images." And the libgd homepage in turn says "The library
[...] is now maintained by Pierre-A. Joye under the umbrella of
PHP.net." This gives the impression that the standalone libgd is being
developed by the same people who develop PHP's bundled libgd. The note
further down the installation instructions reads "Since PHP 4.3 there is
a bundled version of the GD lib [which] should be used in preference to
the external library since its codebase is better maintained and more
stable." Because PHP 4.3 is so old, someone reading this note might well
assume the information is outdated, and that since libgd is now under
PHP.net's umbrella, the unique changes in PHP's bundled libgd are now in
the standalone libgd as well.

php5 has supported standalone libgd, up to and including php 5.3.0
alpha 1. So it would be good if php 5.3.0 final did not break this. Or,
if it is your intention to break this, then do so with a friendlier
message in the configure phase and update the documentation.

[1] http://www.php.net/manual/en/image.setup.php

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/46015

-- 
Edit this bug report at http://bugs.php.net/?id=46015&edit=1

Reply via email to