#47093 [Fbk->Csd]: make fails on target `sapi/apache2handler/mod_php5.lo'
| From: | clawson at uen dot org | Date: | Thu, 15 Jan 2009 18:42:00 +0000 |
| Subject: | #47093 [Fbk->Csd]: make fails on target `sapi/apache2handler/mod_php5.lo' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-132921@lists.php.net to get a copy of this message | ||
ID: 47093
User updated by: clawson at uen dot org
Reported By: clawson at uen dot org
-Status: Feedback
+Status: Closed
Bug Type: Compile Failure
Operating System: Solaris 10 (sparc)
PHP Version: 5.2.8
New Comment:
OK, I figured it out. The sapi/apache2hander/config.m4 gave me the
clue I needed. One of the first things it does is run 'apxs -q
CFLAGS'.
When I compiled httpd-2.2.11 I needed to add a CFLAGS value:
CFLAGS="-DUSE_ATOMICS_GENERIC". The first time I had a space between
the -D and the USE_ATOMICS_GENERIC. I removed the space, recompiled
httpd, then started over with PHP. This make successfully
completed--the -D was gone.
You can see the slight difference in running the apxs command
manually.
Before recompiling httpd:
$ /opt/httpd/apache-2.2.11/sbin/apxs -q CFLAGS
-D USE_ATOMICS_GENERIC
And after:
$ /opt/httpd/apache-2.2.11/sbin/apxs -q CFLAGS
-DUSE_ATOMICS_GENERIC
I moved this bug to closed. Thanks for the extra eyes, I got the
information I needed to figure out the problem.
Previous Comments:
------------------------------------------------------------------------
[2009-01-15 17:25:19] clawson at uen dot org
Thanks, I didn't catch the extra '-D'. It helps to have another set of
eyes.
Removing the -D from this line and running it manually completes
successfully.
However, I don't know where this -D is coming from. You can see that I
am setting CC and CXX variables as part of the configure statement.
Looking at my environment, none of these variables are set elsewhere.
And, reviewing the complete output of make, this is the only place this
null value -D happens.
Suggestions on where I can further look to solve this?
------------------------------------------------------------------------
[2009-01-15 15:06:08] jani@php.net
And EXTRA_CFLAGS it propably is..
------------------------------------------------------------------------
[2009-01-15 15:02:23] jani@php.net
Check your CFLAGS / CXXFLAGS / etc. environment variables. You seem to
have one stray -D there..
------------------------------------------------------------------------
[2009-01-13 22:52:02] clawson at uen dot org
Description:
------------
make fails with --with-apxs2=/opt/httpd/apache-2.2.11/sbin/apxs
last out from make is:
/bin/sh /opt/src/php-5.2.8/libtool --silent --preserve-dup-deps
--mode=compile /opt/cooltools-4.2.1/gcc/bin/gcc -D -I/opt/httpd/apach
e-2.2.11/include -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-D_LARGEFILE64_SOURCE -I/opt/httpd/apache-2.2.11/include -I/
opt/httpd/apache-2.2.11/include -Isapi/apache2handler/
-I/opt/src/php-5.2.8/sapi/apache2handler/ -DPHP_ATOM_INC
-I/opt/src/php-5.2.8/
include -I/opt/src/php-5.2.8/main -I/opt/src/php-5.2.8
-I/usr/include/libxml2 -I/usr/local/ssl/include -I/opt/curl/include
-I/opt/src/
php-5.2.8/ext/date/lib -I/opt/mysql/include/mysql
-I/opt/src/php-5.2.8/TSRM -I/opt/src/php-5.2.8/Zend
-D_POSIX_PTHREAD_SEMANTICS -I/
usr/local/include -g -O2 -c
/opt/src/php-5.2.8/sapi/apache2handler/mod_php5.c -o
sapi/apache2handler/mod_php5.lo
<command-line>: error: macro names must be identifiers
*** Error code 1
make: Fatal error: Command failed for target
`sapi/apache2handler/mod_php5.lo'
configure completed without error.
configure statement:
CC=/opt/cooltools-4.2.1/gcc/bin/gcc \
CXX=/opt/cooltools-4.2.1/gcc/bin/gcc \
./configure \
--prefix=/opt/php/php-5.2.8-mysql-5.0.75 \
--with-config-file-path=/etc/opt/php \
--with-apxs2=/opt/httpd/apache-2.2.11/sbin/apxs \
--with-zlib-dir=/usr/lib \
--with-bz2=/usr/lib \
--with-jpeg-dir=/usr/sfw \
--with-png-dir=/usr/sfw \
--with-gd \
--enable-magic-quotes \
--enable-bcmath \
--enable-calendar \
--enable-pcntl \
--enable-sigchild \
--enable-ftp \
--without-sqlite \
--with-pear \
--with-curl=/opt/curl \
--with-openssl=/usr/local/ssl \
--with-mysql=/opt/mysql
Remove the --with-apxs2 directive and make completes without problems.
Attempted snapshot php5.2-200901132130 and got the same error.
Solaris 10:
$ cat /etc/release
Solaris 10 10/08 s10s_u6wos_07b SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008
$ gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with:
/net/clpt-v490-1/export/data/bldmstr/20081023_ceres_gcc421/src/configure
--prefix= --enable-shared --with-system-zlib --enable-checking=release
--disable-libmudflap --enable-languages=c,c++ --with-cpu=v9
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --disable-gnattools
--with-mpfr=/ws/gccfss/tools --with-gmp=/ws/gccfss/tools --enable-tls
Thread model: posix
gcc version 4.2.1 (20081023) (gccfss)
Solaris make (/usr/ccs/bin/make)
Expected result:
----------------
successful make
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47093&edit=1