-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python2 Build fails with make: *** [Makefile:426: sharedmods] Error 139 #1297
Comments
It's a bit annoying because it's a segfault 😞 I don't have the solution, but I can suggest few things to take a look at.
So I think Docker could help, because it may not crash on that image. but then you can try to modify it a bit and makes it look like your own setup, e.g. Arch Linux... But also maybe it already crashes straight away with the Dockerfile provided. All of that could help to "corner" where the issue comes from and eventually fix it. Good luck 🤞 |
do you have a |
I have the same issue, on Arch, but haven't had time to really look at it yet. |
@AndreMiras I'll absolutely give that a try ( Not at home at the moment)! @tshirtman I've looked for a dump file but haven't been able to locate one, when I get home I'll re-run and search more as I cleared everything out. |
Good point for the core dump. On Gentoo it's disable by default, but running |
I have the same issue. I'm also on Arch. Maybe it has to do with some 32bit libs. |
Well, someone fixed it by using: |
The build cpython with BASECFLAGS=-m32 LDFLAGS=-m32 CFLAGS=-m32 ./configure --prefix=/opt/python32 is not a fix. /bin/sh: linje 1: 9857 Segmentfejl (smed kerne) CC='gcc -pthread' LDSHARED='gcc -pthread -shared ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build This was with python-for-android and buildozer build from master. |
Same issue on Fedora 28... where can I add those options? I don't know what to do, it simply crashes (always at the same point when building hostpython2) |
I'm also running into the issue on Fedora 28, even with -m32 in CFLAGS. |
Got it too :[ Hostpython build is straightforward, and a simple ./configure && make should works. It appears no:
=> ends up with a segfault:
So it's system wide, not related to cross compilation (as we are not yet there), and the env (as far as i understand.) |
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). |
Thanks for the research @tito I like the idea of upgrading. But I also like the idea of not investing too much time of it. I think we should drop Python 2 support soon anyway and focus more on Python 3. |
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. |
Well if you want people to use Python 3, then this really should be solved: #1337 because otherwise, nobody that isn't a ctypes wizard and can easily fix this will have any use of it |
I understand, and in my point of view, Crystax SDK is not maintained, our best shot is native compilation of Python 3 same as what we do in Python 2. I already spent time without tangible success yet. And now i need to deliver, no free time to dig and continue for now :/ |
Yea CrystaX seems dead, they didn't respond about me filing a ticket about missing lzma from the standard library either. However, integrating the patch in #1337 would be a huge improvement with minimal effort for at least the current temporary situation. So I think it's worth adding this into the initialization bootstrap python script for now, until a non-Crystax Python 3 port can be made to work. Edit: also, p4a's Python 2 already ships with a similar hack on which this was actually based, so it would probably be necessary for a non-Crystax Python 3 build anyway |
Thanks all for the research and the help. |
I got the same error using python3. Any fixes? |
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: kivy/buildozer#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
The text was updated successfully, but these errors were encountered: