MySQL Forums
Forum List  »  Perl

Compiling failed on Solaris 10/sparc architecture,
Posted by: Christian Lochmatter
Date: August 18, 2011 09:55PM


I tried to compile DBD-mysql 4.019 with perl 5.12.3 and DBI 1.615 on an Solaris 10 machine with sparc architecture.

Here the steps I did:
/opt/scs/usr/perl/current/bin/perl Makefile.PL

For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/usr/local/mysql/include -m64 -KPIC -g -mt
embedded (mysql_config) =
libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient -lthread -lsocket -lnsl -lm -lrt
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (guessed ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Note (probably harmless): No library found for -lmysqlclient
Using DBI 1.615 (for perl 5.012003 on sun4-solaris) installed in /opt/scs/usr/perl/perl-5.12.3/lib/site_perl/5.12.3/sun4-solaris/auto/DBI/
Writing Makefile for DBD::mysql
cfgeng# pwd

So far so good. Then I did:
Skip blib/lib/DBD/ (unchanged)
Skip blib/lib/DBD/mysql/ (unchanged)
Skip blib/lib/DBD/mysql/INSTALL.pod (unchanged)
Skip blib/lib/Bundle/DBD/ (unchanged)
gcc -c -I/opt/scs/usr/perl/perl-5.12.3/lib/site_perl/5.12.3/sun4-solaris/auto/DBI -I/usr/local/mysql/include -m64 -KPIC -g -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"4.019\" -DXS_VERSION=\"4.019\" -fPIC "-I/opt/scs/usr/perl/perl-5.12.3/lib/5.12.3/sun4-solaris/CORE" dbdimp.c
gcc: unrecognized option `-KPIC'
cc1: error: invalid option `t'
make: *** [dbdimp.o] Error 1

Has anybody an idea why this is not working.
I also tried to modify the Makefile with following parameters:
-x03 -xspace -xildoff
This also not help


Edited 1 time(s). Last edit at 08/18/2011 10:14PM by Christian Lochmatter.

Options: ReplyQuote

Written By
Compiling failed on Solaris 10/sparc architecture,
August 18, 2011 09:55PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.