#41102 [Opn->Fbk]: Unable to compile as static apache module
| From: | tony2001@php.net | Date: | Mon, 16 Apr 2007 16:58:20 +0000 |
| Subject: | #41102 [Opn->Fbk]: Unable to compile as static apache module | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111554@lists.php.net to get a copy of this message | ||
ID: 41102
Updated by: tony2001@php.net
Reported By: nobody at example dot org
-Status: Open
+Status: Feedback
Bug Type: *Compile Issues
Operating System: Linux
PHP Version: 5.2.2RC1
New Comment:
What EXACTLY are you doing and what do I need to do in order to
reproduce it?
Please describe all the steps.
Previous Comments:
------------------------------------------------------------------------
[2007-04-16 16:50:46] nobody at example dot org
> Great, but I apparently don't have your machine so I need to
> know how to reproduce it on my machine.
++Great
If I knew enough about the PHP & Apache build processes to tell you
that, surely I'd be contributing a patch instead of filing a bug report?
AFAIK, the Apache build process has not changed and the PHP cli
installs without error. (related?) problems occur only when compiling
Apache with PHP as a static module.
Problem #1
The info in libphp5.module is not being transferred to the generated
$APACHE/src/modules/php5/Makefile although the file libphp5.module is
present in that dir. I've verified these exact tarballs build a static
PHP module on another system without error (as previously noted) and was
able to manually edit the Makefile.
Problem #2
After manually editing the Makefile, Apache build still fails with this
linker error:
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/build/src/apache-1.3/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/build/src/apache-1.3'
make: *** [build] Error 2
------------------------------------------------------------------------
[2007-04-16 14:48:45] tony2001@php.net
>It is on the machine I'm attempting to build on
Great, but I apparently don't have your machine so I need to know how
to reproduce it on my machine.
------------------------------------------------------------------------
[2007-04-16 14:04:52] nobody at example dot org
> Not reproducible.
It is on the machine I'm attempting to build on - running Slackware
10.0.
The same machine built a PHP5.1 static module without error.
------------------------------------------------------------------------
[2007-04-16 13:53:35] tony2001@php.net
Not reproducible.
------------------------------------------------------------------------
[2007-04-16 13:43:28] nobody at example dot org
Description:
------------
I'm unable to compile 5.2.2RC1 as an Apache module on a specific
machine/configuration. Neither PHP_LIBS or PHP_CFLAGS are present in
apache src/modules/php5/Makefile
Even after manually adding include paths and libs to EXTRA_* in the
makefile, build fails at linker stage.
Problem system has:
autoconf (GNU Autoconf) 2.59
gcc version 3.3.4
Successfully compiled on another system with:
autoconf (GNU Autoconf) 2.61
gcc version 3.4.6
Reproduce code:
---------------
# Manual additions to /src/modules/php5/Makefile
EXTRA_LIBS=-Lmodules/php5 -L../modules/php5 -L../../modules/php5
-lmodphp5 \
-lcrypt -lz -ldl -lm -lxml2
EXTRA_INCLUDES=-I../../../../php-5.2.2RC1/main
-I../../../../php-5.2.2RC1/Zend \
-I../../../../php-5.2.2RC1/sapi/apache -I../../../../php-5.2.2RC1/ \
-I../../../../php-5.2.2RC1/TSRM
Expected result:
----------------
Clean compile.
Actual result:
--------------
modules.o(.data+0x44): undefined reference to `php5a_module'
modules.o(.data+0xa4): undefined reference to `php5a_module'
collect2: ld returned 1 exit status
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41102&edit=1