in reply to Re: 64bit perl on AIX
in thread 64bit perl on AIX

If you try to make with the 64bit perl libs you get this (something in the header files??):
ld: 0711-738 ERROR: Input file Oracle.o:
XCOFF32 object files are not allowed in 64-bit mode.
I have played around with the Makefile, but still get the same XCOFF error.

So, if you follow the readme.aix and make with the Oracle lib32, you get this:
batch@cidb1613> cat make.out 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 /appl/datasync/work/perl5/bin/perl -e 'use ExtUtils::Mksymlists; \ Mksymlists("NAME" => "DBD::Oracle", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);' /appl/datasync/work/perl5/bin/perl -p -e "s/~DRIVER~/Oracle/g" /appl/datasync/work/perl5/lib/site_perl/5.8.4/aix-thread-multi-64int/auto/DBI/Driver.xst > Oracle.xsi /appl/datasync/work/perl5/bin/perl /appl/datasync/work/perl5/lib/5.8.4/ExtUtils/xsubpp -typemap /appl/datasync/work/perl5/lib/5.8.4/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c cc_r -c -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/plsql/public -I/usr/local/opt/oracle/product/9.2.0/network/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/appl/datasync/work/perl5/lib/site_perl/5.8.4/aix-thread-multi-64int/auto/DBI -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/usr/local/include -b32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/appl/datasync/work/perl5/lib/5.8.4/aix-thread-multi-64int/CORE" -DUTF8_SUPPORT Oracle.c cc_r -c -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/plsql/public -I/usr/local/opt/oracle/product/9.2.0/network/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/appl/datasync/work/perl5/lib/site_perl/5.8.4/aix-thread-multi-64int/auto/DBI -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/usr/local/include -b32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/appl/datasync/work/perl5/lib/5.8.4/aix-thread-multi-64int/CORE" -DUTF8_SUPPORT dbdimp.c cc_r -c -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/plsql/public -I/usr/local/opt/oracle/product/9.2.0/network/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/appl/datasync/work/perl5/lib/site_perl/5.8.4/aix-thread-multi-64int/auto/DBI -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/usr/local/include -b32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/appl/datasync/work/perl5/lib/5.8.4/aix-thread-multi-64int/CORE" -DUTF8_SUPPORT oci7.c cc_r -c -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/plsql/public -I/usr/local/opt/oracle/product/9.2.0/network/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/usr/local/opt/oracle/product/9.2.0/rdbms/public -I/usr/local/opt/oracle/product/9.2.0/rdbms/demo -I/appl/datasync/work/perl5/lib/site_perl/5.8.4/aix-thread-multi-64int/auto/DBI -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/usr/local/include -b32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/appl/datasync/work/perl5/lib/5.8.4/aix-thread-multi-64int/CORE" -DUTF8_SUPPORT oci8.c Running Mkbootstrap for DBD::Oracle () chmod 644 Oracle.bs rm -f blib/arch/auto/DBD/Oracle/Oracle.so LD_RUN_PATH="/usr/local/opt/oracle/product/9.2.0/lib32:/usr/local/opt/oracle/product/9.2.0/rdbms/lib32" ld -bhalt:4 -bM:SRE -bI:/appl/datasync/work/perl5/lib/5.8.4/aix-thread-multi-64int/CORE/perl.exp -bE:Oracle.exp -bnoentry -lpthreads -lc -L/usr/local/lib Oracle.o dbdimp.o oci7.o oci8.o -b32 -L/usr/local/opt/oracle/product/9.2.0/lib32/ -L/usr/local/opt/oracle/product/9.2.0/rdbms//lib32/ -lclntsh -lld -lm /lib/crt0_r.o -ldl -lc -lpthreads -lodm -lm -lbsd_r -lld -lm -lpthreads -o blib/arch/auto/DBD/Oracle/Oracle.so chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs /appl/datasync/work/perl5/bin/perl "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain Extracted ora_explain from ora_explain.PL with variable substitutions. cp ora_explain blib/script/ora_explain /appl/datasync/work/perl5/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain Manifying blib/man1/ora_explain.1 Manifying blib/man3/DBD::Oracle.3 Manifying blib/man3/DBD::Oraperl.3


And here is the make test on that same:
batch@cidb1613> make test
PERL_DL_NONLAZY=1 /appl/datasync/work/perl5/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/base.......dubious
Test returned status -1 (wstat 132, 0x84) test program seems to have generated a core t/cursor.....dubious
Test returned status -1 (wstat 132, 0x84) test program seems to have generated a core t/general....
It just hangs here.
Any ideas?

Replies are listed 'Best First'.
Re^3: 64bit perl on AIX
by bluto (Curate) on Jun 28, 2004 at 19:59 UTC
    When you said "64bit perl" I though you meant 64bitints -- sorry about that. I'm assuming you are building on AIX 5.1 with a 64-bit kernel. Unfortunately, I'm probably not much help there since I've never built under it.

    From the output it looks like the linker doesn't like the Oracle.o object since (I'm guessing again) it was built in 32-bit mode (XCOFF32) and it needs to be built with a 64-bit compiler. Do you know how this object file is generated? If you are generating this during the build, are you using the right compiler version and/or options?

      I think that Oracle.o is built in the 'perl Makefile.PL' step of building the dbd. Yeah, it is AIX5.1, trying to make everything full 64bit. The compiler is the latest Visual Age C++ from ibm. Thanks! I got this to work...fyi:

      Using Oracle dbd 1.16
      Perl 5.8.4 built like this, with Visual Age 6.0:
      config_args='-Dcc=xlc_r -Dusenm -Dprefix=/appl/datasync/work/perl5 -Dusethreads -Duse64bitall -des'
      ==============================================
      Used DBI 1.42
      =============================================
      Added this to top of Oracle.h:
      #define A_OSF
      #include <oratypes.h>
      =======================
      Set LIBPATH to point to 64bit Oracle libs first.
      export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/lib
      Use: perl Makefile.PL -nob
      Change all references in Makefile of LD_RUN_PATH to be LIBPATH.
      Change nothing else, left all flags in Makefile, including -q64.
      Passed make, and all tests.