[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-12-10 Thread Xavier de Gaye
Change by Xavier de Gaye : -- nosy: -xdegaye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-15 Thread muhzi
muhzi added the comment: Ah! I used the option -Bsymbolic while linking the extension to make it work and it did, but I figure it is not ideal. I will be checking that patch! -- components: +Extension Modules -Regular Expressions ___ Python

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-15 Thread Xavier de Gaye
Xavier de Gaye added the comment: It is not yet possible to cross-compile python extensions. The reason is that _init_posix() in Lib/sysconfig.py still reads the sysconfigdata module of the native compiler instead of the sysconfigdata of the cross-built one. See the patch in issue #28833.

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread muhzi
Change by muhzi : Added file: https://bugs.python.org/file48140/xcompile-py3.sh ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread muhzi
Change by muhzi : Removed file: https://bugs.python.org/file48139/xcompile-py3.sh ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread muhzi
muhzi added the comment: OK, I uploaded it. I give the path for NDK then it determines those values for the target architecture, in my case I use it for x86_64. -- Added file: https://bugs.python.org/file48139/xcompile-py3.sh ___ Python tracker

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thank you, but I think there is missing info with your script. Do you have a shell script to share? What are the values of: ANDROID_TARGET ANDROID_API CC++ BIN_UTILS_PREFIX etc... For example, if I want to use a docker image on my Fedora, how can I compile

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread muhzi
muhzi added the comment: Yes, the symbols are there. And here is how I cross compiled Python: export CC="${ANDROID_TARGET}${ANDROID_API}-clang" export CXX="$CC++" # environment variables for binary utils.. export AR="$BIN_UTILS_PREFIX-ar" export LD="$BIN_UTILS_PREFIX-ld" export

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: if you have compiled python with --enable-shared you will get a lib/libpython3.Xdm.so file and you can use nm -D lib/libpython3.Xdm.so | grep PyBool_Type nm --debug-syms lib/libpython3.8dm.so | grep PyBool

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Can you see the symbols when you use nm or readelf? -- nosy: +matrixise ___ Python tracker ___

[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-14 Thread muhzi
New submission from muhzi : I cross compiled python for android x86_64, and the interpreter works fine, no problems. But when I compiled some other extension and try to import it. I get an import error as such the imported shared library fails to locate the symbol "PyBool_Type".