GRRedWings / python3-android

Python 3 cross-compilation tools for Android.
BSD Zero Clause License
68 stars 17 forks source link

Help..... #39

Closed WickyHuang closed 6 months ago

WickyHuang commented 6 months ago

The compilation was successful, but there are exceptions during runtime. There are issues with dynamic libraries when importing modules.

import math Traceback (most recent call last): File "", line 1, in ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/local/tmp/build/usr/lib/python3.12/lib-dynload/math.cpython-312.so"...

image

lf -s /data/local/tmp/build/usr/lib/python3.12/lib-dynload/math.cpython-312.so |grep PyExc_ValueError < 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND PyExc_ValueError 203: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND PyExc_ValueError

WickyHuang commented 6 months ago

ARCH="arm64" ANDROID_API="29" PYVER=3.12.1

some args: --enable-shared --without-ensurepip --enable-ipv6 --with-build-python

GRRedWings commented 6 months ago

Are you trying to build Python 3.12 with the script? Python 3.12 has issues. There is a branch where I got it working, but I have not had time to work on this, and I was holding off on merging the master branch to run 3.12 until it was stable.

WickyHuang commented 6 months ago

I manually tweaked the issue with the patch and it worked successfully, awesome thanks

FeodorFitsner commented 6 months ago

what was the patch?

GRRedWings commented 6 months ago

@FeodorFitsner - There is a patch file in the 3.12 branch. That branch is setup to apply the patch and build.

FeodorFitsner commented 6 months ago

@GRRedWings sorry I couldn't found 3.12 branch. Could you share a link to it please?

nverbeek commented 6 months ago

@FeodorFitsner I believe the branch you're looking for is API26-Build