Python2 Build fails with make: *** [Makefile:426: sharedmods] Error 139
See original GitHub issuePython version: 3.6
OS: Arch Linux
python-for-android version: 0.6.0
The command I use to build is:
p4a apk --private ~/Projects/Python/Mobile_Apps/BeerApp/ --package=org.drink.recommendations --name "Drink Recommendations" --version 0.2 --bootstrap=sdl2 --requirements=python2,kivy --ndk_version r9c
The error is:
make: *** [Makefile:426: sharedmods] Error 139
The build logs are in the following file. p4a_errors.txt
Initally I thought that this was a buildozer issue, as I attempted it that way first. So, I opened an issue on their github page and multiple users pointed out that they too were experiencing this issue. I’ve tried with both python3 and python2, the out come is the same. There is absolutely no unicode in any of my source files, I’ve also attempted the build with pygame instead of sdl2 (for python 2). There are also multiple simillar SO threads open about this.
Does anyone have any sugesstions or ideas as to why this is happening and how to go about fixing it?
It’s also worth noting that if I use the kivy buildozer vm, I can use buildozer to carry out a successful build. Just not on any other machine using either buildozer or p4a, using the same source and build commands.
The buildozer issue is here: https://github.com/kivy/buildozer/issues/673
The output from the dump file is:
Reading symbols from /home/suroh/.local/share/python-for-android/build/other_builds/hostpython2/desktop/hostpython2/python...done. [New LWP 28854] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Core was generated by ./python -E ./setup.py -q build. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055731803eb2a in PyInstance_NewRaw (klass=klass@entry=0x7f7cbf1d1c18, dict=0x557319325210, dict@entry=0x0) at Objects/classobject.c:534 534 inst->in_dict = dict; File "/home/suroh/.local/share/python-for-android/build/other_builds/hostpython2/desktop/hostpython2/python-gdb.py", line 55 Py_TPFLAGS_HEAPTYPE = (1L << 9) ^ SyntaxError: invalid syntax
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
Top GitHub Comments
Works with Python 2.7.15.
Related issues:
Long story short, issue was a longstanding in Python < 2.7.15, and recently triggered with recent compiler. They fixed it in 3.x, and backported into 2.7.15. So instead of just gathering the patch back, maybe it’s best to update our 2.x version to 2.7.15 with the cross compilation patches. I’m a little bit afraid of the implication (ssl certificates issues on 2.7.x at some point).
I’ll fix it anyway, last time i checked python 3, i wasn’t able to have sqlite3 + ssl working. And i have few customer old app that i need to maintain, and no budget to switch to Python 3 yet. So drop it is not a complete solution for now.