From owner-freebsd-threads@FreeBSD.ORG Sun Jun 8 16:11:54 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 8E7F137B401 for ; Sun, 8 Jun 2003 16:11:54 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7CD543FA3 for ; Sun, 8 Jun 2003 16:11:53 -0700 (PDT) (envelope-from eischen@pcnet.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h58NBqNc010271; Sun, 8 Jun 2003 19:11:52 -0400 (EDT) Date: Sun, 8 Jun 2003 19:11:52 -0400 (EDT) From: Daniel Eischen To: Michael Edenfield In-Reply-To: <20030608192058.GA37124@basement.kutulu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: mysql 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: Sun, 08 Jun 2003 23:11:54 -0000 On Sun, 8 Jun 2003, Michael Edenfield wrote: > * Petri Helenius [030608 14:11]: > > Is there a preferred way / patchset to the Makefiles to build mysql with libkse? > > Since libkse should be a drop-in replacement for libc_r, the easiest > thing to do is to rebuild your rtld with libmap support. Then you can > build the mysql ports to link to libc_r as normal, and reroute the > linker to libkse at load time. To do this: > > * Add 'WITH_LIBMAP=yes' to /etc/make.conf > * Rebuild world (1) > * Create /etc/libmap.conf that looks like (2): > > [mysqld] > libc_r.so.5 libkse.so.1 > libc_r.so libkse.so > > [/usr/local/bin/mysqld] > libc_r.so.5 libkse.so.1 > libc_r.so libkse.so > > * Repeat for any other apps you want to use libkse (3). > * Retart mysql. > > > Things to note: > > (1) You only really need to rebuild rtld-elf, so a simple: > > cd /usr/src/libexec/rtld-elf ; make install > > should work. I never assume my source is in sync w/ my installed > world, though, so I just rebuild the whole thing to be safe. > > (2) man libmap.conf shows the (rather simple) syntax for the file. > The only catch is that you need to specify the full pathname to the > binary being run through the runtime loader (thus the reason for [bin] > and [/path/to/bin] sections). I find it easier to follow the premise > of the example in the man page: globally replace libc_r -> libkse (or > libthr) and only exclude those programs that absolutely need it. > > (3) Obviously, when libkse gets renamed to libpthead you'll need to > fix the config file :) This is all good advice. The other way is to set PTHREAD_LIBS=-lkse when building the port. At least that _should_ work if the port is set up correctly (sometimes, autoconf or libtool can detect a threads library on its own and can override whatever PTHREAD_LIBS is set to). -- Dan Eischen