|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-04-16 13:43 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
aclocal (GNU automake) 1.8.5 gcc version 3.3.4 GNU ld version 2.15.90.0.3 Apache (1.3 dev snapshot) PHP-5.2.2RC1 Tarballs verified to compile successfully on a desktop machine running another (more up-to-date) distro. cd src/apache-1.3 ./configure --prefix=/srv/www cd ../php-5.2.2RC1 ./configure --disable-cgi --disable-ipv6 --disable-short-tags \ --with-apache=../apache-1.3 --with-gnu-ld --with-zend-vm=GOTO make su make install exit cd ../apache-1.3 ./configure --activate-module=src/modules/php5/libphp5.a \ --enable-module=rewrite --prefix=/srv/www make ... ===> src/modules/php5 gcc -c -I../../os/unix -I../../include -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `../../apaci` mod_php5.c mod_php5.c:22:29: php_apache_http.h: No such file or directory In file included from mod_php5.c:23: ../../include/http_conf_globals.h:28: error: syntax error before "int" ../../include/http_conf_globals.h:29: error: syntax error before "int" [Many errors as you can imagine] src/modules/php5/Makefile doesn't contain paths and lib info from src/modules/php5/libphp5.module I Manually insert PHP_CFLAGS and PHP_LIBS from that file in to the Makefile. Then resume make ===> src make[1]: Entering directory `/home/build/apache-1.3' make[2]: Entering directory `/home/build/apache-1.3/src' ===> src/regex make[3]: Nothing to be done for `all'. <=== src/regex ===> src/os/unix make[3]: Nothing to be done for `all'. <=== src/os/unix ===> src/ap make[3]: Nothing to be done for `all'. <=== src/ap ===> src/main make[3]: Nothing to be done for `all'. <=== src/main ===> src/lib <=== src/lib ===> src/modules ===> src/modules/standard make[4]: Nothing to be done for `all'. <=== src/modules/standard ===> src/modules/php5 gcc -c -I../../os/unix -I../../include -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `../../apaci` -I/home/build/php-5.2.2RC1/main -I/home/build/php-5.2.2RC1/Zend -I/home/build/php-5.2.2RC1/TSRM -I/home/build/php-5.2.2RC1 -I/home/build/php-5.2.2RC1/sapi/apache -I/home/build/php-5.2.2RC1/main -I/home/build/php-5.2.2RC1/Zend -I/home/build/php-5.2.2RC1/TSRM mod_php5.c cp libmodphp5.a libphp5. ar r libphp5. mod_php5.o ranlib libphp5. cp libphp5. libphp5.a <=== src/modules/php5 <=== src/modules gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `./apaci` modules.c gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `./apaci` buildmark.c gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DNO_DL_NEEDED -O2 -fomit-frame-pointer -pipe `./apaci` \ -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php5/libphp5.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -lm -lcrypt -lexpat 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/apache-1.3/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/home/build/apache-1.3' make: *** [build] Error 2