ID: 47812
User updated by: oeriksson at mandriva dot com
Reported By: oeriksson at mandriva dot com
-Status: Feedback
+Status: Open
Bug Type: GD related
Operating System: Mandriva Linux
PHP Version: 5.3.0RC1
New Comment:
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");
Previous Comments:
------------------------------------------------------------------------
[2009-03-27 19:36:56] [email protected]
Are you using the bundled libgd, or an external one?
------------------------------------------------------------------------
[2009-03-27 19:16:37] oeriksson at mandriva dot com
Description:
------------
I get an unresolved symbol when linking against system libgd.
Reproduce code:
---------------
Just running php-cli
Expected result:
----------------
Should work.
Actual result:
--------------
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib64/php/extensions/gd.so' - /usr/lib64/php/extensions/gd.so:
undefined symbol: gdJpegGetVersionInt in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47812&edit=1