Closed rowend36 closed 4 years ago
This is fully alive, but i currently don't have time to adjust to python 3.7 final, also loading panda3d need a dynamic linker script in panda3d/__init__.py
( it's hacky I may have forgot to bundle it). Does python3 work fine on its own ? Also please understand i can only fully support H3Droid "out-of-the-box". But If you are willing to test on other platform i'll try to do my best and send you some panda3d test code.
It looks like a harfbuzz/freetype.so problem so maybe try to first load libfreetype.so manually
the panda3d/__init__.py
hack is https://gist.github.com/pmp-p/4946692ec65f8825369f68642a2ac5da , should be in /data/data/u.r/usr/lib/python3.7/site-packages/panda3d
you just need to call "import panda3d" to test it
The init.py hack is bundled for 3.7 but not 3.5. But that's not the issue. The problem seems to stem from that there is another libharfbuzz.so with different functions in the /system/lib directory. The libharfbuzz.so seems similar in byte code to another libharfbuzz_ng.so in the same directory but contains less functions. I'm considering either recompiling or just patching elf.
Problem solved by renaming the bundled libharfbuzz and patching libpanda to reference it. I think we can close this issue. In the future, we might have to compile panda3d with the new renamed harfbuzz ie "harfburz".
@ROWEND36, please could you try https://github.com/pmp-p/pydk/releases/tag/v0.2 demo apk to see if problem persists with python3.7.2 and panda 1.10 ?
dynamic loading of libraries is now properly fixed, maybe not for python modules i think that's ouside pydk scope of work.
Not sure if this is still alive but on an android 4.4.2 kitkat, panda3d causes this error back (most recent call last): File "", line 1, in
ImportError: dlopen failed: could not load library "libpanda.so" needed by "core.cpython-37m.so"; caused by could not load library "libpandaexpress.so" needed by "libpanda.so"; caused by could not load library "libandroid.so" needed by "libpandaexpress.so"; caused by could not load library "libandroid_runtime.so" needed by "libandroid.so"; caused by cannot locate symbol "hb_utf16_script_run_next" referenced by "libandroid_runtime.so"...