Unable to build apache2 with threads (Re: cvs commit: ports/Mk
bsd.port.mk)
Clive Lin
clive at tongi.org
Sat Oct 9 19:35:04 PDT 2004
On Thu, Oct 07, 2004 at 05:59:18PM +0000, Kris Kennaway wrote:
> kris 2004-10-07 17:59:18 UTC
>
> FreeBSD ports repository
>
> Modified files:
> Mk bsd.port.mk
> Log:
> Change the default value of PTHREAD_LIBS to -pthread for 5.x and
> beyond. This avoids linking shared libraries with the thread library,
> which causes problems when trying to change from one thread library to
> another. Instead all binaries that link to a library that uses
> threads must themselves respect PTHREAD_LIBS.
>
> Submitted by: deischen, marcus
> Approved by: portmgr
>
> Revision Changes Path
> 1.499 +2 -2 ports/Mk/bsd.port.mk
http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?r1=1.498&r2=1.499
this seems to stop apache2 build with threads. (WITH_MPM=worker)
Clement:
dirty hack as below, although I dont think it is a correct fix...
--- Makefile~ Sun Oct 10 09:45:07 2004
+++ Makefile Sun Oct 10 09:45:33 2004
@@ -148,7 +148,7 @@
LDCONFIG_DIRS= %%PREFIX%%/lib/apache2
.endif
-WITH_PTHREAD_LIBS?= ${PTHREAD_LIBS:S/-l//}
+WITH_PTHREAD_LIBS?= ${PTHREAD_LIBS}
WITH_PTHREAD_CFLAGS?= ${PTHREAD_CFLAGS}
.include "${APACHEDIR}/Makefile.doc"
--- Makefile.modules~ Sun Oct 10 09:45:12 2004
+++ Makefile.modules Sun Oct 10 09:46:06 2004
@@ -93,8 +93,8 @@
.if defined(WITH_THREADS)
CONFIGURE_ARGS+= --enable-threads
-. if ${WITH_PTHREAD_LIBS} != "c_r" && ${OSVERSION} > 500023
-CONFIGURE_ENV+= apr_cv_pthreads_lib=-l${WITH_PTHREAD_LIBS} \
+. if ${WITH_PTHREAD_LIBS} != "-lc_r" && ${OSVERSION} > 500023
+CONFIGURE_ENV+= apr_cv_pthreads_lib=${WITH_PTHREAD_LIBS} \
apr_cv_pthreads_cflags=${WITH_PTHREAD_CFLAGS}
. else
CFLAGS+= -DFREEBSD_THREAD_HACK
--
Clive Tong-I Lin | http://tongi.org | PGP KeyID: A008C03E
More information about the cvs-all
mailing list