On Thu, Nov 18, 1999 at 11:49:25AM +0100, Jochen Wiedmann allegedly wrote:
> Mathijs Brands wrote:
>
> > I assume you're referring to the 'pthread_mutex_destroy' symbol?
> > This is caused by the fact that the module is linked against libc,
> > while it should be linked against libc_r. libc_r is the threadsafe
> > version of the C library - that's why libc doesn't contain any
> > threadings stuff.
>
> Excellent. Two questions: How did you manage that libc_r was
> used? And do you see any possibility for me to detect
> automatically, whether libc or libc_r should be used?
>
>
> > There are several reasons why I didn't analyze the coredump:
> > 3. I don't have the Perl source lying around
> > 2. Perl is linked against libc, mysql.so against libc_r
> > 1. The Perl binary has been stripped (standard FreeBSD config)
>
> Excellent again. Here's how to go:
>
> - Create a new version of DBD::mysql be doing a
>
> perl Makefile.PL --static --config OPTIMIZE=-g LINKTYPE=static
> make
> make perl
> make test
>
> - Start it from within gdb by doing
>
> cd mysql
> gdb ../perl
> r -I../blib/arch -I../blib/lib t/00base.t
>
> (Replace the test script name, as appropriate.)
>
> Feel free to ask for more suggestions.
I still feel all of this is caused by the fact that mysql is linked
against libc_r, while the MySQL DBD module is linked against libc (just
like perl). I can link the DBD module against libc_r, but this causes
perl to dump core immediately on loading the MySQL DBD module (most
likely caused by the fact that the module is linked against libc_r and
perl against libc).
I've circumvented this problem (for the moment) by making sure the
MySQL clientlib is linked against libc and not libc_r. 'make test' now
completes succesfully.
I'm probably going to try building MySQL with MIT thread support to
see if it is possible to enable the threadsafe client with MIT thread
support. I may try recompiling perl against libc_r, but I'm not sure
if that's wise (the perlscripts will run on a production machine and
I don't want to run the risk that some other scripts stop working
correctly).
Will this non-threadsafe clientlib cause me any problems? I assume
I could build a threadsafe clientlib and use that one with threaded
applications. (Probably wrong list for this question.)
Anyway, thanks for your help. I'm currently running the sql-benchmark
included with MySQL and it seems to be running just fine.
Mathijs