ID: 29190 User updated by: Bjorn dot Wiberg at its dot uu dot se Reported By: Bjorn dot Wiberg at its dot uu dot se -Status: Feedback +Status: Open Bug Type: Compile Failure -Operating System: IBM AIX 5.2.0.0 ML3 +Operating System: IBM AIX 5.2.0.0 ML5 -PHP Version: 5.0.0 +PHP Version: 5.0.3 New Comment:
Hello Tony! I just tried with php5-STABLE-200502110730; unfortunately, the problem is still there: /../ /bin/sh /usr/local/src/php5-STABLE-200502110730/libtool --silent --preserve-dup-deps --mode=compile /usr/local/bin/gcc -I/usr/local/src/php5-STABLE-200502110730/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_XPM -DHAVE_LIBFREETYPE -DJISX0208 -Iext/gd/ -I/usr/local/src/php5-STABLE-200502110730/ext/gd/ -DPHP_ATOM_INC -I/usr/local/src/php5-STABLE-200502110730/include -I/usr/local/src/php5-STABLE-200502110730/main -I/usr/local/src/php5-STABLE-200502110730 -I/usr/local/src/php5-STABLE-200502110730/Zend -I/opt/freeware/include/libxml2 -I/opt/freeware/include -I/usr/local/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/oniguruma -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/libmbfl -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/libmbfl/mbfl -I/usr/local/mnogosearch/include -I/usr/local/mysql/include/mysql -I/usr/local/include -I/usr/local/src/php5-STABLE-200502110730/TSRM -g -O2 -c /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c -o ext/gd/gd.lo /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c: In function `zm_info_gd': /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c:504: error: `FREETYPE_MAJOR' undeclared (first use in this function) /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c:504: error: (Each undeclared identifier is reported only once /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c:504: error: for each function it appears in.) /usr/local/src/php5-STABLE-200502110730/ext/gd/gd.c:504: error: `FREETYPE_MINOR' undeclared (first use in this function) make: *** [ext/gd/gd.lo] Error 1 [EMAIL PROTECTED]:/usr/local/src/php5-STABLE-200502110730# /../ An excerpt from the generated Makefile shows GDLIB_CFLAGS as: GDLIB_CFLAGS = -I/usr/local/src/php5-STABLE-200502110730/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_XPM -DHAVE_LIBFREETYPE -DJISX0208 The -I for FreeType seems to be gone there (a change from e.g. PHP 5.0.3). Instead, the INCLUDES line reads: INCLUDES = -I$(top_builddir)/Zend -I/opt/freeware/include/libxml2 -I/opt/freeware/include -I/usr/local/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/oniguruma -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/libmbfl -I/usr/local/src/php5-STABLE-200502110730/ext/mbstring/libmbfl/mbfl -I/usr/local/mnogosearch/include -I/usr/local/mysql/include/mysql However, as you can see, the -I/opt/freeware/include still appears before -I/usr/lib/freetype2, which causes the problem. I'd be happy to try compiling again whenever you want me to. Best regards, Björn Previous Comments: ------------------------------------------------------------------------ [2005-02-10 19:57:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2004-07-15 20:26:09] Bjorn dot Wiberg at its dot uu dot se Similar errors (of course) occur with PHP 4.3.8 on the same system: ... /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1066: error: `ft_kerning_default' u ndeclared (first use in this function) /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1066: error: `delta' undeclared (fi rst use in this function) /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1072: warning: implicit declaration of function `FT_Load_Glyph' /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1084: error: `glyph_bbox' undeclare d (first use in this function) /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1115: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1115: error: `ft_glyph_format_bitma p' undeclared (first use in this function) /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1115: error: `ft_render_mode_normal ' undeclared (first use in this function) /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1126: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1126: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1126: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1133: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c:1134: error: dereferencing pointer to incomplete type /usr/local/src/php-4.3.8/ext/gd/libgd/gdft.c: At top level: /usr/local/src/php-4.3.8/TSRM/tsrm_virtual_cwd.h:170: warning: `php_realpath_hac k' defined but not used make: The error code from the last command is 1. Stop. The solution is the same one, i.e., to change the GDLIB_CFLAGS line in the Makefile after running configure. Best regards, Björn ------------------------------------------------------------------------ [2004-07-15 20:19:40] Bjorn dot Wiberg at its dot uu dot se A "manual" solution is to edit the Makefile after running configure, making sure that the GDLIB_CFLAGS line starts with: GDLIB_CFLAGS = -I/usr/include/freetype2 ...followed by whatever was on that line previously. It would be nice if the configure script somehow would put FreeType include paths before the OpenSSL ones, as that would solve the problem permanently. Best regards, Björn ------------------------------------------------------------------------ [2004-07-15 20:15:56] Bjorn dot Wiberg at its dot uu dot se Description: ------------ If OpenSSL support is configured (OpenSSL installed from RPM), and both FreeType 1 and 2 are installed on the system, OpenSSL causes GDLIB_CFLAGS to list -I/opt/freeware/include before -I/usr/include/freetype2, such that the chosen FreeType version (2) accidentally includes /opt/freeware/include/freetype/freetype.h (from FreeType 1.x) instead of the correct one, /usr/include/freetype2/freetype/freetype.h (from FreeType 2). This causes a compile failure. Reproduce code: --------------- Install RPMs "openssl-0.9.6m-1" and "openssl-devel-0.9.6m-1" (or later) from http://www.bullfreeware.com/listaix52.html. Configure PHP 5 with the following directives (from config.nice): CPPFLAGS='-I/usr/local/include' \ LDFLAGS='-L/lib -L/opt/freeware/lib -L/usr/local/lib' \ CC='/usr/local/bin/gcc' \ './configure' \ '--enable-bcmath' \ '--enable-calendar' \ '--enable-dba' \ '--enable-exif' \ '--enable-embedded-mysqli' \ '--enable-debug' \ '--enable-filepro' \ '--enable-gd-jis-conv' \ '--enable-gd-native-ttf' \ '--enable-mbstring' \ '--enable-memory-limit' \ '--enable-versioning' \ '--enable-zend-multibyte' \ '--prefix=/apache/php' \ '--with-apxs2=/apache/bin/apxs' \ '--with-apxs2filter=/apache/bin/apxs' \ '--with-freetype-dir' \ '--with-gd' \ '--with-gdbm' \ '--with-gettext' \ '--with-inifile' \ '--with-jpeg-dir' \ '--with-ldap' \ '--with-libxml-dir' \ '--with-mime-magic' \ '--with-mnogosearch' \ '--with-mysql=/usr/local/mysql' \ '--with-openssl=/opt/freeware' \ '--with-png-dir' \ '--with-tiff-dir' \ '--with-ttf' \ '--with-xpm-dir' \ '--with-zlib' \ '--with-zlib-dir' Notice the "--with-openssl" path and "--with-freetype-dir". Compile with 'make'. Expected result: ---------------- Compilation success. Actual result: -------------- Excerpt from 'make': ... /usr/local/bin/gcc -I/usr/local/src/php-5.0.0/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_XPM -DHAVE_LIBFREETYPE -DJISX0208 -Iext/gd/ -I/usr/local/src/php-5.0.0/ext/gd/ -DPHP_ATOM_INC -I/usr/local/src/php-5.0.0/include -I/usr/local/src/php-5.0.0/main -I/usr/local/src/php-5.0.0 -I/usr/local/src/php-5.0.0/Zend -I/opt/freeware/include/libxml2 -I/opt/freeware/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/src/php-5.0.0/ext/mbstring/oniguruma -I/usr/local/src/php-5.0.0/ext/mbstring/libmbfl -I/usr/local/src/php-5.0.0/ext/mbstring/libmbfl/mbfl -I/usr/local/mnogosearch/include -I/usr/local/mysql/include/mysql -I/usr/local/include -I/usr/local/src/php-5.0.0/TSRM -g -Wall -c /usr/local/src/php-5.0.0/ext/gd/gd.c -DPIC -o ext/gd/gd.lo /usr/local/src/php-5.0.0/ext/gd/gd.c: In function `zm_info_gd': /usr/local/src/php-5.0.0/ext/gd/gd.c:487: error: `FREETYPE_MAJOR' undeclared (first use in this function) /usr/local/src/php-5.0.0/ext/gd/gd.c:487: error: (Each undeclared identifier is reported only once /usr/local/src/php-5.0.0/ext/gd/gd.c:487: error: for each function it appears in.) /usr/local/src/php-5.0.0/ext/gd/gd.c:487: error: `FREETYPE_MINOR' undeclared (first use in this function) /usr/local/src/php-5.0.0/ext/gd/gd.c: At top level: /usr/local/src/php-5.0.0/TSRM/tsrm_virtual_cwd.h:182: warning: `php_realpath_hack' defined but not used make: The error code from the last command is 1. Stop. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29190&edit=1