php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17534 port www/mod_php4 fails compile with apache2
Submitted: 2002-05-30 18:12 UTC Modified: 2002-06-02 11:04 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php4 at liwing dot de Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.2.1 OS: FreeBSD 4.6-RC
Private report: No CVE-ID: None
 [2002-05-30 18:12 UTC] php4 at liwing dot de
I just set up a test machine using apache2 and php4.2.1. After I compiled successfully apache2 and the
standalone version of php4, I tried to compile the mod_php4-port. Following errors encountered:

BATCH=yes WITH_APACHE2=yes make install clean
===>  Building for mod_php4-4.2.1_1
Making all in Zend
Making all in main
Making all in ext
Making all in zlib
Making all in bz2
Making all in ctype
Making all in gd
Making all in gettext
Making all in iconv
Making all in ldap
Making all in mcrypt
Making all in mhash
Making all in mysql
Making all in pcre
Making all in pcrelib
Making all in pdf
Making all in pgsql
Making all in posix
Making all in session
Making all in sockets
Making all in standard
Making all in sysvsem
Making all in sysvshm
Making all in xml
Making all in xmlrpc
Making all in libxmlrpc
Making all in xslt
Making all in sapi
Making all in apache2filter
/bin/sh /usr/ports/www/mod_php4/work/php-4.2.1/libtool --silent --mode=compile cc  -I. -I/usr/ports/www/mod_php4/work/php-4.2.1/sapi
In file included from /usr/local/include/apache2/apr_portable.h:89,
                 from /usr/local/include/apache2/http_protocol.h:64,
                 from sapi_apache2.c:38:
