RE: mod_perl - DBD::Oracle exec format error for Oracle.sl

[prev] [thread] [next] [Date index for 2005/02/23]

From: jwarn
Subject: RE: mod_perl - DBD::Oracle exec format error for Oracle.sl
Date: 23:28 on 23 Feb 2005


Here is the output of chatr for the various libraries.  It looks like 
everything is similiar except for Oracle.sl.  I am still
at a loss, so *any* advice is appreciated.


HTTPD
 > chatr $PH/apache/bin/httpd
/post/home/post/migr/pos/apache/bin/httpd:
         shared executable
         shared library dynamic path search:
             SHLIB_PATH     enabled   first
             embedded path  disabled  second Not Defined
         shared library list:
             dynamic   /usr/lib/libm.2
             dynamic   /usr/lib/libpthread.1
             dynamic   /usr/lib/libcl.2
             dynamic   /usr/lib/libc.2
         shared library binding:
             deferred
         global hash table disabled
         plabel caching disabled
         global hash array size:1103
         global hash array nbuckets:3
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled
         shared library private mapping disabled
         shared library text merging disabled


ORACLE SL
chatr 
/post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl
/post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     disabled  second
             embedded path  enabled   first  
/post/opt/oracle9.2/lib32:/post/opt/oracle9.2/rdbms/lib32
         shared library list:
             dynamic   /post/opt/oracle9.2/lib32//libclntsh.sl.9.0
             dynamic   /usr/lib/libm.2
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled




MOD_PERL
chatr $PH/apache/libexec/libperl.so
/post/home/post/migr/pos/apache/libexec/libperl.so:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     disabled  second
             embedded path  disabled  first  Not Defined
         shared library list:
             dynamic   /usr/lib/libcl.2
             dynamic   /usr/lib/libpthread.1
             dynamic   /usr/lib/libnsl.1
             dynamic   /usr/lib/libnm.sl
             dynamic   /usr/lib/libdld.2
             dynamic   /usr/lib/libm.2
             dynamic   /usr/lib/libc.2
             dynamic   /usr/lib/libsec.2
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled



Thanks.



--------

if it works with perl but not with mod_perl then IMO the apache binary is not
proper build for H-UX Oracle. Please check via

  chattr <apache-sbin>/httpd

that you find in the "shared library list:" section

   /usr/lib/libpthread.1
and
   /usr/lib/libcl.1

if shared library list of

  chattr /post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl

also contains /usr/lib/libcl.1. Both library must be linked to the main-programm if a
shared lib or object needs it. Strange or simpler HP-UX ;-).

regards, Silvio


-----------my orignal message---------------


mod_perl - DBD::Oracle exec format error for Oracle.sl by jwarn2
Back to messages on this topic
Back to modperl
| next >>

Subject:      mod_perl - DBD::Oracle exec format error for Oracle.sl
Author:       jwarn2@xxxxxxx.xxx
Date:         Wed, 09 Feb 2005 18:53:50 +0000


I spent quite a bit of time getting DBD::Oracle to install on this
HP-UX B.11.00 E 9000/800 box.  I followed the instructions in
README.hpux in the DBD::Oracle installation directory.  Within this
readme is also instructions for getting Apache and mod_perl running.
I ended up with a new perl (output below) which needed to be linked to
libpthread (although the perl executable is not multithreaded).  I
then built Apache and mod_perl.

In short, without mod_perl, everything works fine.  I can connect to
Oracle, do queries, etc as a normal CGI process.  However, when I
compile and install mod_perl, I get the following error in the apache
error_log:


[Tue Feb  8 14:21:05 2005] [error] install_driver(Oracle) failed: Can't load 
'/post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' 
for module DBD::Oracle: Exec format error at 
/post/opt/perl-5.8.0/lib/5.8.0/PA-RISC2.0/DynaLoader.pm line 229.\n at (eval 12) 
line 3\nCompilation failed in require at (eval 12) line 3.\nPerhaps a required 
shared library or dll isn't installed where expected\n at 
/post/home/post/migr/pos/bin/db_test.cgi line 12\n

Perl, Apache, DBD::Oracle and mod_perl were all built with the same compiler / linker options so I am at a loss as to what could be causing this loader problem.

Since the database connection works until I installed mod_perl, I am
thinking the compile of mod_perl is somehow unable or incompatbile
with the Oracle DBD shared library.

mod_perl does seem to work as long as I am not trying to make a DBD connection.

*) I built Apache like this (note the -lpthread and -lcl required by
   HPUX 11):

LDFLAGS_SHLIB_EXPORT="" \
LDFLAGS="-lm -lpthread -lcl " \
CC=/usr/bin/cc \
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
./configure \
--prefix=$PH/apache \
--enable-shared=max \
--disable-rule=EXPAT \
--enable-module=info \
--enable-rule=SHARED_CORE


*) And mod_perl next like this:

perl Makefile.PL NO_HTTPD=1 USE_APXS=1 WITH_APXS=/$PH/apache/bin/apxs 
EVERYTHING=1


*) Does 'make test' pass 100%?  Can't make test with APXS

*) Does your script still work under CGI?  YES

*) Apache version: 1.3.33

*) mod_perl version: 1.29


*) Here is the test script:

use DBI;
use CGI;
use POSIX;
$query = new CGI();
print $query->header();
$dbh = DBI->connect('dbi:Oracle:post','user,'pass') || die DBI->error_str;
$st = $dbh->prepare("select * from users");
$st->execute() || die $dbh->error_str;
while (@row = $st->fetchrow_array) {
  print @row,"\n";
}


*) Relevant config from httpd.conf:

PerlSetEnv ORACLE_HOME /post/opt/oracle9.2
PerlSetEnv ORACLE_SID post
PerlSetEnv LD_LIBRARY_PATH /post/opt/oracle9.2/lib 

Alias /cgi-bin/ "/post/home/post/migr/pos/bin/" 
PerlModule Apache::Registry
<Location /cgi-bin>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    allow from all
    PerlSendHeader On
</Location>



*) perl -V:

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=hpux, osvers=11.00, archname=PA-RISC2.0
    uname='hp-ux hxffcn3 b.11.00 e 9000800 698359356 8-user license '
    config_args='-Ubincompat5005 -Duselargefiles -A prepend:libswanted=cl 
pthread  -Dprefix=/post/opt/perl-5.8.0'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags =' +z -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ',
    optimize='+O2 +Onolimit',
    cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE +z -Ae -D_HPUX_SOURCE 
-Wl,+vnocompatwarnings -I/usr/local/include'
    ccversion='A.11.01.25171.GP', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lcl -lpthread -lnsl -lnm -lndbm -lmalloc -ldld -lm -lc -lndir -lcrypt 
-lsec
    perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt 
-lsec
    libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-B,deferred '
    cccdlflags='+Z', lddlflags='-b +vnocompatwarnings -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under hpux
  Compiled at Dec 21 2004 16:48:13
  %ENV:
    PERL5LIB="/post/home/post/migr/pos/lib"
  @INC:
    /post/home/post/migr/pos/lib
    /post/opt/perl-5.8.0/lib/5.8.0/PA-RISC2.0
    /post/opt/perl-5.8.0/lib/5.8.0
    /post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0
    /post/opt/perl-5.8.0/lib/site_perl/5.8.0
    /post/opt/perl-5.8.0/lib/site_perl
    .


The Math Forum 


RE: mod_perl - DBD::Oracle exec format error for Oracle.sl
jwarn 23:28 on 23 Feb 2005

Generated at 17:56 on 01 Mar 2005 by mariachi v0.52