Skip to content
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

Debian: Python should be build against libncursesw5 #235

Closed
JayH5 opened this issue Oct 25, 2017 · 4 comments
Closed

Debian: Python should be build against libncursesw5 #235

JayH5 opened this issue Oct 25, 2017 · 4 comments

Comments

@JayH5
Copy link
Contributor

JayH5 commented Oct 25, 2017

Hi 👋, I've been playing around with the new Debian Stretch variants, and I've come across an issue. In these images, the Python curses module is built with libncurses-dev package, which includes ncurses but without wide-character support. libncursesw5-dev is the package that includes wide-character support (note the w). The Python packages in the Debian repos (on both Jessie and Stretch, across Python versions) are built against the latter package. Additionally, both Jessie and Stretch base images include libncursesw5 (several things are built against the lib), and not libncurses5.

This also results in a weird apt issue on Stretch (but for whatever reason, not Jessie), since the libncurses5 package is never explicitly installed:

❯ docker run --rm -it python:3.6.3-slim-stretch bash
root@05a9ad87176e:/# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@05a9ad87176e:/# apt-get update
Get:1 http://security.debian.org stretch/updates InRelease [62.9 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:5 http://security.debian.org stretch/updates/main amd64 Packages [227 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2479 B]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [5841 B]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [9500 kB]
Fetched 10.0 MB in 4s (2306 kB/s)
Reading package lists...
root@05a9ad87176e:/# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libncurses5
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 294 kB disk space will be freed.
Do you want to continue? [Y/n]

I would normally make a PR to swap libncurses-dev for libncursesw5-dev (this seems to work fine), but that wouldn't solve things for the images based on the buildpack-deps images. Perhaps the library also needs to be changed in buildpack-deps?

Also note: I'm really not an expert on ncurses.

@JayH5
Copy link
Contributor Author

JayH5 commented Oct 30, 2017

@tianon gentle ping on this if you have a moment. It seems likely that people will accidentally uninstall libncurses.

(Also, please lmk if @-mentioning you is completely annoying/inappropriate.)

@tianon
Copy link
Member

tianon commented Oct 30, 2017

Doh yep, Debian appears to use this for both Python 2 and 3. Switching would definitely be appropriate IMO! 👍

@tianon
Copy link
Member

tianon commented Oct 30, 2017

As for buildpack-deps, I think if both can be installed concurrently, that'd be ideal, but otherwise we need to find more examples of software being built against one or the other to determine which is more "popular".

@JayH5
Copy link
Contributor Author

JayH5 commented Nov 1, 2017

Still needs fixing in the buildpack-deps images ( library/buildpack-deps#69 )

There, both libncursesw5-dev and libncurses5-dev can be installed concurrently and Python seems to automatically pick the w-version when building.

RakhithJK pushed a commit to RakhithJK/pyenv-pyenv-wiki that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants