Compile 32bit C-lib on 64 bit

  • Thread starter Hegedüs Ervin
  • Start date
H

Hegedüs Ervin

Hello,

this is not a "clear" Python question - I've wrote a module in C,
which uses a 3rd-party lib - it's a closed source, I just get the
..so, .a and a header file.

Looks like it works on 32bit (on my desktop), but it must be run
on 64bit servers.


When I'm compiling it on 64bit, gcc says:

/usr/bin/ld: skipping incompatible /lib32/lib3rdpartyCrypt.so when searching for -l3rdpartyCrypt

There _is_ the .so in /lib32 directory:

ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
dynamically linked, stripped


What is the correct solution?


thank you:


a.
 
N

Nobody

When I'm compiling it on 64bit, gcc says:

/usr/bin/ld: skipping incompatible /lib32/lib3rdpartyCrypt.so when
searching for -l3rdpartyCrypt

There _is_ the .so in /lib32 directory:

ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically
linked, stripped


What is the correct solution?

You need to build your module for a 32-bit version of Python.

On a 64-bit system, each process is either 32-bit or 64-bit process. You
can't mix 32-bit code and 64-bit code in a single process. If you have to
use that library and you only have a 32-bit version of it, then everything
else must also be 32-bit: the Python interpreter, your binary module, and
all of the libraries which it uses.
 
H

Hegedüs, Ervin

Hello,

thanks for all reply,

You need to build your module for a 32-bit version of Python.

ok, I believed it, I was hoping there is another solution,
On a 64-bit system, each process is either 32-bit or 64-bit process. You
can't mix 32-bit code and 64-bit code in a single process. If you have to
use that library and you only have a 32-bit version of it, then everything
else must also be 32-bit: the Python interpreter, your binary module, and
all of the libraries which it uses.

ok, thank you,


a.
 
J

Jorgen Grahn

Hello,

this is not a "clear" Python question - I've wrote a module in C,
which uses a 3rd-party lib - it's a closed source, I just get the
.so, .a and a header file.

Looks like it works on 32bit (on my desktop), but it must be run
on 64bit servers.


When I'm compiling it on 64bit, gcc says:

/usr/bin/ld: skipping incompatible /lib32/lib3rdpartyCrypt.so when searching for -l3rdpartyCrypt

A different angle: if you need to use closed-source, non-standard
crypto, and the suppliers cannot even be bothered to compile it for
the CPU architecture that has been standard for at least 6--7 years,
start planning to replace it *now*.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top