Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2003 21:45:59 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        "Andrey A. Chernov" <ache@FreeBSD.org>
Cc:        Anton Berezin <tobez@FreeBSD.org>, ports@FreeBSD.org
Subject:   FreeBSD www/apache13 port: build with threaded library
Message-ID:  <20030311194558.GB578@straylight.oblivion.bg>

next in thread | raw e-mail | index | archive | help

--UC+RhZhEc8lcmajv
Content-Type: text/plain; charset=windows-1251
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

While I was pestering him about diagnosing a mod_perl crash on Apache
startup, tobez@ suggested that the problem might be Apache dynamically
loading various modules, some of which were linked against libc_r, and
others not.  Amazingly enough, this turned out to fix the problem
perfectly.  What do y'all think about the following patch, which allows
a clueful port builder to add threads support to Apache?  All ports
which use APXS to build will automatically use the correct compiler and
linker flags.  The downside is that all packages will probably be built
*without* threads support, so they *will* cause a crash on startup...
However, for my situation: a Perl 5.8 built with ithreads,
apache+mod_perl using the threaded perl: this patch is a lifesaver...
well, okay, an apache- and sanity-saver at least :P

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net    roam@sbnd.net    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If you think this sentence is confusing, then change one pig.

Index: ports/www/apache13/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/ports/www/apache13/Makefile,v
retrieving revision 1.131
diff -u -r1.131 Makefile
--- ports/www/apache13/Makefile	20 Feb 2003 10:02:44 -0000	1.131
+++ ports/www/apache13/Makefile	27 Feb 2003 11:32:10 -0000
@@ -116,13 +116,24 @@
 CFLAGS+=3D-O6 -fomit-frame-pointer
 .endif
=20
+.if defined(WITH_APACHE_THREADS)
+CFLAGS+=3D${PTHREAD_CFLAGS}
+CONFIGURE_ENV=3D  OPTIM=3D'${OPTIM}' LD_SHLIB=3D'${CC} ${PTHREAD_CFLAGS} $=
{PTHREAD_LIBS}' LIBS=3D'${LIBS}'
+CONFIG_LDFLAGS=3D${PTHREAD_LIBS}
+.else
 CONFIGURE_ENV=3D  OPTIM=3D'${OPTIM}' LD_SHLIB=3D'${CC}' LIBS=3D'${LIBS}'
+CONFIG_LDFLAGS=3D
+CONFIG_INCLUDES=3D
+.endif
=20
 .if !defined(WITHOUT_APACHE_EXPAT) || ${WITHOUT_APACHE_EXPAT} !=3D yes
-CONFIGURE_ENV+=3D \
-		INCLUDES=3D-I${LOCALBASE}/include \
-		LDFLAGS=3D-L${LOCALBASE}/lib
+CONFIG_INCLUDES+=3D-I${LOCALBASE}/include
+CONFIG_LDFLAGS+=3D-L${LOCALBASE}/lib
 .endif
+
+CONFIGURE_ENV+=3D \
+		INCLUDES=3D'${CONFIG_INCLUDES}' \
+		LDFLAGS=3D'${CONFIG_LDFLAGS}'
=20
 MAN1=3D		dbmmanage.1 htdigest.1 htpasswd.1
 MAN8=3D           ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.=
8 \

--UC+RhZhEc8lcmajv
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+bjz27Ri2jRYZRVMRAvcNAJ9WLUxUm2vvpRsH5ueIyjjsTZGXegCfWO0v
Cny2tUNBV1VwZ873o4pLLfE=
=/1aP
-----END PGP SIGNATURE-----

--UC+RhZhEc8lcmajv--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030311194558.GB578>