Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Problems installing DBD::mysql on Solaris 10

by graq (Curate)
on Nov 02, 2005 at 16:12 UTC ( [id://504976]=perlquestion: print w/replies, xml ) Need Help??

graq has asked for the wisdom of the Perl Monks concerning the following question:

I am in the process of building a server and am trying to get Perl, mySQL, Apache up and running. The machine is a Sun Sparc (64bit) with everything running in 32bit mode (to my knowledge).

The machine was handed to me with a 'pre-release' (beta?) version pre-installed on it. I downloaded Solaris 10 and installed (upgraded) that. I added a few packages - all with the noddy cc compiler that comes with it. I proceeded to install mysql (using pkgadd), followed rapidly by the attempt to install DBI.pm - which failed as I needed gcc in Configure.pm. After some discussion on CB, I decided to install a new copy of perl, using gcc.

So, I got gcc and used it to install a 2nd copy of Perl (so now there are two on the box 5.8.4 and 5.8.7). DBI.pm has installed (hurrah!), but DBD::mysql will not. I re-installed mysql (pkgrm, pkgadd) to make sure I had 32-bit versions of both and that both were installed using same compiler (I'm assuming that pkgadd will use gcc). I have read some notes that perl and mysql must be installed with the same compiler for DBD::mysql to work, so if anyone knows if I have missed anything, or a really good way to make sure...

I appreciate all the efforts by valiant monks in CB to help me, but I am still stuck.

Below is the output of 'make':

Removing previously used /.cpan/build/DBD-mysql-3.0002 CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-3.0002.tar.gz I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/mysql/mysql/include -xO3 + -mt -D_FORTEC_ -xarch=v8 -xc99=none embedded (mysql_config) = libs (mysql_config) = -xarch=v8 -L/usr/local/mysql/mysql/li +b -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lmtmal +loc mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Checking if your kit is complete... Looks good Unrecognized argument in LIBS ignored: '-xarch=v8' Using DBI 1.48 (for perl 5.008007 on sun4-solaris) installed in /opt/l +ib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/ Writing Makefile for DBD::mysql 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 gcc -c -I/opt/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/ -I/usr +/local/mysql/mysql/include -xO3 -mt -D_FORTEC_ -xarch=v8 -xc99=none - +DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -D_LARGEF +ILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"3.0002\" -DXS_VE +RSION=\"3.0002\" -fPIC "-I/opt/lib/perl5/5.8.7/sun4-solaris/CORE" d +bdimp.c gcc: language c99=none not recognized gcc: dbdimp.c: linker input file unused because linking not done /opt/bin/perl -p -e "s/~DRIVER~/mysql/g" /opt/lib/perl5/site_perl/5.8. +7/sun4-solaris/auto/DBI//Driver.xst > mysql.xsi /opt/bin/perl /opt/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap /opt/lib/ +perl5/5.8.7/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc my +sql.c Warning: duplicate function definition 'do' detected in mysql.xs, line + 224 Warning: duplicate function definition 'rows' detected in mysql.xs, li +ne 559 gcc -c -I/opt/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/ -I/usr +/local/mysql/mysql/include -xO3 -mt -D_FORTEC_ -xarch=v8 -xc99=none - +DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -D_LARGEF +ILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"3.0002\" -DXS_VE +RSION=\"3.0002\" -fPIC "-I/opt/lib/perl5/5.8.7/sun4-solaris/CORE" m +ysql.c gcc: language c99=none not recognized gcc: mysql.c: linker input file unused because linking not done Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/usr/lib" /opt/bin/perl myld gcc -G dbdimp.o mysql.o - +o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/mysql/lib -l +mysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lmtmalloc gcc: dbdimp.o: No such file or directory gcc: mysql.o: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql +/mysql.so' /usr/ccs/bin/make -- NOT OK
All comments appreciated.

Replies are listed 'Best First'.
Re: Problems installing DBD::mysql on Solaris 10
by Perl Mouse (Chaplain) on Nov 02, 2005 at 16:40 UTC
    The problem seems to be indicated by the line:
    gcc: language c99=none not recognized
    If you look above, you see one of the options passed to gcc is:
    -xc99=none
    which, according to the manual I have here of gcc (3.2.3) isn't a valid option for -x. -x none is though.

    I do not know where this option came from, and I neither have Solaris nor MySQL present to further investigate. You might want to edit the generated Makefile by hand, and see if the -x can be eliminated easily. If so, rip it out and run make again.

    Perl --((8:>*
      I played a little with the -x options; there are three of them and my version of gcc doesn't seem to like any of them.

      If I run

      /.cpan/build/DBD-mysql-3.0002> make gcc -c -I/opt/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/ -I/usr +/local/mysql/mysql/include -mt -D_FORTEC_ -DDBD_MYSQL_INSERT_ID_IS_GO +OD -g -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_ +BITS=64 -O -DVERSION=\"3.0002\" -DXS_VERSION=\"3.0002\" -fPIC "-I +/opt/lib/perl5/5.8.7/sun4-solaris/CORE" dbdimp.c cc1: error: invalid option `t' *** Error code 1 make: Fatal error: Command failed for target `dbdimp.o'
      I get this 'cc1' error.. maybe there is something dreadfully wrong with my compiler?
        Solaris, isn't? Where do you have your gcc and assorted binaries installed, and where is it in your PATH? Make sure they appear in your PATH before the Solaris binaries.
        Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://504976]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found