Hi there, I’m new here, although a long-time Panda3D user, but hopefully someone (especially rdb) can help me out?
I’ve been trying to get Panda3D and Python to work together on Android. I’ve successfully built Python 2.7.2 on Android (the regular ARM version), and put the libraries in the correct place for the Panda build. Then, I built Panda according to the commands listed by rdb, but altered --no-python to --use-python. Then I added the libraries to QPython and tried to import them.
Basically it all builds correctly. However, when I transfer the libraries to two separate devices, and try to import panda3d.core, I consistently get:
ImportError: dlopen failed: could not load library "libpanda.so" needed by "core.so"; caused by cannot locate symbol "PyObject_Cmp" referenced by "libpanda.so"...
I’ve tried the --static ‘makepanda’ argument too (out of curiosity) and fixed all the issues that the build had, but was still kind of sure it wouldn’t work as logic suggests. Unfortunately then I get a similar error about the _deflate symbol (or similar) not being locatable. Anyway, no matter what I do with the code, I always seem to get a missing symbol in ‘libpanda.so’ despite the build working okay. I’ve checked the verbose makepanda logs and Python2.7 is included in the commands where it appears it should be (towards the end of the commands).
I’m aware that Python on Android is currently ‘not working’ so have been attempting to accomplish it myself through adding to/altering the C++ code and looking at how/why the Linux build works properly. I have knowledge of assembler, Python, and many other languages, including writing my own (irrelevant I know, but just saying I am capable of eventually managing to get it to work), but unfortunately besides understanding the syntax and logic, I don’t know enough C++ yet, so I’m falling over constantly trying to work out what to create/change. It would be great to hear from and get a bit of help from anyone who is an expert – even a hint on where to start to get Python working properly on Android would be good. If that help is “it’s going to be really difficult for you, so don’t try” then I understand!