From owner-freebsd-ports Tue Mar 11 11:47:34 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1170337B401 for ; Tue, 11 Mar 2003 11:47:32 -0800 (PST) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 02D7A43FA3 for ; Tue, 11 Mar 2003 11:47:30 -0800 (PST) (envelope-from roam@ringlet.net) Received: (qmail 20519 invoked from network); 11 Mar 2003 19:43:06 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 11 Mar 2003 19:43:06 -0000 Received: (qmail 91013 invoked by uid 1000); 11 Mar 2003 19:45:59 -0000 Date: Tue, 11 Mar 2003 21:45:59 +0200 From: Peter Pentchev To: "Andrey A. Chernov" Cc: Anton Berezin , ports@FreeBSD.org Subject: FreeBSD www/apache13 port: build with threaded library Message-ID: <20030311194558.GB578@straylight.oblivion.bg> Mail-Followup-To: "Andrey A. Chernov" , Anton Berezin , ports@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UC+RhZhEc8lcmajv" Content-Disposition: inline User-Agent: Mutt/1.5.3i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --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