imsparsh / python-for-android

Automatically exported from code.google.com/p/python-for-android
Apache License 2.0
0 stars 0 forks source link

pycrypto gives "bad magic number" errors #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

The current pycrypto egg [pycrypto-2.3-py2.7-linux-armv.egg]
installed in the current release of python-for-android dies with
"bad magic number" errors on loading (at least) DES, DES2 and AES.   

What version of the product are you using? On what operating system?

pycrypto version as above.  Phone is LG-P500 running Android 2.3.3

Original issue reported on code.google.com by drbo...@gmail.com on 4 Sep 2012 at 10:53

GoogleCodeExporter commented 9 years ago
You need to build your egg for python 2.6

Original comment by anthony....@gmail.com on 4 Sep 2012 at 11:02

GoogleCodeExporter commented 9 years ago
The pycrypto egg is the one downloaded and installed by sl4a python, apparently 
from http://code.google.com/p/python-for-android/downloads/list

If that egg is incompatible with the current release of python-for-android, it 
would be nice for us newbies to python if the current release kit didn't offer 
to install it, report success, and then barf on running it. 

Original comment by drbo...@gmail.com on 4 Sep 2012 at 11:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I don't have a platform on which I can build the egg, but I have hacked 
solutions to what seem to be its problems: 

1) pycrypto-2.3-py2.7-linux-armv.egg will not run in py4a-2.7 because it 
references libpython2.6  
Editing the *.so files to replace "libpython2.6" with "libpython2.7" seems to 
work.  

2) pycrypto-2.3-py2.7-linux-armv.egg will not install and run in sl4a which is 
based on python 2.6
Because of the libpython2.6 references, removing the byte-code compiled (*.pyc) 
files from the egg allows it to install and run.  A hacked version 
"pycrypto-2.3-py2.6-linux-armv.egg" is attached.  I suggest the project owners 
make it, or a properly-compiled version, available on the downloads page from 
which sl4a python sources modules.

Original comment by drbo...@gmail.com on 9 Sep 2012 at 12:39

Attachments:

GoogleCodeExporter commented 9 years ago
Added PyCrypto to Python build of: https://code.google.com/p/android-python27/

Original comment by anthony....@gmail.com on 4 Oct 2012 at 12:29