This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: curses.h: present but cannot be compiled while building with custom CPPFLAGS
Type: compile error Stage: resolved
Components: Build Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: XuehaiPan
Priority: normal Keywords:

Created on 2021-02-17 12:37 by XuehaiPan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Screenshot config master.png XuehaiPan, 2021-02-17 12:37 Screenshot
Screenshot.png XuehaiPan, 2021-02-17 13:24 Screenshot
Messages (3)
msg387150 - (view) Author: Xuehai Pan (XuehaiPan) Date: 2021-02-17 12:37
I install python3 with Linuxbrew. All header files have been symlinked to "~/.linuxbrew/inlcude". It raises warnings when I building with custom CPPFLAGS.

```
checking curses.h usability... no
checking curses.h presence... yes
configure: WARNING: curses.h: present but cannot be compiled
configure: WARNING: curses.h:     check for missing prerequisite headers?
configure: WARNING: curses.h: see the Autoconf documentation
configure: WARNING: curses.h:     section "Present But Cannot Be Compiled"
configure: WARNING: curses.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for curses.h... no
checking ncurses.h usability... no
checking ncurses.h presence... yes
configure: WARNING: ncurses.h: present but cannot be compiled
configure: WARNING: ncurses.h:     check for missing prerequisite headers?
configure: WARNING: ncurses.h: see the Autoconf documentation
configure: WARNING: ncurses.h:     section "Present But Cannot Be Compiled"
configure: WARNING: ncurses.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for ncurses.h... no
checking for term.h... yes
```

See https://github.com/Homebrew/linuxbrew-core/pull/22307 for more details.
msg387152 - (view) Author: Xuehai Pan (XuehaiPan) Date: 2021-02-17 12:50
./configure raised "WARNING: curses.h: present but cannot be compiled" when CPPFLAGS="-I. -I/Include -I${HOMEBREW_PREFIX}/include".

./configure found and compiled with ncurses successfully when CPPFLAGS="-I. -I/Include -I${HOMEBREW_PREFIX}/include -I$(brew --prefix ncurses)/include"

It's really weird that all headers in "$(brew --prefix ncurses)/include" are already symlinked to "${HOMEBREW_PREFIX}/include".
msg387154 - (view) Author: Xuehai Pan (XuehaiPan) Date: 2021-02-17 13:24
Add screenshot.
History
Date User Action Args
2022-04-11 14:59:41adminsetgithub: 87407
2021-02-17 16:23:42XuehaiPansetstatus: open -> closed
resolution: not a bug
stage: resolved
2021-02-17 13:24:12XuehaiPansetfiles: + Screenshot.png

messages: + msg387154
2021-02-17 12:50:35XuehaiPansetmessages: + msg387152
2021-02-17 12:37:44XuehaiPancreate