Building DBD::mysql on Solaris 10 Sparc

Having problems building the Perl DBD::mysql modules on Solaris 10 Sparc 64-bit?

The Perl 5.8.4 binary that ships with Solaris 10 is a 32-bit application.  You are probably running the 64-bit version of MySQL and trying to build DBD::mysql against that db version.

What you actually need to do is download the 32-bit version of MySQL, for linking the Perl DBD::mysql libraries against.   I run the 64-bit MySQL database in /opt/mysql/mysql, so I unpacked the 32-bit MySQL as /opt/mysql/mysql32.

Then, run a CPAN shell, look DBD::mysql, and build the module.

/usr/perl5/5.8.4/bin/perlgcc Makefile.PL --libs '-R/usr/sfw/lib -R/opt/mysql/mysql32/lib -L/usr/sfw/lib -L/opt/mysql/mysql32/lib -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm' --cflags '-I/usr/sfw/include -I/usr/include -I/opt/mysql/mysql32/include'

Then

gmake install UNINST=1

and you're done.

| Home |

No comments

Leave a reply


(optional field)
(optional field)
To prevent automated spam, I need to ask you to answer this simple question. Thank you.

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.