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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rams chin
    New Member
    • Nov 2010
    • 2

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

    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.pu b.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
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    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.

    Comment

    • Rams chin
      New Member
      • Nov 2010
      • 2

      #3
      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.

      Comment

      • dwblas
        Recognized Expert Contributor
        • May 2008
        • 626

        #4
        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

        Comment

        Working...