question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python2 Build fails with make: *** [Makefile:426: sharedmods] Error 139

See original GitHub issue

Python 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
titocommented, Sep 4, 2018

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).

1reaction
titocommented, Sep 4, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

buildozer arch linux fails to build with [Makefile:426
It works for a little while then inevitably fails spitting out the following error. make: *** [Makefile:426: sharedmods] Error 139 STDERR: # ...
Read more >
Developers - Python2 Build fails with make: *** [Makefile:426
Python2 Build fails with make : *** [Makefile:426: sharedmods] Error 139 · Python version: 3.6 · OS: Arch Linux · python-for-android version: 0.6.0....
Read more >
Issue 37930: make fails when compiling Python 2.6 from ...
See below the error message I receive, during make. ... dumped) make: *** [Makefile:414: sharedmods] Error 139 I found this python bug to...
Read more >
Update Python to the new version 3.9 - #19 by marcandre
When I do “sudo make altinstall” despite the errors I get: ... build Segmentation fault make: *** [Makefile:614: sharedmods] Error 139.
Read more >
I can't build my APK :"v - Google Groups
Cwd /root/informatica/.buildozer/android/platform/python-for-android-new-toolchain ... make: *** [Makefile:426: sharedmods] Error 139 \r'# Command failed: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found