DBD-mysql - Re: undefined symbol: __pure_virtual DynaLoader.pm line 230 mysql.so

Posted on Tue Jul 31 23:57:28 2007 by mkitwrk in response to 2960 (See the whole thread of 7)
Re: undefined symbol: __pure_virtual DynaLoader.pm line 230 mysql.so

The following changes make the compilation of DBD-mysql-4.005 work with no problems on my Debian Etch servers using MySQL 5.0.[27|41]:

Edit /usr/local/mysql/bin/mysql_config.

Fix old arch declarations to new form. Change any occurance of "-mcpu" to "-march".

Add -lmygcc declaration. Change the line that contains:

libs=" $ldflags -L$pkglibdir -lmysqlclient -lz -lcrypt -lnsl -lm "

To: libs=" $ldflags -L$pkglibdir -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc "

Remove erroneous extra "/mysql" from libdir. Change the line that contains:

pkglibdir='/usr/local/mysql/lib/mysql'

To: pkglibdir='/usr/local/mysql/lib'

Remove erroneous extra "/mysql" from includedir. Change the line that contains:

pkgincludedir='/usr/local/mysql/include/mysql'

To: pkgincludedir='/usr/local/mysql/include'

Then everything works as expected wiht a standard compile.

perl Makefile.PL --testuser=[testuser] --testdb=test --testpassword=[testpassword]

make

make test

make install

Write a response