ports/90092: php5 (possibly php4) and www/apache22 build broken
Melvyn Sopacua
melvyn at melvyn.homeunix.org
Thu Dec 8 02:00:34 UTC 2005
>Number: 90092
>Category: ports
>Synopsis: php5 (possibly php4) and www/apache22 build broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 08 02:00:26 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Melvyn Sopacua
>Release: FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD sarevok 6.0-STABLE FreeBSD 6.0-STABLE #1: Wed Dec 7 14:57:25 UTC 2005 root at sarevok:/usr/obj/stable/usr/current/src/sys/SAREVOK i386
>Description:
Logic error in lang/php5/Makefile:
Assumes WITH_APACHE2 is only set when $LOCALBASE/include/apache2/httpd.h exists
and forces APACHE_PORT to www/apache20, but this doesn't trigger the install and/or
conflict if apache22 is installed instead.
Additionally, apache22 and php5, don't build nicely:
/usr/local/share/apache22/build/instdso.sh SH_LIBTOOL='/usr/local/build-1/libtool' libphp5.la /usr/local/libexec/apache22
/usr/local/build-1/libtool --mode=install cp libphp5.la /usr/local/libexec/apache22/
cp .libs/libphp5.so /usr/local/libexec/apache22/libphp5.so
libtool: install: warning: remember to run `libtool --finish /stable/usr/ports/lang/php5/work/php-5.0.5/libs'
sed: 1: "/^dlname=/{s/.*='\([^'] ...": extra characters at the end of p command
sed: 1: "/^library_names/{s/libr ...": extra characters at the end of p command
Warning! dlname not found in /usr/local/libexec/apache22/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/libexec/apache22/libphp5.so
...
Creating bzip'd tar ball in '/home/packages-6/All/php5-5.0.5_2.tbz'
tar: libexec/apache2/libphp5.so: Cannot stat: No such file or directory
pkg_create: make_dist: tar command failed with code 256
However - it seems to work:
$ printf 'GET / HTTP/1.0\n\n' | nc -4 localhost 80
HTTP/1.1 200 OK
Date: Thu, 08 Dec 2005 02:18:51 GMT
Server: Apache/2.2.0 (FreeBSD) mod_ssl/2.2.0 OpenSSL/0.9.7e-p1 PHP/5.0.5
Last-Modified: Wed, 07 Dec 2005 23:58:08 GMT
ETag: "524cd-2d-ec7fe400"
Accept-Ranges: bytes
Content-Length: 45
Connection: close
Content-Type: text/html
<html><body><h1>It works!</h1></body></html>
>How-To-Repeat:
pkg_deinstall -f 'www/apache*' #if applicable
portinstall www/apache22; portinstall lang/php5
>Fix:
Two possible fixes:
1) Apache22/php5 not encouraged/supported:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/php5/Makefile,v
retrieving revision 1.90
diff -u -r1.90 Makefile
--- Makefile 4 Dec 2005 00:18:08 -0000 1.90
+++ Makefile 8 Dec 2005 00:56:16 -0000
@@ -125,6 +125,10 @@
.if exists(${LOCALBASE}/include/apache2/httpd.h)
WITH_APACHE2= yes
APACHE_MPM!= ${APXS} -q MPM_NAME
+.else
+.if defined(WITH_APACHE2)
+BROKEN= php port currently only works with www/apache20
+.endif
.endif
.if defined(WITH_APACHE2)
APACHE_MPM?= ${WITH_MPM}
2) Apache2[12]/php5 supported:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/php5/Makefile,v
retrieving revision 1.90
diff -u -r1.90 Makefile
--- Makefile 4 Dec 2005 00:18:08 -0000 1.90
+++ Makefile 8 Dec 2005 01:49:44 -0000
@@ -125,12 +125,22 @@
.if exists(${LOCALBASE}/include/apache2/httpd.h)
WITH_APACHE2= yes
APACHE_MPM!= ${APXS} -q MPM_NAME
+.elif exists(${LOCALBASE}/include/apache22/httpd.h)
+WITH_APACHE2= yes
+APACHE_MPM!= ${APXS} -q MPM_NAME
+APACHE_PORT= www/apache22
+SAPI_FILE= libexec/apache22/libphp5.so
+.elif exists(${LOCALBASE}/include/apache21/httpd.h)
+WITH_APACHE2= yes
+APACHE_MPM!= ${APXS} -q MPM_NAME
+APACHE_PORT= www/apache21
+SAPI_FILE= libexec/apache21/libphp5.so
.endif
.if defined(WITH_APACHE2)
APACHE_MPM?= ${WITH_MPM}
-APACHE_PORT= www/apache20
+APACHE_PORT?= www/apache20
CONFIGURE_ARGS+=--with-apxs2=${APXS}
-SAPI_FILE= libexec/apache2/libphp5.so
+SAPI_FILE?= libexec/apache2/libphp5.so
.if ${APACHE_MPM} == "worker"
EXT_DIR:= ${EXT_DIR}-zts
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list