From owner-freebsd-ports@FreeBSD.ORG Tue Jun 8 08:16:08 2004 Return-Path: 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 F102716A4CE for ; Tue, 8 Jun 2004 08:16:08 +0000 (GMT) Received: from mail.dt.e-technik.uni-dortmund.de (mail.dt.e-technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CE9F43D45 for ; Tue, 8 Jun 2004 08:16:08 +0000 (GMT) (envelope-from ma@dt.e-technik.uni-dortmund.de) Received: from m2a2.dyndns.org (krusty.dt.e-technik.uni-dortmund.de [129.217.163.1])176252F76B for ; Tue, 8 Jun 2004 10:15:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id 76D68BD6EC for ; Tue, 8 Jun 2004 10:15:47 +0200 (CEST) Received: from merlin.emma.line.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23213-05-3 for ; Tue, 8 Jun 2004 10:15:45 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 6B774BD6E7; Tue, 8 Jun 2004 10:15:45 +0200 (CEST) Date: Tue, 8 Jun 2004 10:15:45 +0200 From: Matthias Andree To: freebsd-ports@freebsd.org Message-ID: <20040608081545.GB20356@merlin.emma.line.org> Mail-Followup-To: freebsd-ports@freebsd.org References: <1086462964.42167.5.camel@server.mcneil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1086462964.42167.5.camel@server.mcneil.com> User-Agent: Mutt/1.5.5.1i X-Virus-Scanned: by amavisd-new at m2a2.dyndns.org Subject: Re: post-patch blues with db3, db4, db41 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 08:16:09 -0000 On Sat, 05 Jun 2004, Sean McNeil wrote: > There are post-patch targets for these ports that are causing issues > with the libraries built. The target: > > post-patch: > @${REINPLACE_CMD} -Ee \ > 's|-l?pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/${CONFIGURE_SCRIPT} > > causes the library to be linked with libpthread.so. This is a And how would this cause the link with libpthread if the original BDB configure script didn't request that in the first place? I've tried ldd and readelf -d and objdump -p and see no reference to pthread whatsoever in spite of libdb41_cxx.so.1 using pthread functions, I'd expect a NEEDED tag. SONAME is there however. The original script might however need to replace -pthread with -lc_r or -lpthread on FreeBSD 5. > dependency that we do not want. It will in turn cause issues with > nss_ldap and db doesn't use any threading. No threads but mutexes. The CXX variant also defines some local weak thread-related symbols. > It is thread safe, but that > doesn't mean it should be linked with pthread. What FreeBSD version and machine are you running on? I only have freebsd 4.10 release and 5-CURRENT on x86 (i386). Berkeley DB appears to use POSIX mutexes on the non-x86 machines, and GCC assembly mutextes on x86 machines (and in the db41 port for amd64 machines, too, see http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 ). BerkeleyDB uses autoconf and some tests to figure if it should use some native implementation, POSIX mutexes (in -lpthread) or UI mutexes (for instance on Solaris, -lthread). > I took out that target from my build of db41 and all is well for me. > With it in, nss_ldap ends up causing all sorts of bad things to happen What sorts? > because it uses db41 (via openldap and sasl) and it in turn pulls in > pthread when it shouldn't. Please show details. > Could this target be removed from the ports mentioned? It will break the compile for some of the versions, and I recently fixed mutex related bugs for one of the newer db ports (db42 IIRC) for amd64, by forcing x86/gcc-assembly mutexes for amd64. -- Matthias Andree Encrypted mail welcome: my GnuPG key ID is 0x052E7D95