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: 2.4.1 build fails on OpenBSD 3.7
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: hyeshik.chang, jp3g, loewis, lpd, nnorwitz
Priority: normal Keywords:

Created on 2005-07-25 16:31 by lpd, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (8)
msg25855 - (view) Author: L. Peter Deutsch (lpd) Date: 2005-07-25 16:31
Python 2.4.1, OpenBSD 3.7, gcc (GCC) 3.3.5 (propolice).

I'm including the logs here because they are short.

"./configure" printed the following:

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
preprocessor's result
configure: WARNING: curses.h: in the future, the
compiler will take precedence
configure: WARNING:     ##
------------------------------------------------ ##
configure: WARNING:     ## Report this to
http://www.python.org/python-bugs ##
configure: WARNING:     ##
------------------------------------------------ ##
checking for curses.h... yes

This warning was printed for curses.h, ncurses.h,
sys/audioio.h, and sys/lock.h. (The reference to
"Autoconf documentation" is useless, because autoconf
is not used during the configure process, and is not
even installed on the system where I was doing the
build.) Then:

% make
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3
-Wall -Wstrict-prototypes -I. -I./Include 
-DPy_BUILD_CORE -o Modules/python.o Modules/python.c
In file included from /usr/include/sys/select.h:38,
                 from Include/pyport.h:116,
                 from Include/Python.h:55,
                 from Modules/python.c:3:
/usr/include/sys/event.h:53: error: syntax error before
"u_int"
/usr/include/sys/event.h:55: error: syntax error before
"u_short"
*** Error code 1

Stop in /usr/src/Python-2.4.1.
msg25856 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-08-06 12:43
Logged In: YES 
user_id=21627

So can you tell us whether there are missing prerequisite
headers? One would need to have access to your operating
system to resolve this issue.
msg25857 - (view) Author: johnnie pittman (jp3g) Date: 2005-08-09 06:34
Logged In: YES 
user_id=1203137

Hey folks,

Also seeing this issue on 3.7.  Same setup described above.
 Loewis, not sure about the first part of your comment.  If
your asking if those header files exist and are available,
yes they are (atleast on my system).

msg25858 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-08-09 18:40
Logged In: YES 
user_id=21627

Can somebody attach a config.log, or reproduce the fragment
that deals with the curses.h presence?

Does your system require any headers to be included for
curses.h to be usable? I.e. if you do

#include <curses.h>
int main(){}

will that program compile, or do you need additional
('prerequisite') headers?
msg25859 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2005-08-28 08:10
Logged In: YES 
user_id=55188

For curses.h problem, it doesn't harm the build much in
fact. It's already reported to FreeBSD bugdb 
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=84219 and I think
it's identical problem on OpenBSD.
msg25860 - (view) Author: L. Peter Deutsch (lpd) Date: 2005-09-25 02:10
Logged In: YES 
user_id=8861

OK, I've found out what goes wrong.  (Debugging a
20,000+-line 'configure' script that omits all useful
information from its output and throws away all its
intermediate files *even if it detects errors* is not fun.)

With the set of configuration options that the script
decides is appropriate (too long to include here),
compilation of a dummy .c file that #includes <curses.h>
fails thusly:

In file included from /usr/include/curses.h:14,
                 from t.h:54,
                 from t.c:1:
/usr/include/ncurses.h:251: error: conflicting types for
`wchar_t'
/usr/include/stdlib.h:51: error: previous declaration of
`wchar_t'

This apparently happens because of line 1483 of the
configure script, which reads:

  OpenBSD/2.* | OpenBSD/3.[0123456])

I can't fathom why OpenBSD 3.7 and later are excluded here,
especially since (1) there are other places in the script
that include all OpenBSD/3.* versions, and (2) the situation
described by the comment just above this line is still true
in OpenBSD 3.7. In any case, changing this line to read

  OpenBSD/2.* | OpenBSD/3.*)

causes configure (and a subsequent make) to complete with no
errors. So apparently other things are broken in the OpenBSD
headerfiles if _XOPEN_SOURCE is defined, not just select(2).

I hope someone authorized to do so will make this fix for
Python 2.4.<N+1>. TIA.
msg25861 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-09-25 04:23
Logged In: YES 
user_id=21627

The issue reported here results from a bug in OpenBSD:
ncurses.h and stdlib.h have conflicting definitions of
wchar_t. This means the system is simply broken, and should
be fixed (or abandoned) eventually.

Python has a work-around for the bug, for those versions in
which the bug has been confirmed. So far, the bug had not
been confirmed for 3.7. Now it is, so we should add 3.7 to
the list of systems that still show the bug. Changing it to
3.* would be incorrect - we cannot know whether the bug will
be present in 3.8, as that system has not been released yet.
msg25862 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-01-09 07:11
Logged In: YES 
user_id=33168

Committed revision 41984.
Committed revision 41985. (2.4)
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42217
2005-07-25 16:31:34lpdcreate