[Python-bugs-list] [ python-Bugs-634444 ] Python does not build on OpenBSD

noreply@sourceforge.net noreply@sourceforge.net
Wed, 06 Nov 2002 15:32:15 -0800


Bugs item #634444, was opened at 2002-11-06 14:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=634444&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 7
Submitted By: Jon Ribbens (jribbens)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python does not build on OpenBSD

Initial Comment:
The new makedev/major/minor feature in posixmodule.c 
breaks the build on OpenBSD.

These macros come from /usr/include/sys/types.h, and 
are conditional on:

#if !defined(_POSIX_SOURCE) && !defined
(_XOPEN_SOURCE)

When ./configure is testing to find makedev etc, neither 
of these macros is defined so it finds them in types.h. 
However when posixmodule.c is compiled, 
_XOPEN_SOURCE is defined, so makedev etc are not 
available and the link fails.


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

>Comment By: Jon Ribbens (jribbens)
Date: 2002-11-06 23:32

Message:
Logged In: YES 
user_id=76089

I am using OpenBSD 2.7, but I think the very latest OpenBSD 
is just the same.

I have investigated a bit more and you are right that 
_XOPEN_SOURCE is defined during configure. I *think* the 
problem is that the configure test used to detect 
HAVE_DEVICE_MACROS is broken. It is just trying to 
compile, but not link, "makedev(major(0),minor(0))", and it is 
not an error to try and compile that line even if makedev, 
major and minor are not defined since the compiler assumes 
they are unknown functions returning int. It is only an error at 
link time, and the configure test does not try to link the test 
code.

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

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-06 22:13

Message:
Logged In: YES 
user_id=21627

On what version of OpenBSD does that happen?

Also, can you find out why _XOPEN_SOURCE is not defined when
testing for makedev? configure ought to define it while
running the tests, and does that on my system. To be
certain, you can add a line

cp confdefs.h foo.h

immediately before the test for makedev is run.

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

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