Subject: | generates wrong elf objects CCFLAGS=...-xarch=v8 should be v9 |
using "perl Makefile.PL" generates a wrong Makefile:
corrected:
#CCFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO
CCFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v9 -D_TS_ERRNO
and then the folling error won't occur
root@odin:DBD-Oracle-1.17 >make
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g"
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI//Driver.xst >
Oracle.xsi
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap
/usr/perl5/5.8.4/lib/ExtUtils/typemap -typemap typemap Oracle.xs >
Oracle.xsc && mv Oracle.xsc Oracle.c
cc -c -I/zones/escjos-ora/root/oracleSW/product/10.2.0/rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/demo
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//plsql/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//network/public
-I/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3
-xspace -xildoff -DVERSION=\"1.17\" -DXS_VERSION=\"1.17\" -KPIC
"-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" -DUTF8_SUPPORT
-DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.1\" Oracle.c
cc -c -I/zones/escjos-ora/root/oracleSW/product/10.2.0/rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/demo
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//plsql/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//network/public
-I/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3
-xspace -xildoff -DVERSION=\"1.17\" -DXS_VERSION=\"1.17\" -KPIC
"-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" -DUTF8_SUPPORT
-DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.1\" dbdimp.c
cc -c -I/zones/escjos-ora/root/oracleSW/product/10.2.0/rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/demo
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//plsql/public
-I/zones/escjos-ora/root/oracleSW/product/10.2.0//network/public
-I/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3
-xspace -xildoff -DVERSION=\"1.17\" -DXS_VERSION=\"1.17\" -KPIC
"-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" -DUTF8_SUPPORT
-DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.1\" oci8.c
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/zones/escjos-ora/root/oracleSW/product/10.2.0/lib32:/zones/escjos-ora/root/oracleSW/product/10.2.0/rdbms/lib32"
cc -G Oracle.o dbdimp.o oci8.o -xarch=v9
-L/zones/escjos-ora/root/oracleSW/product/10.2.0//lib/
-L/zones/escjos-ora/root/oracleSW/product/10.2.0//rdbms/lib/ -lclntsh
`cat /zones/escjos-ora/root/oracleSW/product/10.2.0//lib/sysliblist`
-R/zones/escjos-ora/root/oracleSW/product/10.2.0//lib -laio -lposix4
-lkstat -lm -lthread -lpthread -o blib/arch/auto/DBD/Oracle/Oracle.so
ld: fatal: file Oracle.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to
blib/arch/auto/DBD/Oracle/Oracle.so
*** Error code 1
make: Fatal error: Command failed for target
`blib/arch/auto/DBD/Oracle/Oracle.so'
should be:
file dbdimp.o
dbdimp.o: ELF 64-bit MSB relocatable SPARCV9 Version 1
before it was 32 bit
kind regards
Sebastian