Fix for problems installing DBD::mysql-2.9004 with mysql-4.0.20

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';

-- 
Steven Lembark                           9 Music Square South, Box 344
Workhorse Computing                                Nashville, TN 37203
lembark@wrkhors.com                                     1 888 359 3508
0
lembark
7/22/2004 5:09:51 PM
perl.dbi.users 11098 articles. 1 followers. Follow

1 Replies
757 Views

Similar Articles

[PageSpeed] 6

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

0
patg
7/22/2004 9:27:12 PM
Reply:

Similar Artilces:

Install problem updating 2.20.2 to 3.0.2 (DBD::mysql::db )
Hi All, I perform the update of the mysql from v. 4.0.15 to 5.0.45 I permorm the update of the modules required from checksetup log through = bugzilla 3.0.2. But when I try to enter in buzilla, I receive the following error. When I downgrade to ver 2.20.2 all came back ok. How I can solve the problem ? Thank you ERROR: DBD::mysql::db selectrow_hashref failed: Unknown column = 'profiles.disable_mail' in 'field list' [for Statement " SELECT profiles.userid AS = id,profiles.login_name,profiles.realname,profiles.mybugslink AS = showmybugslink...

MySQL 4.0 or MySQL 4.1 ? (switching from 4.0 to 4.1 results in problems)
Hi there, I tried to migrate my bugzilla DB from MySQL 4.0 to MySQL 4.1 but I did not work. Unfortunately the data is not displayed anymore. I have worked around the passwd/login problem, ok. Searching also works but if i want to display a bug, all fields are empty. I looked into the 4.1 DB and the data is there, however it is not displayed in the webbrowser... I seems to be related to the problem "Can't find bugs" which was discussed in May this year, but I could not find a solution there. What it the recommendation. Stay to MySQL 4.0 ? (I am on WinXP) t...

how to upgrade from bugzilla 2.20/mysql 3.23 to bugz 2.22/mysql 4
Hi all, All is in the title : Does somemeone know how to upgrade from bugzilla 2.20/mysql 3.23 to bugz 2.22/mysql 4 ? It don't find any informations about global upgrade of bugzilla and Mysql. Is it possible ? Thanks for your help ! Fran´┐Żois DAMBRE. Fran=E7ois, 2006/4/24, francois dambre <francois.dambre@vmts.fr>: > Does somemeone know how to upgrade from bugzilla 2.20/mysql 3.23 to bugz > 2.22/mysql 4 ? It don't find any informations about global upgrade of > bugzilla and Mysql. Is it possible ? you need to handle these two upgrades ...

Problems installing DBD::mysql #2
Network Blitz I am having some problems installing DBD::mysql and was wondering if anyone had any idea why I am getting the error listed below. #-----------------------------------------------------------------------# Which drivers do you want to install? 1) MySQL only 2) mSQL only (either of mSQL 1 or mSQL 2) 3) MySQL and mSQL (either of mSQL 1 or mSQL 2) 4) mSQL 1 and mSQL 2 5) MySQL, mSQL 1 and mSQL 2 Enter the appropriate number: [3] 1 Do you want to install the MysqlPerl emulation? You might keep your old Mysql module (to be distinguishe...

DBI / DBD / MySQL installation problem
Hi, (sorry for fairly lengthy post) I used to run Red Hat 9, and had a perfect relationship with Perl, DBI, and MySQL. However, after upgrading to Fedora Core 4, I am no longer able to connect to MySQL from Perl via DBI. My simple test script: --------------------------- #!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect("DBI:mysql:database=MyOwnDatabase;host=localhost", "MyUserName", "MySpecialPassword", {'RaiseError' => 1}); my $sth = $dbh->prepare("SELECT * FROM MainTable"); $st...

Problems installing DBD::mysql #4
If I missed something in the archives I apologize. I am trying to install DBD::mysql 3.0002, (I have client only libraries), when I run make test, all but test 1 fail with, DBD driver has not implemented the AutoCommit attribute ....this happens on the connect. I set the testhost name and can connect from the command line. Any Ideas? Thanks. -- Scott T. Hildreth <shildreth@allantgroup.com> ...

DBD::mysql 2.9007 and DBD::mysql 2.9015_3 (beta) released
Dear DBI/DBD::mysql developers, DBD::mysql 2.9007 and 2.9015_3 are now available via CPAN! * DBD::mysql 2.9007 is the production release and is available as the default version using CPAN shell, or if you go to the CPAN site and look up DBD::mysql by module. * DBD::mysql 2.9015_3 is a beta release, which includes server-side prepared statement and MySQL Embedded Server support, and is available on CPAN at http://www.cpan.org/modules/by-module/DBD/CAPTTOFU/DBD-mysql -2.9015_3.tar.gz The latest changes are: 2.9007 * Fix to Statement.pm for old API call for numf...

Installing DBD::MySql without MySql installed
Hi, I would like to install the database driver for MySql, however I would like to not have to install MySql on the local machine. Is there a way of doing this? Thanks in advance, Joe Grastara Project Assistant Digital Media Center The Skirball Institute Of Biomolecular Medicine New York University Medical Center 540 First Ave., New York City, NY 10016 USA grastara@saturn.med.nyu.edu http://www.med.nyu.edu/graphics You should only need the client libraries for the machine you are on. -----Original Message----- From: Joe Grastara [mailto:grastara@saturn.med.nyu.ed...

Fix for DBD::mysql column_info() method for MySQL 4.1
--tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch fixes DBD::mysql column_info() method for MySQL 4.1 and makes some other general improvements. The change was needed because while MySQL <= 4.0 DESCRIBE TABLE reports a "varchar(10) binary" column as "varchar(10) binary", MySQL 4.1 reports it as "varbinary(10)". Tim. --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=x ==== //depot/qa/apps/common/perl5.6.1/lib/site_perl/5.6.1/i386...

New User: Problems with install DBD::mysql
Ok, I'm a newish Linux user, fresh install of Redhat 9.1, all RPMs uptodate.. When I install the Bundle::Bugzilla, everything works great up to the DBD::mysql section, at which point I get a stream of the following errors: <-- snip --> Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.0/ExtUtils/Liblist/Kid.pm line 97. <-- snip --> Followed by <-- snip --> Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/D...

MySQL 4.1.10 + DBD-MySQL 2.9003 Incompatibility
Note: I posted this on another list a few minutes ago only to realize seconds after posting that it wasn't the right list. So if you are subscribed to that list also and see this as a duplicate, I apologize in advance. I am running MySQL 4.1.10 and ActivePerl 5.8.6.811 on Windows 2003. When I upgraded MySQL from an older version, everything using DBD-MySQL complained about not being compatible and MySQL is telling me to upgrade to a newer client (in this case, obviously, my client being DBD-MySQL). Does anyone know which version I should be using of DBD-MySQL and in w...

Problems installing DBI and DBD::mysql to a local directory
------=_Part_220954_11196489.1231417963521 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, Would you be able to give me some advice on a DBI issue I'm having? I'm quite new to Perl and completely new to MySQL. I'm currently trying to install DBI (v1.607) and DBD::mysql (v4.010). I'm hoping to use these along with BioPerl and the Ensembl Perl API, to access the online genomic database Ensembl automatically. I'm trying to install both DBI and DBD::mysql to a local directory, as I don't have ...

DBI-1.47 + DBD-Mysql-2.9004
First off, sorry if any of you received this more than once. I erred in the mail headers, and my attempts to correct were less than good After a very tedious process of installing mysql-4.1.10 on HP-UX (both 11.00 and 11.11), I ran into trouble with building the DBD modules using perl-5.8.5-dor, the builds fail because you need shared libs, somethi= ng mysql kindly prevented by `forgetting' the +Z flag, so ld barfs out (I mail= ed them with the request to add it for builds to follow). So I had to rebuild the whole damn thing from scratch just to get me a libmysqlclient.sl...

Newbie 2.18 install DBD::mysql problem
I (as a newbie bugzilla admin/installer) get the following error when running perl -MCPAN -e 'install "Bundle::Bugzilla"' for 2.18 (see below). Should I be concerned with these apparent "mysql" errors? The process seems to run through an entire installation. (I had to use "dbname=..." in order to get things to work...kind of wish some of the docs had explained this so I would have have tried about six diff passes and databases before getting it to get as far as it did...) Thanks for any help, -Matt [...excerpt from perl -...

Web resources about - Fix for problems installing DBD::mysql-2.9004 with mysql-4.0.20 - perl.dbi.users

Resources last updated: 1/3/2016 9:02:48 PM