Subject: pkg/28313: pthread.buildlink3.mk affects non-threaded .so in mysql4-client
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 11/14/2004 12:07:00
>Synopsis: pthread.buildlink3.mk affects non-threaded .so in mysql4-client
>Arrival-Date: Sun Nov 14 12:07:00 +0000 2004
>Originator: Jarle Greipsland
>Release: NetBSD 2.0_RC4
System: NetBSD festningen.uninett.no 2.0_RC4 NetBSD 2.0_RC4 (FESTNINGEN) #3: Thu Oct 28 19:25:49 CEST 2004 firstname.lastname@example.org:/sys/arch/i386/compile/FESTNINGEN i386
I have just tried to do an upgrade of the MySQL database on one of my
systems. I upgraded three packages:
to the most recent versions. Immediately after the upgrade, my perl 5.6.1
based applications, that uses the p5-DBD-mysql module through the DBI
interface, died on startup with an "Abort Trap". A ktrace of the
application revealed that it crashed shortly after having loaded
libpthread.so.0. That came as a surprise, since the perl 5.6.1 code base
installed by pkgsrc is not thread-aware, and thus the libpthread.so should
not have been required.
I then noticed that all code in the mysql4-client package is built with
pthreads enabled, both the libmysqlclient_r.so and libmysqlclient.so shared
objects. I think this is a mistake, and that only the libmysqlclient_r.so
should be built with the -pthread flag.
As an experiment, I cleaned out the previous build, ran 'make configure'
for the mysql4-client package again, and then removed all traces of pthread
in the libmysql subdirectory Makefile. I then ran a 'make install', and
also reinstalled the p5-DBD-mysql package. Then my perl 5.6.1 based
applications began working normally again.
Upgrade the mysql4-client package on a system that still has software
installed that are not pthread-aware. This certainly applies to perl
5.6.1, but may apply to other software as well
Make sure that the libmysqlclient.so module is compiled without -pthread,
and that the libmysqlclient_r.so is used by applications requiring pthread
support in the client library.