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: panel.h is not found even if it's installed on various flavours of SUSE
Type: compile error Stage:
Components: Build Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Kenneth.O'Brien, catalin.iacob, doko, fbauzac, hm, v.claudic
Priority: normal Keywords: patch

Created on 2011-06-06 13:00 by v.claudic, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
Building_error_SLES11SP1_ia64.txt.gz v.claudic, 2011-06-06 13:00 Builind process + list of installed packages
find-panel-on-opensuse.patch catalin.iacob, 2012-07-07 12:59 review
ken_ncurses.patch Kenneth.O'Brien, 2013-03-27 13:59 patch review
ken-ncurses-suse-update.patch Kenneth.O'Brien, 2013-03-30 00:23 patch review
Messages (9)
msg137737 - (view) Author: Vincent (v.claudic) Date: 2011-06-06 13:00
Hello everybody,

With the same build/compile command, I'm able to have "my" runing python version (2.6.x or 2.7.x) on IA64 server runing SLES 10 SP2/SP3,not on IA64 server runing SLES 11 SP1. I've try with 2.7, 2.7.1 and 2.7.2rc1 version without success.

On both configuration types, I've installed all the available libraries, but on SLES 11 SP1, the make resulting message is the following (the complete building messages are in the joined gzip text file):

------------------
...
Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _sqlite3           _ssl            
_tkinter           bsddb185           bz2             
dl                 imageop            readline        
sunaudiodev        zlib                               
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_curses_panel                                         

running build_scripts
------------------

Any advice will be welcome.

Thanks a lot for your attention and your process.

All the best,

Vincent
msg137754 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-06-06 17:03
panel.h is not found. You'll need to install the package that
provides libpanel together with the header files:

error: panel.h: No such file or directory


This does not look like a Python bug, so I'll set the issue to
'pending'. You can still respond to the issue if you think otherwise.
msg137762 - (view) Author: Vincent (v.claudic) Date: 2011-06-06 18:24
Hello Stefan,

Thanks a lot for your time and answer, but here are some additional information regarding the requires "panel.h" file. I've just launched a find command onto my ia64 server, and here is the result:

hesione:/ # find / -name "panel.h"
/usr/include/ncurses/panel.h
/usr/include/ncurses6/ncurses/panel.h
/usr/include/ncurses6/ncursesw/panel.h
/usr/include/ncursesw/panel.h
/usr/src/linux-2.6.32.12-0.7-obj/ia64/default/include/config/panel.h

As you may have also observed, the build command is claiming also ncurses, which is installed.

hesione:~ # rpm -qa|grep ncurses
yast2-ncurses-pkg-2.17.16-0.1.77
libncurses6-5.6-90.55
ncurses-devel-5.6-90.55
libncurses5-5.6-90.55
yast2-ncurses-2.17.17-0.4.38
ncurses-utils-5.6-90.55
libncurses5-x86-5.6-90.55
libncurses6-x86-5.6-90.55

Any further information will be welcome.

Thanks again for your patience, time and answer.

All the best,

Vincent
msg161402 - (view) Author: Holger Mickler (hm) Date: 2012-05-23 12:07
I just stumbled upon the same problem with Python 2.7.3 on SLES 11 SP1 amd64.

Obviously, SuSE puts the needed header file into /usr/include/ncurses/, and one can either create a symlink in /usr/include/ or apply a patch to _curses_panel.c:

--- Modules/_curses_panel.c.orig        2012-05-23 13:34:17.000000000 +0200
+++ Modules/_curses_panel.c     2012-05-23 13:34:27.000000000 +0200
@@ -14,7 +14,7 @@
 
 #include "py_curses.h"
 
-#include <panel.h>
+#include <ncurses/panel.h>
 
 static PyObject *PyCursesError;
 

Maybe some logic could be put into the build process to automatically handle this? Apparently, configure already knows about the different locations...

Regards,
  Holger
msg164837 - (view) Author: Catalin Iacob (catalin.iacob) * Date: 2012-07-07 12:59
The same happens on OpenSUSE 12.1 so Python can't be fully built there which is a bit of a shame.

OpenSUSE uses this patch for their packages, but that would break other distributions so it's not a good solution:
-#include <panel.h>
+#include <ncurses/panel.h>

