Steven,
which OS, version is this?
I'd be glad to test this out and find out what the fix is. Did you get DBD::mysql from cpan?
thanks much!
Patrick
Steven Lembark wrote:
Perl-5.8.5 compiled happily, now updating DBD::mysql with:
mysql-standard-4.0.20-pc-linux-i686 DBD-mysql-2.9004
Catch is that newer mysql distro's use ./lib and ./include for their files not ./lib/mysql or ./include/mysql. Fix is to symlink '.' to mysql in the lib directory and use an explicit '-I' with the cflags.
For example:
$ perl Makefile.PL I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql/include/mysql -mcpu=pentiumpro
libs (mysql_config) = -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testuser (default ) =
To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'.
Note (probably harmless): No library found for -lmysqlclient
Using DBI 1.43 (for perl 5.008005 on i686-linux-thread-multi) installed in /opt/perl/5.8/lib/site_perl/5.8.4/i686-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
EH??? No libmysqlclient?
$ find /usr/local/mysql/ -name 'libmysqlclient*' -follow /usr/local/mysql/lib/libmysqlclient.a /usr/local/mysql/lib/libmysqlclient_r.a
One hak fixes it:
cd /usr/local/mysql/lib; ln -fs . mysql;
Now I get:
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
/opt/gcc/bin/gcc -c -I/opt/perl/5.8/lib/site_perl/5.8.4/i686-linux-thread-multi/auto/DBI -I/usr/local/mysql/include/mys
ql -mcpu=pentiumpro -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FIL
E_OFFSET_BITS=64 -I/usr/include/gdbm -O3 -march=pentium4 -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" -fpic "-I/opt/pe
rl/5.8/lib/5.8.5/i686-linux-thread-multi/CORE" dbdimp.c
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
In file included from dbdimp.c:19:
dbdimp.h:21:49: mysql.h: No such file or directory
dbdimp.h:22:49: errmsg.h: No such file or directory
In file included from dbdimp.c:19:
dbdimp.h:106: error: parse error before "MYSQL"
dbdimp.h:106: warning: no semicolon at end of struct or union
dbdimp.h:117: error: parse error before '}' token
dbdimp.h:146: error: parse error before "MYSQL_RES"
dbdimp.h:146: warning: no semicolon at end of struct or union
dbdimp.h:159: error: parse error before '}' token
In file included from dbdimp.c:19:
<snip>
Which was fixed via:
perl Makefile.PL --cflags='-O3 -march=i686 -I/usr/local/mysql/include';
-- Patrick Galbraith, Senior Systems Engineer MySQL AB, www.mysql.com Office: +1 206 719 2461
Are you MySQL certified? www.mysql.com/certification