By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,986 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,986 IT Pros & Developers. It's quick & easy.

How to fix error: python cannot open cross compiled shared object file?

P: 2
Hi,
Iam trying to build crda agent module on a cross platform(ARM).
To build the same, one of the input module is m2crypto shared object file.
I have sucesfully cross compiled and m2crypto.so file has been generated.

when I give the make command, python script is called internally which should
take m2crypto.so module as input and should generate openssl(RSA) keys.

The problem Iam facing is the python script could'nt import any of the modules from the __m2crypto.so file.
the error iam getting is
-------------------------------
$ make

GEN keys-ssl.c
Trusted pubkeys: /home/tools/crda/pubkeys/linville.key.pub.pem
Traceback (most recent call last):
File "./utils/key2pub.py", line 6, in ?
import m2crypto
ImportError: /usr/lib/python2.4/lib-dynload/m2crypto.so: cannot open shared object file: No such file or directory
make: *** [keys-ssl.c] Error 1
--------------------------------
where as, when I compile m2crypto for host machine(x86 platform) and try to build the crda for the same,
python is able to import the m2crypto.so file.

Any suggestions on how to build it successfully on the different platform(ARM).

Thanks in Advance,
Rams ch
Nov 29 '10 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 621
ImportError: /usr/lib/python2.4/lib-dynload/m2crypto.so: cannot open shared object file: No such file or directory
Are you using Python2.4 on a 32 bit computer? If not, find the Python installation. Start with /usr/lib and /usr/local/lib, and then a symlink to /usr/lib/python2.4 would probably be the simplest solution.
Nov 29 '10 #2

P: 2
Yes Iam using Python2.4 on a 32-bit machine.
I tried using symlink but of no avail.

My doubt is Should I build python for class platform(ARM)? so that it can read the .so file compiled for the same.
Nov 30 '10 #3

Expert 100+
P: 621
I think you have to in fact, but you should emulate it on your PC first and work out the bugs http://www.crosscompile.org/static/pages/Python.html
Nov 30 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.