[Hampshire] 32bit compiled library on a 64bit system?

Top Page

Reply to this message
Author: David Ramsden
Date:  
To: Hampshire LUG Discussion List
Subject: [Hampshire] 32bit compiled library on a 64bit system?
Hi,

I've got a 64bit Debian (Lenny) system but unfortunately I have a
requirement where I need to run a PHP extension on this system that was
compiled on a 32bit system. The source isn't available and the people
who produce the extension won't recompile it.

$ uname -a
Linux D2-100-70251 2.6.27.10-grsec #1 SMP Wed May 20 23:47:45 BST 2009
x86_64 GNU/Linux

$ sudo tail /var/log/apache/error.log
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20060613/php520_cybersource.so' -
/usr/lib/php5/20060613/php520_cybersource.so: wrong ELF class:
ELFCLASS32 in Unknown on line 0

$ file /usr/lib/php5/20060613/php520_cybersource.so
/usr/lib/php5/20060613/php520_cybersource.so: ELF 32-bit LSB shared
object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

This PHP extension also comes with it's own libs that I've added to
ld.so.conf.

Now I'm guessing the problem is because the PHP extension was compiled
on a 32bit system and I'm trying to run it on a 64 bit system and it's
nothing to do with my hand rolled kernel and me missing out some kind of
backward compatibility option?

I'm also guessing I'm a bit stuck and there's no work around for this? I
can reinstall with a 32bit OS as this system is in testing but of
course, ideally I'd like to run a 64bit OS on the 64bit processor that's
inside the box.

Thanks,
David.
-- 
  .''`.     David Ramsden
: :'  :    http://0wned.it/
`. `'`     PGP key ID: 3454B217 on wwwkeys.eu.pgp.net
   `-  Debian - Because it works (tm).