#47812 [Com]: undefined symbol: gdJpegGetVersionInt
| From: | oeriksson at mandriva dot com | Date: | Fri, 27 Mar 2009 20:14:17 +0000 |
| Subject: | #47812 [Com]: undefined symbol: gdJpegGetVersionInt | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135227@lists.php.net to get a copy of this message | ||
ID: 47812
Comment by: oeriksson at mandriva dot com
Reported By: oeriksson at mandriva dot com
Status: Assigned
Bug Type: GD related
Operating System: Mandriva Linux
PHP Version: 5.3.0RC1
Assigned To: pajoye
New Comment:
Upstream gd is nowadays libgd.org and I read there "The library was
originally developped by Thomas Boutell and is now maintained by
Pierre-A. Joye under the umbrella of PHP.net.". Is this a problem?
Previous Comments:
------------------------------------------------------------------------
[2009-03-27 20:05:33] pajoye@php.net
You missed my point.
These distributions do not have updated libraries, or even worst for
debian, they break the compatibility with the normal GD.
I'm working to sync the external gd and php's gd so both can be used
smoothly, but I have serious doubts that Debian will change, for
example.
------------------------------------------------------------------------
[2009-03-27 20:04:23] rasmus@php.net
That argument completely falls apart if you do a bit of research on who
the upstream for the gd library is.
------------------------------------------------------------------------
[2009-03-27 19:59:07] oeriksson at mandriva dot com
The PHP devs should try harder to not bundle common libraries and
instead push private changes upstream (IMHO).
------------------------------------------------------------------------
[2009-03-27 19:49:27] pajoye@php.net
You should really not use the system libgd, especially not on the
following systems:
- debian
- RHEL
- Centos
The problem still has to be fixed tho' :)
------------------------------------------------------------------------
[2009-03-27 19:45:31] oeriksson at mandriva dot com
I described it in "Description:" :-)
Here's a proposed fix:
--- ext/gd/gd.c 2009-01-31 16:27:52.000000000 +0100
+++ ext/gd/gd.c.oden 2009-03-27 20:27:14.000000000 +0100
@@ -55,6 +55,15 @@
#if HAVE_LIBGD
+#ifdef HAVE_GD_PNG
+/* needs to be first */
+# include <png.h>
+#endif
+
+#ifdef HAVE_GD_JPG
+# include <jpeglib.h>
+#endif
+
static int le_gd, le_gd_font;
#if HAVE_LIBT1
#include <t1lib.h>
@@ -1293,8 +1302,13 @@ PHP_MINFO_FUNCTION(gd)
#endif
#ifdef HAVE_GD_JPG
{
+#if HAVE_GD_BUNDLED
char tmp[12];
snprintf(tmp, sizeof(tmp), "%d",
gdJpegGetVersionInt());
+#else
+ char tmp[256];
+ snprintf(tmp, sizeof(tmp), "%d", JPEG_LIB_VERSION);
+#endif
php_info_print_table_row(2, "JPG Support", "enabled");
php_info_print_table_row(2, "libJPEG Version", tmp);
}
@@ -1302,7 +1316,11 @@ PHP_MINFO_FUNCTION(gd)
#ifdef HAVE_GD_PNG
php_info_print_table_row(2, "PNG Support", "enabled");
+#if HAVE_GD_BUNDLED
php_info_print_table_row(2, "libPNG Version",
gdPngGetVersionString());
+#else
+ php_info_print_table_row(2, "libPNG Version",
PNG_LIBPNG_VER_STRING);
+#endif
#endif
#ifdef HAVE_GD_WBMP
php_info_print_table_row(2, "WBMP Support", "enabled");
------------------------------------------------------------------------
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/47812
--
Edit this bug report at http://bugs.php.net/?id=47812&edit=1