acreman42 Posted March 26, 2009 Share Posted March 26, 2009 I'm trying to install PHP 5.2.9 on AIX 5.3. So far I've got Apache 2.2.11 installed and MySQL 5.1.32 installed with no problem. I got no errors during the ./configure but when I run make (GNU version) I get the following output. [root@slash php-5.2.9]# /usr/local/bin/make /bin/sh /tmp/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/libxml/ -I/tmp/php-5.2.9/ext/libxml/ -DPHP_ATOM_INC -I/tmp/php-5.2.9/include -I/tmp/php-5.2.9/main -I/tmp/php-5.2.9 -I/opt/freeware/include/libxml2 -I/tmp/php-5.2.9/ext/date/lib -I/opt/freeware/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/mysql/include -I/tmp/php-5.2.9/TSRM -I/tmp/php-5.2.9/Zend -I/usr/include -g -O2 -c /tmp/php-5.2.9/ext/libxml/libxml.c -o ext/libxml/libxml.lo /bin/sh /tmp/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile gcc -I/tmp/php-5.2.9/ext/pcre/pcrelib -Iext/pcre/ -I/tmp/php-5.2.9/ext/pcre/ -DPHP_ATOM_INC -I/tmp/php-5.2.9/include -I/tmp/php-5.2.9/main -I/tmp/php-5.2.9 -I/opt/freeware/include/libxml2 -I/tmp/php-5.2.9/ext/date/lib -I/opt/freeware/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/mysql/include -I/tmp/php-5.2.9/TSRM -I/tmp/php-5.2.9/Zend -I/usr/include -g -O2 -c /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_chartables.c -o ext/pcre/pcrelib/pcre_chartables.lo In file included from /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_chartables.c:25: /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_internal.h:976: error: expected specifier-qualifier-list before 'BOOL' /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_internal.h:1027: error: expected specifier-qualifier-list before 'BOOL' /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_internal.h:1137: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php__pcre_is_newline' /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_internal.h:1143: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php__pcre_was_newline' /tmp/php-5.2.9/ext/pcre/pcrelib/pcre_internal.h:1145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php__pcre_xclass' make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1 I need to get this version installed for work. Any suggestions would be appreciated. Quote Link to comment Share on other sites More sharing options...
tifozi Posted April 28, 2009 Share Posted April 28, 2009 I registered so that I could reply to your question, as I ran into this same issue today and google brings this up top if you query "php AIX compile". So hopefully others find the solution here as well. The problem is PCRE is not getting compiled on AIX due to this bug http://bugs.php.net/bug.php?id=46040 This bug actually exists in 5.2.6-5.2.9 and possibly other versions but the fix is the same. So do exactly as Bjorn Wiberg describes and patch pcre_internal.h which is located in php-x.x.x/ext/pcre/pcrelib after you untar the tarball. You can also edit the pcre_internal.h using a text editor like vi This is the original code in pcre_internal.h /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in environments where these macros are defined elsewhere. */ #ifndef FALSE typedef int BOOL; #define FALSE 0 #define TRUE 1 #endif Edit it to look like this instead /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in environments where these macros are defined elsewhere. */ #ifndef BOOL typedef int BOOL; #endif #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif Recompile and "make" again and you should have a shiny new libphp5.a Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.