/usr/local/include/pth/pthread.h:504: warning: `fork' redefined
/usr/local/include/pth/pth.h:507: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:505: warning: `sleep' redefined
/usr/local/include/pth/pth.h:510: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:506: warning: `sigwait' redefined
/usr/local/include/pth/pth.h:512: warning: this is the location of the previous definition
/usr/local/include/pth/pth.h:517: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:513: warning: `write' redefined
/usr/local/include/pth/pth.h:518: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:514: warning: `readv' redefined
/usr/local/include/pth/pth.h:519: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:515: warning: `writev' redefined
/usr/local/include/pth/pth.h:520: warning: this is the location of the previous definition
/usr/local/include/pth/pthread.h:516: warning: `recv' redefined
/usr/local/include/pth/pth.h:521: warning: this is the location of the previous definition
/usr/local/include/pth/pth.h:526: warning: this is the location of the previous definition
In file included from /usr/local/include/apache2/apr_portable.h:89,
                 from /usr/local/include/apache2/http_protocol.h:64,
                 from sapi_apache2.c:38:
/usr/local/include/pth/pthread.h:186: redefinition of `nfds_t'
/usr/local/include/pth/pth.h:56: `nfds_t' previously declared here
sapi_apache2.c: In function `php_input_filter':
sapi_apache2.c:287: structure has no member named `__pthread_read'
*** Error code 1

Stop in /usr/ports/www/mod_php4/work/php-4.2.1/sapi/apache2filter.
*** Error code 1

Stop in /usr/ports/www/mod_php4/work/php-4.2.1/sapi/apache2filter.
*** Error code 1

Stop in /usr/ports/www/mod_php4/work/php-4.2.1/sapi.
*** Error code 1

Stop in /usr/ports/www/mod_php4/work/php-4.2.1.
*** Error code 1

Stop in /usr/ports/www/mod_php4.
*** Error code 1

Stop in /usr/ports/www/mod_php4.
bash-2.05a# exit

As you can see I use many options - if want to know which I can append them.

Jens

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-30 18:31 UTC] mfischer@php.net
We don't supposed any "ports", only sources from php.net

Anyway, a quick guess is that something between pth/apache2 is out of sync or doesn't like each other (but it's certainly not PHP).
 [2002-05-30 18:31 UTC] mfischer@php.net
supposed -> support
 [2002-05-31 03:13 UTC] php4 at liwing dot de
A FreeBSD port is just a makefile, a dependency tree for required libraries and applications and a package tool.

I think a quick read what FreeBSD port mean could be guessed at http://www.freebsd.org/ports/
The FreeBSD port www/mod_php4 works with the source from php.net, Mr. mfisher!
 [2002-05-31 03:22 UTC] php4 at liwing dot de
You should read carefully the compiler error message. I will send every requested file to this list, f.e. /usr/local/include/pth/pthread.h. In my expirience those kind of errors happen on wrong order of including files. This may or may not be an error of PHP, because usually an library should be able to handle this, but it seems to be a special case :-)
I just ask for review that part under a FreeBSD system at you or requesting access to mine by a developer from php.net.

Jens
 [2002-05-31 04:37 UTC] mfischer@php.net
I'ld rather first appriciate you test against the latest version of a) php, b) gnu pth c) apache2, and even then one of the snapshots at snaps.php.net and see if it isn't fixed already.
 [2002-05-31 04:48 UTC] php4 at liwing dot de
The mod_php4 v4.2.1_1 port includes a patch for ming, a patch for domxml, mcal and sybase.

My apache2-version is port-stable: 2.0.36_1
My pth-version is port-stable: 1.4.1_1

It's not really useful to test against the devel-snapshot, because it's not supported by an enclosed makefile for system-dependencies.

Question: do you want to concentrate your resources on my system and my knowledge or do you want help me to remove that bug?
 [2002-05-31 05:25 UTC] mfischer@php.net
Remove the damn bug of course. And if it's fixed in the snapshots from snaps.php.net its fixed in the HEAD branch. It's not said yet that there will be another 4.2.x release.
 [2002-05-31 05:25 UTC] mfischer@php.net
Remove the damn bug of course. And if it's fixed in the snapshots from snaps.php.net its fixed in the HEAD branch. It's not said yet that there will be another 4.2.x release.
 [2002-05-31 05:32 UTC] php4 at liwing dot de
What's your problem?
 [2002-05-31 05:37 UTC] mfischer@php.net
I ask you to test the snapshot from snaps.php.net
 [2002-05-31 05:51 UTC] php4 at liwing dot de
Because I cannot do all things the port makefile does, it's not a real-world test, using the snapshot.

"Bug #14594 Failed to compile/run when using Apache 2.x, unresolved symbols" - they could compile with lesser options. I will try if I can put the checkout in the port, I tell you the result little later.

Jens
 [2002-05-31 06:02 UTC] mfischer@php.net
Great, setting status to feedback
 [2002-05-31 09:31 UTC] kalowsky@php.net
Just a minor comment here, a FreeBSD port is NOT just a makefile. It can also include OS specific patches, and in many cases does.  For a long time the OpenBSD port of PHP modified code locally to enable it to compile.  I haven't built PHP out of FreeBSD ports in a long time (if ever), so I cannot comment if it does or does not.  But please don't say ports is "just a Makefile".  :)
 [2002-05-31 13:23 UTC] php4 at liwing dot de
Sorry, but a simple make build btw. ./configure && make didn't work. I now build a script which sets the configuration (appending).

Failure at last: need libtool 1.4 to build php from cvs. But there is "only" 1.3.4_4 available.

confphp:
#!/bin/sh

LOCALBASE=/usr/local
export LOCALBASE

CFLAGS="-I /usr/local/include/ -I${LOCALBASE}/include/pgsql"
export CFLAGS

LIBS=" -L${OPENSSLBASE}/lib -lcrypto -lssl"
export LIBS

./configure     --with-config-file-path=${LOCALBASE}/etc/ \
                --with-apxs2=${LOCALBASE}/sbin/apxs --with-tsrm-pth \
                --enable-versioning --with-regex=system \
                --with-gd=${LOCALBASE} \
                --enable-gd-native-ttf --with-freetype-dir=${LOCALBASE} \
                --with-jpeg-dir=${LOCALBASE} --with-png-dir=${LOCALBASE} \
                --with-zlib --with-bz2=/usr --with-mcrypt=${LOCALBASE} \
                --with-mhash=${LOCALBASE} --with-pdflib=${LOCALBASE} \
                --with-tiff-dir=${LOCALBASE} --with-mysql=${LOCALBASE} \
                --with-pgsql=${LOCALBASE} --with-ldap=${LOCALBASE} \
                --with-expat-dir=${LOCALBASE} --with-xmlrpc --enable-xslt \
                --with-xslt-sablot --with-gettext=${LOCALBASE} \
                --with-iconv=${LOCALBASE} --enable-sockets \
                --enable-sysvsem --enable-sysvshm
 [2002-05-31 17:26 UTC] kalowsky@php.net
You will need to manually update your libtool to version 1.4.  Not sure why the FreeBSD ports haven't upgraded or provided an option for it, but they don't.  
 [2002-05-31 18:04 UTC] php4 at liwing dot de
I don't think this will be nessecary. It doesn't work on my port, and I will not ask for an unstable machine because of reproducing sth. with PHP. If PHP4 doesn't run with apache2, it doesn't run.
I can live with it, I thought I can help if I do whatever I can do.

So long
Jens
 [2002-05-31 19:59 UTC] derick@php.net
Can you for one time just listen to what we ask and try it with libtool 1.4?
Apache 2 works fine with PHP on FreeBSD (4.5) here with the correct build tools installed.

Derick
 [2002-06-01 03:48 UTC] php4 at liwing dot de
Of course, Derick, I can and will do:

mfisher asks me for trying compile php.net snapshot. First I tried to apply port's patches, but this didn't work. Than I just run buildconf.sh and this one says to me:
"php needs libtool 1.4 or newer when build from cvs tree."

So I tried, I couldn't and now I do not know what to do except waiting there will come one who can.

Jens
 [2002-06-01 04:26 UTC] mfischer@php.net
Unless you install libtool 1.4 there is nothing we can do, it's simply required. It's known that it's a hassle because FBSD uses the old version.

The ports patches won't apply to the snapshots because they're from a completely different development branch.
 [2002-06-01 04:59 UTC] php4 at liwing dot de
Understood. Now you know. Maybe you deal with it later.
 [2002-06-01 05:20 UTC] mfischer@php.net
Deal with what exactly? Sorry, I seem to have missed the obvious.
 [2002-06-01 05:44 UTC] php4 at liwing dot de
Hey, I know open source live from help of all. But as I said below: I cannot risk system stability for finding a compiling bug. I didn't wrote PHP, I didn't wrote Apache2. I simply consult and configure some servers for my customers or developing some c/s apps. I not an system administrator and I cannot handle such things like installing newest software package for testing something ...

What you (as php-people) can handle later, is the removing of the compiler bug. Maybe you talk to dirk@freebsd.org - he maintains the port for freebsd.

I will help you - as I said - with all I can do. But not with the things I cannot do.

Jens
 [2002-06-01 09:03 UTC] sniper@php.net
reclassified as apache2 problem, which it really is.
I hope you're aware that apache2 itself really isn't
ready for serious use..especially if you're not using
the very latest version.

Here's one note from Apache2 (2.0.35) INSTALL file:

  * If you are building on FreeBSD, be aware that threads 
    will be disabled and the prefork MPM will be used by    
    default, as threads do not work well with Apache on 
    FreeBSD.  If you wish to try a threaded Apache on 
    FreeBSD anyway, use "./configure --enable-threads".

I don't know if this is fixed by now. Shouldn't PHP be compiled without ZTS if it's compiled for non-threaded
apache2 ??




 [2002-06-01 13:47 UTC] php4 at liwing dot de
That really helps. Thanks. I build with threads. I do not know why this problem occurs, but I will check in the next week a little bit more detailed.
Maybe I found the reason for failing compile - that I may send a fix.
Jens
 [2002-06-02 11:04 UTC] kalowsky@php.net
I did some testing on this last night using FreeBSD 4.5 and had no problems building.  But I built from sources.  If this is (as it sounds) a port issue, you MUST contact the port maintainer, as PHP does not control this. 

Marking this as closed for now.  If the port maintainer can prove otherwise, please re-open the bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC