-
Notifications
You must be signed in to change notification settings - Fork 2
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
readline segfaults with python 3.7.2 #1
Comments
Good idea. Just remember that there is absolutely no reason to install readline or gnureadline on Ubuntu, since Linux Pythons typically ship with readline included (unless you are using ActiveState Python or some other non-standard distribution - I'm curious to know your setup :-)). |
I'm wanting to use python 3.7 on Ubuntu 16.04. The default version is 3.5, which is why I'm building my own python. |
Ah, good point. Why do you need readline separately though? Readline 6.3 should be available on 16.04, which is the same version embedded in the gnureadline package. |
Ah, perhaps I'm confused. On python 2.7 I had to install the readline pip package because without that, there was no readline support. I assumed the same was true for python 3.7. Am I missing something? |
If you are building Python from the source tarballs provided at python.org, it might be that you are missing the headers / include files for optional dependencies like readline, zlib, etc. For example, on Ubuntu 16.04 you would want to do (see the Python developer's guide for more info)
since the dependencies have not changed (or very little) from 3.5 to 3.7. Specifically, for readline support you need the Readline support in this case can be added afterwards via the readline package, but that is not the purpose of this package. It is meant for systems that lack readline completely or has an incompatible replacement, while still being Posix compliant. That pretty much narrows it down to macOS... Although ActiveState Python on Linux also benefits from this due to its licensing restrictions. |
Thank you. This makes a lot more sense now. |
Glad to be of help! I'll still take up this issue though - no need to crash knowingly. |
The Modules/3.x/readline.c is from Python 3.3, so don't go beyond that. Also do a basic compiler fix by dropping i386 on macOS 10.9+ and adding arm64 on macOS 11+ (FWIW :-)). This would allow older Pythons to use this on newer macOSes (but please don't do that!). I have verified the combination of Python 3.3.7 and macOS 11.6.6. Hopefully this will block readline from getting installed on modern systems in a more sensible way, by complaining about Python instead of crashing during compilation. I prefer this to complete removal of the package, since someone somewhere might still depend on it. It would be nice if pip had a way to convey a message to the user to switch to gnureadline instead after failing on the Python version. This fixes ludwigschwardt/python-readline#1.
Hi, I discovered the rename the hard way. I install python 3.7.2 on Ubuntu 16.04 and installed readline through pip3. Python now segfaults. I traced it down to the readline pip package. I was able to find that gnureadline is the replacement.
Please prevent readline from matching recent python because of the segfault problem. It definitely breaks 3.7.2 and I see reports that 3.6 breaks as well. This will help prevent surprises. Thanks!
The text was updated successfully, but these errors were encountered: