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: curses busted on Freebsd/Mac OSX
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: anthonybaxter Nosy List: anthonybaxter, benno, jackjansen, loewis, richard
Priority: normal Keywords:

Created on 2003-09-23 07:50 by richard, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
report.txt richard, 2003-09-23 07:50 configure report
Messages (14)
msg18270 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2003-09-23 07:50
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@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.
msg18271 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-09-23 08:14
Logged In: YES 
user_id=29957

creosote (which is a freebsd machine) also sees this.
msg18272 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2003-09-23 08:28
Logged In: YES 
user_id=6405

"make test" also reports:

test_curses
test test_curses crashed -- _curses.error: curs_set() returned 
ERR
msg18273 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-09-27 07:53
Logged In: YES 
user_id=21627

Can you try the patch in python.org/sf/806800 ?
msg18274 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2003-09-27 08:36
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).
msg18275 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-09-30 14:24
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.
msg18276 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2003-09-30 23:29
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. 
 
msg18277 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-10-01 08:52
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.
msg18278 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-10-01 15:04
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.
msg18279 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-10-01 16:28
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.
msg18280 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-10-01 16:42
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.
msg18281 - (view) Author: Benno Rice (benno) Date: 2003-10-01 16:59
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
msg18282 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-10-02 20:48
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.
msg18283 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-10-04 07:56
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.
History
Date User Action Args
2022-04-10 16:11:18adminsetgithub: 39279
2003-09-23 07:50:28richardcreate