I am trying to install Bundle::DBD::mysql on a Sun SPARC machine running Solaris 9.
I am using CPAN (as root) to install
perl -MCPAN -e shell then install Bundle::DBD::mysql
Here is a portion of the output:
Checking if your kit is complete... Looks good Using DBI 1.47 (for perl 5.008 on sun4-solaris) installed in /usr/local/lib/perl 5/site_perl/5.8.0/sun4-solaris/auto/DBI/ Writing Makefile for DBD::mysql cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod cp lib/Mysql.pm blib/lib/Mysql.pm cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
Hi,
I think there are some lines in your output that could be useful to find where the problem comes from.
gcc gets called once to compile dbdimp.c into dbdimp.o:
gcc -B/usr/ccs/bin/ -c -I/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto /DBI/ -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -fno-s trict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.90 04\" -DXS_VERSION=\"2.9004\" -fPIC "-I/usr/local/lib/perl5/5.8.0/sun4-solaris/C ORE" dbdimp.c
but it complains:
gcc: unrecognized option `-Xa' gcc: language arch=v9 not recognized
I think the next line tells us dbdimp.o was not built.
gcc: dbdimp.c: linker input file unused because linking not done
/usr/local/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/local/lib/perl5/site_perl/5. 8.0/sun4-solaris/auto/DBI//Driver.xst > mysql.xsi /usr/local/bin/perl /usr/local/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/lo cal/lib/perl5/5.8.0/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql .c Warning: duplicate function definition 'do' detected in mysql.xs, line 196 Warning: duplicate function definition 'rows' detected in mysql.xs, line 294
gcc gets called again to compile mysql.c
gcc -B/usr/ccs/bin/ -c -I/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto /DBI/ -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -fno-s trict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.90 04\" -DXS_VERSION=\"2.9004\" -fPIC "-I/usr/local/lib/perl5/5.8.0/sun4-solaris/C ORE" mysql.c
we have the same problem as before
gcc: unrecognized option `-Xa' gcc: language arch=v9 not recognized
and again the object file is not built
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
When we try to build mysql.so...
LD_RUN_PATH="/usr/local/mysql/lib:/usr/lib" /usr/local/bin/perl myld gcc -B/usr/ ccs/bin/ -G -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mys ql.so -L/usr/local/mysql/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -ln sl -lm
...dbdimp.o and mysql.o are missing
gcc: dbdimp.o: No such file or directory gcc: mysql.o: No such file or directory
so of course the shared object can't be built.
chmod 755 blib/arch/auto/DBD/mysql/mysql.so chmod: WARNING: can't access blib/arch/auto/DBD/mysql/mysql.so *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql/mysql.so' /usr/ccs/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Running install for module DBD::mysql Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz Is already unwrapped into directory /.cpan/build/DBD-mysql-2.9004 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Bundle summary: The following items in bundle Bundle::DBD::mysql had installation problems: Mysql DBD::mysql
I have no idea why I can't get this to install. Any help will be appreciated.
I think these two lines
gcc: unrecognized option `-Xa' gcc: language arch=v9 not recognized
could mean that your version of gcc is not suitable to build DBD::mysql, that is it must support those options to build it.
I'm afraid I don't know what those options are for.
I know this answre is far less than the usual two cents, but I hope I've been of some help to you (hey, you said *any* help ;-).
Lawrence Adamiec
Unix Manager
Rm. 525B 565 W. Adams St.
Chicago-Kent College of Law
Illinois Institute of Technology
Chicago, Illinois
312-906-5301
Marcello
