Building apache with options PHP4 and PERL fails on Tru64. This is caused by
the way the perl.rpm builds, ie. the perl configure script uses flag -ansi
with gcc on Tru64. When building mod_php, the perl cflags are added to the
compiler command, meaning -ansi is added. However the mod_php sources use
the keyword 'inline' which isn't accepted by GCC when -ansi is specified.
There's 2 ways to fix this and I was wondering what would be the best way?!
1. fix the perl.rpm so it doesn't use -ansi
2. fix the apache.rpm
Method 1: use following patch in perl.rpm
--- hints/dec_osf.sh 2002-07-15 19:28:34.000000000 +0200
+++ hints/dec_osf.sh.new 2003-09-01 13:58:59.000000000 +0200
@@ -124,7 +124,7 @@
# be nauseatingly ANSI
case "" in
-gcc) ccflags=" -ansi"
+gcc) ccflags=" "
;;
*) ccflags=" -std"
;;
Method 2: remove -ansi from PERL_CCFLAGS in
apache_1.3.28/src/modules/php4/Makefile
$ grep PERL_CCFLAGS apache_1.3.28/src/modules/php4/Makefile
PERL_CCFLAGS=-ansi -fno-strict-aliasing -I/cw/include -DLANGUAGE_C
Below is the build failure:
/cw/RPM/TMP/apache-1.3.28/apache_1.3.28/src/modules/php4$ make
/cw/bin/cc -c -I../.. -I/cw/lib/perl/5.8.0/alpha-dec_osf/CORE
-I../../os/unix -I../../include -DOSF1 -DTARGET=\"apache\" -DMOD_PERL
-DUSE_PERL_SSI -ansi -fno-strict-aliasing -I/cw/include -DLANGUAGE_C -O2
-DOSF1 -DTARGET=\"apache\" -DMOD_PERL -DUSE_PERL_SSI -ansi
-fno-strict-aliasing -I/cw/include -DLANGUAGE_C -I/cw/include
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/TSRM
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend
-I/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/TSRM mod_php4.c
In file included from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend.h:202,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache/php_apache_http.h:12,
from mod_php4.c:22:
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_hash.h:191: error: syntax
error before "ulong"
In file included from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_globals.h:30,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_list.h:25,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_API.h:26,
from /usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php.h:38,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php_variables.h:25,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache/php_apache_http.h:40,
from mod_php4.c:22:
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_ptr_stack.h:41: error:
syntax error before "void"
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_ptr_stack.h:51: error:
syntax error before "void"
In file included from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_execute_globals.h:27,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_globals.h:34,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_list.h:25,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_API.h:26,
from /usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php.h:38,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php_variables.h:25,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache/php_apache_http.h:40,
from mod_php4.c:22:
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_operators.h:61: error:
syntax error before "int"
In file included from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_API.h:30,
from /usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php.h:38,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/main/php_variables.h:25,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache/php_apache_http.h:40,
from mod_php4.c:22:
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_execute.h:39: error:
syntax error before "void"
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_execute.h:49: error:
syntax error before "int"
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_execute.h:89: error:
syntax error before "void"
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/Zend/zend_execute.h:101: error:
syntax error before "int"
In file included from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/ext/standard/php_standard.h:23,
from
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/sapi/apache/php_apache_http.h:43,
from mod_php4.c:22:
/usr/cw/RPM/TMP/apache-1.3.28/php-4.3.2/ext/standard/php_string.h:133:
error: syntax error before "char"
make: *** [mod_php4.o] Error 1
/cw/RPM/TMP/apache-1.3.28/apache_1.3.28/src/modules/php4$
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Developer Communication List [EMAIL PROTECTED]