Here's a list of all curses related files in /usr/include on my OpenSUSE 12.1:
catalin@linux-vo6z:~/cpython/issue12271> find  /usr/include/  -regex '.*curses.*' -and \( -type f -or -type l \) -exec ls -lh {} \; 
-rw-r--r-- 1 root root 4.1K May 10 15:28 /usr/include/python2.7/py_curses.h
lrwxrwxrwx 1 root root 16 Nov 20  2011 /usr/include/curses.h -> ncurses/curses.h
-rw-r--r-- 1 root root 75K Oct 29  2011 /usr/include/ncurses/curses.h
-rw-r--r-- 1 root root 6.5K Oct 29  2011 /usr/include/ncurses/cursesapp.h
-rw-r--r-- 1 root root 27K Oct 29  2011 /usr/include/ncurses/cursesf.h
-rw-r--r-- 1 root root 20K Oct 29  2011 /usr/include/ncurses/cursesm.h
-rw-r--r-- 1 root root 8.3K Oct 29  2011 /usr/include/ncurses/cursesp.h
-rw-r--r-- 1 root root 49K Oct 29  2011 /usr/include/ncurses/cursesw.h
-rw-r--r-- 1 root root 7.2K Oct 29  2011 /usr/include/ncurses/cursslk.h
-rw-r--r-- 1 root root 2.9K Oct 29  2011 /usr/include/ncurses/eti.h
-rw-r--r-- 1 root root 9.1K Oct 29  2011 /usr/include/ncurses/etip.h
-rw-r--r-- 1 root root 18K Oct 29  2011 /usr/include/ncurses/form.h
-rw-r--r-- 1 root root 12K Oct 29  2011 /usr/include/ncurses/menu.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses/nc_tparm.h
lrwxrwxrwx 1 root root 8 Nov 20  2011 /usr/include/ncurses/ncurses.h -> curses.h
-rw-r--r-- 1 root root 3.9K Oct 29  2011 /usr/include/ncurses/ncurses_dll.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses/panel.h
-rw-r--r-- 1 root root 40K Oct 29  2011 /usr/include/ncurses/term.h
-rw-r--r-- 1 root root 7.2K Oct 29  2011 /usr/include/ncurses/term_entry.h
-rw-r--r-- 1 root root 3.5K Oct 29  2011 /usr/include/ncurses/termcap.h
-rw-r--r-- 1 root root 13K Oct 29  2011 /usr/include/ncurses/tic.h
-rw-r--r-- 1 root root 3.1K Oct 29  2011 /usr/include/ncurses/unctrl.h
lrwxrwxrwx 1 root root 17 Nov 20  2011 /usr/include/ncurses.h -> ncurses/ncurses.h
lrwxrwxrwx 1 root root 16 Nov 20  2011 /usr/include/ncurses6/curses.h -> ncurses/curses.h
-rw-r--r-- 1 root root 75K Oct 29  2011 /usr/include/ncurses6/ncurses/curses.h
-rw-r--r-- 1 root root 6.5K Oct 29  2011 /usr/include/ncurses6/ncurses/cursesapp.h
-rw-r--r-- 1 root root 27K Oct 29  2011 /usr/include/ncurses6/ncurses/cursesf.h
-rw-r--r-- 1 root root 20K Oct 29  2011 /usr/include/ncurses6/ncurses/cursesm.h
-rw-r--r-- 1 root root 8.3K Oct 29  2011 /usr/include/ncurses6/ncurses/cursesp.h
-rw-r--r-- 1 root root 49K Oct 29  2011 /usr/include/ncurses6/ncurses/cursesw.h
-rw-r--r-- 1 root root 7.2K Oct 29  2011 /usr/include/ncurses6/ncurses/cursslk.h
-rw-r--r-- 1 root root 2.9K Oct 29  2011 /usr/include/ncurses6/ncurses/eti.h
-rw-r--r-- 1 root root 9.1K Oct 29  2011 /usr/include/ncurses6/ncurses/etip.h
-rw-r--r-- 1 root root 18K Oct 29  2011 /usr/include/ncurses6/ncurses/form.h
-rw-r--r-- 1 root root 12K Oct 29  2011 /usr/include/ncurses6/ncurses/menu.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses6/ncurses/nc_tparm.h
lrwxrwxrwx 1 root root 8 Nov 20  2011 /usr/include/ncurses6/ncurses/ncurses.h -> curses.h
-rw-r--r-- 1 root root 3.9K Oct 29  2011 /usr/include/ncurses6/ncurses/ncurses_dll.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses6/ncurses/panel.h
-rw-r--r-- 1 root root 40K Oct 29  2011 /usr/include/ncurses6/ncurses/term.h
-rw-r--r-- 1 root root 7.2K Oct 29  2011 /usr/include/ncurses6/ncurses/term_entry.h
-rw-r--r-- 1 root root 3.5K Oct 29  2011 /usr/include/ncurses6/ncurses/termcap.h
-rw-r--r-- 1 root root 13K Oct 29  2011 /usr/include/ncurses6/ncurses/tic.h
-rw-r--r-- 1 root root 3.1K Oct 29  2011 /usr/include/ncurses6/ncurses/unctrl.h
lrwxrwxrwx 1 root root 17 Nov 20  2011 /usr/include/ncurses6/ncurses.h -> ncurses/ncurses.h
-rw-r--r-- 1 root root 92K Oct 29  2011 /usr/include/ncurses6/ncursesw/curses.h

