Alexander Farber (EED) wrote:

>Wim De Hul wrote:
>
>>I tried to use the gcc -compiler (it is installed on my Sun and the dir
>>is in my $PATH) but after the CC=gcc perl Makefile.PL,
>>
>
>
>I might be wrong. But if you use Solaris and your shell is (t)csh
>(and not bash or ksh), then "CC=gcc perl Makefile.PL" won't work.
>
>Try "perl Makefile.PL" and then "env CC=/full/path/to/bin/gcc make"
>
>And also are you sure, that your perl is built with the same gcc?
>
>
>>the make still refers to the old  c-compiler (/usr/ucb/cc). Why doesn't
>>the makefile contains the gcc-compiler? Is there a way to compile it
>>anyway with the gcc-compiler?
>>
>
>

I saw that the gcc-compiler uses the wrong option -KPIC, so I put it in 
the command line...

perl Makefile.PL CC=gcc CCCDLFLAGS=-fpic

and this is my output:bash-2.03# perl Makefile.PL CC=gcc CCCDLFLAGS=-fpic
*** Note:
   The optional PlRPC-modules (RPC::PlServer etc) are not installed.
   If you want to use the DBD::Proxy driver and DBI::ProxyServer
   modules, then you'll need to install the RPC::PlServer, RPC::PlClient,
   Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
   You can install them any time after installing the DBI.
   You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
   http://www.perl.com/CPAN/modules/by-module
   http://www.perl.org/CPAN/modules/by-module
   ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

Checking if your kit is complete...
Looks good
Writing Makefile for DBI

   Remember to actually *read* the README file!
   Use  'make' to build the software (dmake or nmake on Windows).
   Then 'make test' to execute self tests.
   Then 'make install' to install the DBI and then delete this working
   directory before unpacking and building any DBD::* drivers.

bash-2.03# make
mkdir blib
mkdir blib/lib
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/DBI
mkdir blib/lib/auto
mkdir blib/lib/auto/DBI
mkdir blib/man1
mkdir blib/man3
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm
cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBD/Multiplex.pm blib/lib/DBD/Multiplex.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp lib/DBI/Format.pm blib/lib/DBI/Format.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBD/ADO.pm blib/lib/DBD/ADO.pm
/usr/bin/perl -p -e "s/~DRIVER~/Perl/g" < blib/arch/auto/DBI/Driver.xst 
 > Perl.xsi
/usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 
/usr/perl5/5.00503/ExtUtils/xsubpp  -typemap 
/usr/perl5/5.00503/ExtUtils/typemap Perl.xs >xstmp.c && mv xstmp.c Perl.c
gcc -c   -xO3 -xdepend    -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" -fpic 
-I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS Perl.c
*gcc: language depend not recognized*
*gcc: Perl.c: linker input file unused since linking not done*
/usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 
/usr/perl5/5.00503/ExtUtils/xsubpp  -typemap 
/usr/perl5/5.00503/ExtUtils/typemap DBI.xs >xstmp.c && mv xstmp.c DBI.c
gcc -c   -xO3 -xdepend    -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" -fpic 
-I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS DBI.c
*gcc: language depend not recognized**
**gcc: DBI.c: linker input file unused since linking not done*
Running Mkbootstrap for DBI ()
chmod 644 DBI.bs
LD_RUN_PATH="" cc -o blib/arch/auto/DBI/DBI.so  -G DBI.o
*/bin/sh: cc: not found*
make: *** [blib/arch/auto/DBI/DBI.so] Error 1
bash-2.03#

I put the strange thing in bold... as you can see, there's something 
wrong with the options in the gcc command-line and a little lower, the 
cc is still present altough i entered the option CC=gcc...
I tried it on a Linux machine and everything looks good...
Should I remove the standard cc from my Sun, re-install gcc and link cc 
to gcc or do you know another (faster  and easier) solution?

Thanx in advance.

Wim


Reply via email to