From owner-freebsd-threads@FreeBSD.ORG Wed Nov 12 22:51:07 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C05916A4CF for ; Wed, 12 Nov 2003 22:51:07 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA78D43FB1 for ; Wed, 12 Nov 2003 22:51:04 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id hAD6p01G003215; Thu, 13 Nov 2003 01:51:00 -0500 (EST) Date: Thu, 13 Nov 2003 01:51:00 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Craig Rodrigues In-Reply-To: <20031113045131.GA5544@crodrigues.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: Comments about FreeBSD threading from Apache people X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 06:51:07 -0000 On Wed, 12 Nov 2003, Craig Rodrigues wrote: > Hi, > > I compiled httpd-2.0.47 from apache.org, and compiled > the latest APR from ports with threading (-lc_r) enabled. > This was with a -CURRENT, cvsup'd from last week. > > I was able to reproduce the behavior that Justin > Erenkrantz outlined with libc_r. > I then added the following to /etc/libmap.conf: > > [/opt/home/rodrigc/httpd/bin/httpd] > libc_r.so libkse.so > libc_r.so.5 libkse.so.1 > > At this point, Apache worked fine. > > So, I can understand from the Apache point of view > why they don't want to enable threads by default > in APR. This whole discussion came about because > I maintain the APR port for FreeBSD, and recently > tried to push some threading configury fixes > upstream back to the APR maintainers, and they balked. > > I'd still like to push my APR changes upstream to them, > but maybe with threads disabled by default on FreeBSD, > instead of enabled by default as I had in my patch. > > How close are we to having libkse as the default > threading library on FreeBSD? The ports maintainers > define PTHREAD_LIBS to be -pthread on older FreeBSD's, > and -lc_r on newer ( > 500016) and do not tell people > to explicitly link to -lkse. Supposedly, libkse will be default for archs in which it is supported (currently i386, amd64, ia64) for 5.2-RELEASE. It is undecided whether it will be default by means of installing an appropriate libmap.conf, or by renaming libkse back to libpthread and changing PTHREAD_LIBS to -lpthread (and also changing gcc -pthread so that it links to libpthread instead of libc_r). Port maintainers shouldn't get too concerned about this; they should continue to rely on PTHREAD_LIBS and PTHREAD_CFLAGS. I suppose there is the possibility that some ports may want a specific threads library. In that case, perhaps PTHREAD_LIBS can be overridden by the port. But you should probably ask ports@ to see if that is how it should be handled. -- Dan Eischen