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: Open Bug Type: Compile Failure Operating System: IBM AIX 5.2.0.0 ML3 PHP Version: 5.0.0 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [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
