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

ncurses extension uses wrong include path #81160

Open
chargr mannequin opened this issue May 20, 2019 · 2 comments
Open

ncurses extension uses wrong include path #81160

chargr mannequin opened this issue May 20, 2019 · 2 comments
Labels
3.7 (EOL) end of life build The build process and cross-build stdlib Python modules in the Lib dir

Comments

@chargr
Copy link
Mannequin

chargr mannequin commented May 20, 2019

BPO 36979
Nosy @yan12125, @websurfer5, @chargr

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:

assignee = None
closed_at = None
created_at = <Date 2019-05-20.21:48:43.129>
labels = ['3.7', 'build', 'library']
title = 'ncurses extension uses wrong include path'
updated_at = <Date 2019-05-25.18:55:15.962>
user = 'https://github.com/chargr'

bugs.python.org fields:

activity = <Date 2019-05-25.18:55:15.962>
actor = 'Jeffrey.Kintscher'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build', 'Library (Lib)']
creation = <Date 2019-05-20.21:48:43.129>
creator = 'chargr'
dependencies = []
files = []
hgrepos = []
issue_num = 36979
keywords = []
message_count = 2.0
messages = ['342957', '343502']
nosy_count = 3.0
nosy_names = ['yan12125', 'Jeffrey.Kintscher', 'chargr']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue36979'
versions = ['Python 3.6', 'Python 3.7']

@chargr
Copy link
Mannequin Author

chargr mannequin commented May 20, 2019

This is similar to: https://bugs.python.org/issue28190

Not cross-compiling, but using a different ncurses version than is provided under /usr/include/ncursesw

Specifying CPPFLAGS to have "-I/path/to/ncurses/include" does not override the "/usr/include/ncursesw" in setup.py

        if curses_library == 'ncursesw':
            curses_defines.append(('HAVE_NCURSESW', '1'))
            if not cross_compiling:
                curses_includes.append('/usr/include/ncursesw')

Python 2.7.x does not have this issue, but 3.6.x and 3.7.x do. 2 and 3 have different ways of setting up the include path for curses when building the extension.

In my case, removing the curses_include.append from setup.py results in a working extension.

It probably makes sense that Extension(include_dirs=) take priority over Python build CPPFLAGS, setup.py may need to be more cautious about adding the ncurses include path.

Only tested in 2.7, 3.6, 3.7.

@chargr chargr mannequin added 3.7 (EOL) end of life build The build process and cross-build stdlib Python modules in the Lib dir labels May 20, 2019
@websurfer5
Copy link
Mannequin

websurfer5 mannequin commented May 25, 2019

This explains some of the build/linkage problems encountered in issue bpo-36630, and that I encountered while working on issue bpo-36982.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life build The build process and cross-build stdlib Python modules in the Lib dir
Projects
Status: Build
Development

No branches or pull requests

0 participants