Bug 81183 - apache13-modperl can not compile with ports expat
Summary: apache13-modperl can not compile with ports expat
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 07:10 UTC by martin
Modified: 2006-07-18 09:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2005-05-18 07:10:01 UTC
Compiling www/apache13-modperl with expat from ports does not work.
This results in p5-SOAP-Lite segfaulting as apache includes its own outdated expat library.

Fix: The following patch fixes the problem



.if defined(WITHOUT_APACHE_EXPAT) && ${WITHOUT_APACHE_EXPAT} == yes
-EXPAT_CONF+=   --disable-rule=EXPAT
+EXPAT_CONF+=    --disable-rule=EXPAT
 .else
-LIB_DEPENDS+=  expat.5:${PORTSDIR}/textproc/expat2
-EXPAT_CONF+=   --enable-rule=EXPAT
+.if !defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes
+LIB_DEPENDS+=   expat.5:${PORTSDIR}/textproc/expat2
+.endif
+EXPAT_CONF+=    --enable-rule=EXPAT
 .endif

 .if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes
@@ -124,11 +126,14 @@
 OPTIM+=                -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 .endif

-# For expat.
-CFLAGS+=       -I${LOCALBASE}/include
-LIBS+=         -L${LOCALBASE}/libs
-
 CONFIGURE_ENV= OPTIM='${OPTIM}' LIBS='${LIBS}'
+
+.if (!defined(WITHOUT_APACHE_EXPAT) || ${WITHOUT_APACHE_EXPAT} != yes) && \
+    (!defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes)
+CONFIGURE_ENV+= \
+                INCLUDES=-I${LOCALBASE}/include \
+                LDFLAGS=-L${LOCALBASE}/lib
+.endif

 MAN1=  dbmmanage.1 htdigest.1 htpasswd.1--gLsuuPLj6dZYUhSazCsUtrDUEQmkx4ES0eLxDahIUot26N33
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       Tue May 17 17:22:12 2005
+++ Makefile    Tue May 17 17:22:24 2005
@@ -48,10 +48,12 @@
 WRKSRC_MODPERL=        ${WRKDIR}/mod_perl-${VERSION_MODPERL}
How-To-Repeat: Set in make.conf:
WITHOUT_APACHE_EXPAT=no
WITH_APACHE_INTERNAL_EXPAT=no

When compiling www/apache13 I get the following:
ldd /stable/usr/tmp/home/FreeBSD/FreeBSD-current/ports/www/apache13/work/apache_1.3.33/src/httpd
/stable/usr/tmp/home/FreeBSD/FreeBSD-current/ports/www/apache13/work/apache_1.3.33/src/httpd:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x280b3000)
        libexpat.so.5 => /usr/local/lib/libexpat.so.5 (0x280cc000)
        libc.so.5 => /lib/libc.so.5 (0x280ed000)

But not when compiling www/apache13-modperl:
euklides# ldd /stable/usr/tmp/home/FreeBSD/FreeBSD-current/ports/www/apache13-modperl/work/apache_1.3.33/src/httpd
/stable/usr/tmp/home/FreeBSD/FreeBSD-current/ports/www/apache13-modperl/work/apache_1.3.33/src/httpd:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x280f1000)
        libperl.so => /usr/local/lib/perl5/5.8.6/mach/CORE/libperl.so (0x2810a000)
        libm.so.3 => /lib/libm.so.3 (0x28211000)
        libutil.so.4 => /lib/libutil.so.4 (0x2822c000)
        libc.so.5 => /lib/libc.so.5 (0x28238000)
Comment 1 Jean-Yves Lefort freebsd_committer freebsd_triage 2005-05-20 13:34:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->apache

Over to maintainers.
Comment 2 Clement Laforet freebsd_committer freebsd_triage 2006-07-18 09:20:07 UTC
State Changed
From-To: open->closed

expat mess has been removed. 
Now it always depends on expat from ports. 
Thanks.