PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Gcc Vs CC
Date: Oct 6 2008 6:18PM

Hi Cory,

The problem is that perl stores the parameter that should be passed to  
the compiler when the interpreter is built/configured. So if your perl  
binary was built with Sun's cc compiler it will use that information  
to build any C language extension.

The standard answer to this question is to say: "use the same compiler  
as the one used to build your binary".
However, if you feel just a little bit adventurous (and if you are  
reasonably familiar with gcc) you could edit the DBD::Sybase Makefile  
before running make to adjust the various macros that are used  
(CFLAGS, etc) so that gcc (and the appropriate gcc compiler flags) is  
used.

Michael


On Oct 6, 2008, at 4:58 PM, CSane@EvergreenInvestments.com wrote:

>
> Michael & crew,
>
> I have the following:
> Solaris 10(sparc)
> Active State Perl 5.10
> gcc (GCC) 3.4.6
>
>
> After running " perl Makefile.PL",
> When I run "make", it thinks I want to run "cc" instead of GCC?
> I have already used the following env setting:
> ACTIVEPERL_CONFIG_CC=/usr/local/bin/gcc
>
> How can I override parameter setting passed to GCC?  I have done  
> research over the weekend and with your archive that shows I'm  
> passing CC parameters to GCC that do not work.
>
>  make
> cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
> cp Sybase.pm blib/lib/DBD/Sybase.pm
> /apps/ActivePerl-5.10/bin/perl -p -e "s/~DRIVER~/Sybase/g" /apps/ 
> ActivePerl-5.10/lib/auto/DBI/Driver.xst > Sybase.xsi
> /apps/ActivePerl-5.10/bin/perl /apps/ActivePerl-5.10/lib/ExtUtils/ 
> xsubpp  -typemap /apps/ActivePerl-5.10/lib/ExtUtils/typemap   
> Sybase.xs > Sybase.xsc && mv Sybase.xsc Sybase.c
> /usr/local/bin/gcc -c  -I/apps/sybase/ASE-12_5/OCS-12_5/include - 
> DSYB_LP64 -I/apps/ActivePerl-5.10/lib/auto/DBI -D_REENTRANT - 
> xarch=v9 -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC - 
> D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe  
> -O   -DVERSION=\"1.09\" -DXS_VERSION=\"1.09\" -fPIC "-I/apps/ 
> ActivePerl-5.10/lib/CORE"   Sybase.c
> gcc: language arch=v9 not recognized
> gcc: Sybase.c: linker input file unused because linking not done
> /usr/local/bin/gcc -c  -I/apps/sybase/ASE-12_5/OCS-12_5/include - 
> DSYB_LP64 -I/apps/ActivePerl-5.10/lib/auto/DBI -D_REENTRANT - 
> xarch=v9 -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC - 
> D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe  
> -O   -DVERSION=\"1.09\" -DXS_VERSION=\"1.09\" -fPIC "-I/apps/ 
> ActivePerl-5.10/lib/CORE"   dbdimp.c
> gcc: language arch=v9 not recognized
> gcc: dbdimp.c: linker input file unused because linking not done
> Running Mkbootstrap for DBD::Sybase ()
> chmod 644 Sybase.bs
> rm -f blib/arch/auto/DBD/Sybase/Sybase.so
> LD_RUN_PATH="/apps/sybase/ASE-12_5/OCS-12_5/lib" gcc  -L/apps/sybase/ 
> ASE-12_5/OCS-12_5/lib  -G -xarch=v9 -L/opt/SUNWspro/prod/lib/v9 -L/ 
> usr/lib/sparcv9 -L/usr/ccs/lib/sparcv9 Sybase.o dbdimp.o  -o blib/ 
> arch/auto/DBD/Sybase/Sybase.so        \
>    -L/apps/sybase/ASE-12_5/OCS-12_5/lib -lct64 -lcs64 -ltcl64 - 
> lcomn64 -lintl64 -lblk64 -ldl -lm        \
>
> gcc: Sybase.o: No such file or directory
> gcc: dbdimp.o: No such file or directory
> make: *** [blib/arch/auto/DBD/Sybase/Sybase.so] Error 1
>
> Cory Sane
> 704 374 4499
> InfoStrat Team
> Database Technical Specialist-AVP
> Member of www.TeamSybase.com
> Certified Sybase Associate DBA for ASE 15.0

Michael Peppler              -                    Peppler Consulting  
SaRL
mpeppler@peppler.org         -                     http://www.peppler.org
Sybase DBA/Developer         -      TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ          -      http://www.peppler.org/FAQ/linux.html