-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Improve termcap detection in setup.py #67473
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
Comments
Building Python-2.7.9 using --prefix, with an ncurses that's linked to libtinfo
and had setup.py use "argparse_boot" module instead. The build also ran into trouble with system directories that setup.py The attached files fixed all these issues in my scenario, allowing a succesful |
At a quick glance this does not seem like a reasonable patch...introducing copies of two stdlib modules is basically a non-starter. Nor do I understand from the description what the problem is that it is trying to solve. |
An attempt to build python-2.7.9 resulted in this error:
This happened because setup.py chose "-lncursesw" as the readline terminal |
What system are you using? The patch is quite large, and the existing libtinfo logic should work on most systems. Is the main problem that ldd is not found? |
ldd was found. That patch does abstract and generalize ldd usage into a |
The wholesale inclusion of two additional files makes the patch look larger |
I think even the curses changes alone are rather large, especially |
Larger changes represent more work on the part of the submitter ;) Have the current setup.py detect as the readline termcap library a Then, make sure the --as-needed flag is passed to the link command for the Without --as-needed, superfluous links between shared objects proliferate |
I still don't understand why libncurses is linked against libtinfo but Example Ubuntu (a modern system): $ ldd /lib/x86_64-linux-gnu/libncurses.so.5
linux-vdso.so.1 => (0x00007fff5bfed000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcb8b43a000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fcb8b211000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcb8ae4a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcb8b87d000)
$ ldd /lib/x86_64-linux-gnu/libreadline.so.6
linux-vdso.so.1 => (0x00007fff8c5fe000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f43055a0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f43051da000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4305a2b000) |
Ths OS is RHEL 6, but that's not so important because the entire collection,
So if you don't monkey with the readline distribution, but build and install it |
Ok thanks, I understand the issue now. I'm focusing this issue As an aside, the ncurses maintainer seems to endorse a distro |
FWIW, even http://www.linuxfromscratch.org/lfs/view/stable/chapter06/readline.html [They should be compiling ncurses with tinfo split out though and |
And Python 2.7 no longer supported. Is this issue actual in newer Python versions? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: