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: configure not able to find ncurses/curses in Solaris
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: beerfrick, loewis, sparvu
Priority: low Keywords:

Created on 2004-04-12 18:12 by sparvu, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg20485 - (view) Author: stefanparvu (sparvu) Date: 2004-04-12 18:12
I am trying to build Python 2.3.3 on Solaris 9 x86.
Everything goes fine except that I have some issues
with curses module ...

It looks like configure is failing to detect curses
found /usr/lib or any ncurses installed under system.

Other fixes:


1) I had to fix configure script in order to get it
running by changing

SunOS/5.6 in SunOS/5.*

eg.
"
case $ac_sys_system/$ac_sys_release in
  # On OpenBSD, select(2) is not available if
_XOPEN_SOURCE is defined,
  # even though select is a POSIX function. Reported by
J. Ribbens.
  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for
3.4 by Jason Ish.
  OpenBSD/2.* | OpenBSD/3.[01234])
    define_xopen_source=no;;
  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
  # of union __?sigval. Reported by Stuart Bishop.
  SunOS/5.*)
"


Im building python using 2.95 the GNU compiler.
The configure command was something like:

./configure --prefix=/usr/local --with-threads
--enable-shared

My LD_LIBRARY_PATH is defined as:

/usr/lib:/opt/sfw/lib:/usr/sfw/lib

I have tried passing to the command line
LDFLAGS="-L/usr/lib :/usr/sfw/lib -lcurses -ltermcap "
./configure .... without success
---

I have found that after compilation there are some
warnings about curses module ...


*** WARNING: renaming "_curses" since importing it
failed: ld.so.1: ./python: fatal: relocation error:
file build/lib.solaris-2.9-i86pc-2.3/_curses.so: symbol
newscr: referenced symbol not found
building '_curses_panel' extension

*** WARNING: renaming "_curses_panel" since importing
it failed: No module named _curses

... which, I think, will end by having no curses module
available.

From help() found out these:

help> modules

Please wait a moment while I gather a list of all
available modules...
...
_curses_failed      getpass             py_compile
_curses_panel_failed 


So python 2.3.3 does not biuild 100% clean under
Solaris x86 
I havent tried this on sparc but most likely same
problem is in there too.

Please evaluate.
stefan


msg20486 - (view) Author: stefanparvu (sparvu) Date: 2004-04-12 20:13
Logged In: YES 
user_id=1019660

Regarding this problem looks like 'configure' does not pickup
Solaris's curses library.
I had to manually pass to configure command libncurses library


LDFLAGS="-L/opt/sfw/lib -R/opt/sfw/lib -lncurses"
CPPFLAGS="-I/optsfw/include" ./configure --prefix=/usr/local
--with-threads --enable-shared

Does this mean that python needs libncurses and can not work
with Solaris curses library !? 
msg20487 - (view) Author: stefanparvu (sparvu) Date: 2004-04-13 06:48
Logged In: YES 
user_id=1019660

More details found:

Looks like configure is not able to work with Solaris's
libcurses at all.
I have tried in one system which does not have libncurses at
all.

configure is failing to work with Solaris's libcurses.




checking term.h usability... no
checking term.h presence... yes
configure: WARNING: term.h: present but cannot be compiled
configure: WARNING: term.h: check for missing prerequisite
headers?
configure: WARNING: term.h: proceeding with the
preprocessor's result
configure: WARNING:     ##
------------------------------------ ##
configure: WARNING:     ## Report this to
bug-autoconf@gnu.org. ##
configure: WARNING:     ##
------------------------------------ ##
checking for term.h... yes




From config.log


configure:4690: checking term.h usability
configure:4703: gcc -c -g -O2  conftest.c >&5
In file included from configure:4775:
/usr/include/term.h:1034: parse error before `bool'
/usr/include/term.h:1034: warning: no semicolon at end of
struct or union
/usr/include/term.h:1035: warning: data definition has no
type or storage class
/usr/include/term.h:1060: parse error before `SGTTY'
/usr/include/term.h:1060: warning: no semicolon at end of
struct or union
/usr/include/term.h:1081: parse error before `sgr_mode'
/usr/include/term.h:1081: warning: data definition has no
type or storage class
/usr/include/term.h:1082: parse error before `sgr_faked'
/usr/include/term.h:1082: warning: data definition has no
type or storage class
/usr/include/term.h:1092: parse error before `funckeystarter'
/usr/include/term.h:1092: warning: data definition has no
type or storage class
/usr/include/term.h:1094: parse error before `_fl_rawmode'
/usr/include/term.h:1097: warning: data definition has no
type or storage class
/usr/include/term.h:1101: parse error before `_input_queue'
/usr/include/term.h:1101: warning: data definition has no
type or storage class
/usr/include/term.h:1108: parse error before `*'
/usr/include/term.h:1108: warning: data definition has no
type or storage class
/usr/include/term.h:1111: parse error before `bit_vector'
/usr/include/term.h:1111: warning: data definition has no
type or storage class
/usr/include/term.h:1115: parse error before `check_turn_off'
/usr/include/term.h:1115: warning: data definition has no
type or storage class
/usr/include/term.h:1116: parse error before `non_faked_mode'
/usr/include/term.h:1116: warning: data definition has no
type or storage class
/usr/include/term.h:1117: parse error before `_cur_pair'
/usr/include/term.h:1117: warning: data definition has no
type or storage class
/usr/include/term.h:1118: parse error before `*'
/usr/include/term.h:1118: warning: data definition has no
type or storage class
/usr/include/term.h:1120: parse error before `}'
/usr/include/term.h:1207: parse error before `int'
/usr/include/term.h:1207: `vidputs' declared as function
returning a function
/usr/include/term.h:1207: parse error before `)'
configure:4706: $? = 1


---
stefan






msg20488 - (view) Author: stefanparvu (sparvu) Date: 2004-04-13 13:30
Logged In: YES 
user_id=1019660

I think the problem is between GNU gcc compiler and autoconf ...
when Im using Sun's compiler and libcurses ... I see no
problem. 
python builds fine without any problem.


The problem is visible when Im using gcc and autconf does
not pick up the correct libcurses. At the moment Im
swithcing to Sun's compiler ...

stefan
msg20489 - (view) Author: Ariel Arjona (beerfrick) Date: 2004-08-19 15:45
Logged In: YES 
user_id=200741

Submitted patch 1012280

https://sourceforge.net/tracker/index.php?func=detail&aid=1012280&group_id=5470&atid=305470

I saw this bug on both 2.3.3 and 2.3.4 on Solaris 8 on SPARC
msg20490 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-18 09:59
Logged In: YES 
user_id=21627

This is fixed with said patch.
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40143
2009-01-06 21:25:54amaury.forgeotdarclinkissue816929 superseder
2004-04-12 18:12:36sparvucreate