[Python-bugs-list] [ python-Bugs-811028 ] configure: curses busted on Freebsd/Mac OSX

SourceForge.net noreply at sourceforge.net
Sat Oct 4 03:56:54 EDT 2003


Bugs item #811028, was opened at 2003-09-23 17:50
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=811028&group_id=5470

Category: Build
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Richard Jones (richard)
>Assigned to: Anthony Baxter (anthonybaxter)
Summary: configure: curses busted on Freebsd/Mac OSX

Initial Comment:
Anthony said to log this:



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: proceeding with the 

preprocessor's result

configure: WARNING:     ## 

------------------------------------ ##

configure: WARNING:     ## Report this to bug-

autoconf at gnu.org. ##

configure: WARNING:     ## 

------------------------------------ ##



I'll attach the text of the report and the configure output 

too since I'm pretty sure the above won't be ligible once 

sf's tracker's finished with it.



----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-04 17:56

Message:
Logged In: YES 
user_id=29957

Fixed in

configure.in 1.438, 1.427.4.8;

configure 1.428,  1.416.4.9



there's also a patch available from

www.python.org/2.3.2/bugs.html

for people who need it working on 2.3.2.



----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2003-10-03 06:48

Message:
Logged In: YES 
user_id=45365

On Jaguar _XOPEN_SOURCE_EXTENDED is only used in curses.h 

and ncurses.h, and one other place defines it (httpd/ap_config.h).



The other good news is that on Panther the problem doesn't exist.

----------------------------------------------------------------------

Comment By: Benno Rice (benno)
Date: 2003-10-02 02:59

Message:
Logged In: YES 
user_id=9925

There is a bug in FreeBSD's ncurses.h where it checks to see

if a macro called __wchar_t is defined before attempting to

typedef it's own wchar_t.  This causes problems because

__wchar_t (and wchar_t) exist, but __wchar_t is a typedef

not a macro.  This is solved by removing

_XOPEN_SOURCE_EXTENDED which is what triggers this check. 

Removing _XOPEN_SOURCE_EXTENDED should have no other

implications on FreeBSD.  There is a patch that disables

_XOPEN_SOURCE_EXTENDED for FreeBSD at

http://jeamland.net/~benno/configure.in.diff

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-02 02:42

Message:
Logged In: YES 
user_id=29957

Ok. Ripping out the line

   AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate

Unix95-and-earlier features)

from configure.in fixes the problem on FreeBSD. The only

occurance of _XOPEN_SOURCE_EXTENDED in FreeBSD's headers is

ncurses.h. FreeBSD will hopefully fix the bug in their

headers to remove the problem in a future version of the

code. Jack or Richard, can you see if _XOPEN_SOURCE_EXTENDED

is used anywhere else on Mac OS X? If not, we could put a

workaround in for Mac OS X and FreeBSD to not define the header.



----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-02 02:28

Message:
Logged In: YES 
user_id=29957

Benno tells me that there's a patch for configure available at

http://jeamland.net/~benno/configure.in.diff



It'll fix FreeBSD, but not Mac OS X. Argh.



----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2003-10-02 01:04

Message:
Logged In: YES 
user_id=45365

I've also seen this. I don't have the time to dive into this, but I 

think it has to do with gcc 3.3. I had just upgraded to gcc 3.3 from 

3.1, and before the upgrade I never saw the problem.



Is everyone who sees the problem using gcc 3.3, by any chance?

If so then it's probably an incompatibility between curses.h and 

that compiler.

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-01 18:52

Message:
Logged In: YES 
user_id=29957

Unless a FreeBSD or Mac OS X expert can step forward in the

next day and suggest a fix, this isn't going to be fixed for

2.3.2(final). I can't spend any more time on it.



----------------------------------------------------------------------

Comment By: Richard Jones (richard)
Date: 2003-10-01 09:29

Message:
Logged In: YES 
user_id=6405

The diagnosis on OS X is similar, and the trigger for defining wchar_t in 
stdlib.h is the absence of _ANSI_SOURCE. 
 
Making it not define _XOPEN_SOURCE_EXTENDED also fixes the compile 
as per your FreeBSD fix. 
 

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-01 00:24

Message:
Logged In: YES 
user_id=29957

Looking into it a bit on FreeBSD:

/usr/include/ncurses.h:236: conflicting types for `wchar_t'

/usr/include/stdlib.h:58: previous declaration of `wchar_t'



and poking around a bit I find that stdlib.h defines wchar_t

as an 'int', while ncurses.h defines it as 'unsigned long'. 



This is on FreeBSD 4.8. 



Extracting the failing configure code and making it not

define _XOPEN_EXTENDED_SOURCE makes the test succeed, but I

have no idea if this is an appropriate fix.



----------------------------------------------------------------------

Comment By: Richard Jones (richard)
Date: 2003-09-27 18:36

Message:
Logged In: YES 
user_id=6405

(I didn't mention it in the report, only to Anthony : this is on 

OSX)



The patch doesn't alter the configure behaviour.



I can't remember how to run the curses test - "make test" skips 

it (the curses module is built though).

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-09-27 17:53

Message:
Logged In: YES 
user_id=21627

Can you try the patch in python.org/sf/806800 ?

----------------------------------------------------------------------

Comment By: Richard Jones (richard)
Date: 2003-09-23 18:28

Message:
Logged In: YES 
user_id=6405

"make test" also reports:



test_curses

test test_curses crashed -- _curses.error: curs_set() returned 

ERR



----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-09-23 18:14

Message:
Logged In: YES 
user_id=29957

creosote (which is a freebsd machine) also sees this.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=811028&group_id=5470



More information about the Python-bugs-list mailing list