If we look just for panel.h we get:
catalin@linux-vo6z:~/cpython/issue12271> find  /usr/include/  -regex '.*curses.*' -and \( -type f -or -type l \) -exec ls -lh {} \;  | grep panel.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses/panel.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses6/ncurses/panel.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncurses6/ncursesw/panel.h
-rw-r--r-- 1 root root 4.0K Oct 29  2011 /usr/include/ncursesw/panel.h

There is some specific code that appends '/usr/include/ncursesw' to the include list in setup.py but that doesn't get triggered here because curses_library == 'ncurses' because readline is built against that.

The attached patch makes it build and the curses tests pass but it feels kind of hack-ish. panel.h is there so Python should find it somehow therefore this is a genuine bug. Ideas for a better solution?
msg185334 - (view) Author: Kenneth O'Brien (Kenneth.O'Brien) Date: 2013-03-27 13:59
I have created a simple patch that solves this problem. Depending on whether panel.h or ncurses/panel.h are found, the appropriate one is included.
msg185529 - (view) Author: Kenneth O'Brien (Kenneth.O'Brien) Date: 2013-03-30 00:23
Removed generated files from patch. Requesting review.
msg185564 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2013-03-30 14:59
hard coding ncurses seems to be wrong, as in most cases, you do want ncursesw.
msg354436 - (view) Author: Fabrice BAUZAC (fbauzac) Date: 2019-10-11 10:39
I have been hit by the same issue today.
Kenneth's patch seems fine.  Why not integrate it?
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56480
2019-10-11 10:39:29fbauzacsetnosy: + fbauzac
messages: + msg354436
2014-05-13 22:20:25skrahsetnosy: - skrah
2013-03-30 14:59:26dokosetnosy: + doko
messages: + msg185564
2013-03-30 00:23:04Kenneth.O'Briensetfiles: + ken-ncurses-suse-update.patch

messages: + msg185529
2013-03-27 14:00:00Kenneth.O'Briensetfiles: + ken_ncurses.patch
nosy: + Kenneth.O'Brien
messages: + msg185334

2012-07-07 12:59:42catalin.iacobsetfiles: + find-panel-on-opensuse.patch
title: Python 2.7.x on IA64 running SLES 11 SP1 -> panel.h is not found even if it's installed on various flavours of SUSE
nosy: + catalin.iacob

messages: + msg164837

keywords: + patch
2012-05-23 12:52:49pitrousetstage: resolved ->
resolution: not a bug ->
versions: + Python 3.2, Python 3.3
2012-05-23 12:07:58hmsetnosy: + hm
messages: + msg161402
2011-06-06 18:24:37v.claudicsetstatus: pending -> open

messages: + msg137762
2011-06-06 17:03:41skrahsetstatus: open -> pending

nosy: + skrah
messages: + msg137754

resolution: not a bug
stage: resolved
2011-06-06 13:00:37v.claudiccreate