473,466 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I build Python 2.3.4 on OpenBSD 3.5?

I'm getting configure warnings and make errors when I try to
build Python 2.3.4 under OpenBSD 3.5. I don't see anything in the
README under "Platform specific note" for OpenBSD. I tried
opening the Python tar file using gtar and I tried using gmake
just to make sure there wasn't anything weird going on there
(I know that using BSD tar when building Zope used to cause
problems, so I first thought I might be having a similar problem.
I'm using gcc version 2.95.3 20010125 (prerelease, propolice).
That's the default that comes with OpenBSD. I didn't change anything.

Has anyone else had similar problems?
I'd appreciate any advice. Hopefully this is a simple mistake...

Here is a clip of the configure warnings that I get:
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 bu**********@gnu.org. ##
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: sys/audioio.h: present but cannot be compiled
configure: WARNING: sys/audioio.h: check for missing prerequisite
headers?
configure: WARNING: sys/audioio.h: proceeding with the preprocessor's
result
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: ## Report this to bu**********@gnu.org. ##
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: sys/lock.h: present but cannot be compiled
configure: WARNING: sys/lock.h: check for missing prerequisite
headers?
configure: WARNING: sys/lock.h: proceeding with the preprocessor's
result
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: ## Report this to bu**********@gnu.org. ##
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h: check for missing prerequisite
headers?
configure: WARNING: sys/select.h: proceeding with the preprocessor's
result
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: ## Report this to bu**********@gnu.org. ##
configure: WARNING: ## ------------------------------------ ##

Here is what I see when I try make:
bash-2.05b# gmake
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:118,
from Include/Python.h:48,
from Modules/python.c:3:
/usr/include/sys/event.h:53: syntax error before `u_int'
/usr/include/sys/event.h:55: syntax error before `u_short'
gmake: *** [Modules/python.o] Error 1

Here is a clip from the config.log file showing the error for select:
configure:4697: checking sys/select.h usability
configure:4710: gcc -c -g -O2 conftest.c >&5
In file included from /usr/include/sys/select.h:38,
from configure:4773:
/usr/include/sys/event.h:53: syntax error before `u_int'
/usr/include/sys/event.h:55: syntax error before `u_short'
configure:4713: $? = 1
configure: failed program was:
| #line 4699 "configure"
| /* confdefs.h. */
|
Yours,
Noah
Jul 18 '05 #1
3 1756
Noah wrote:
Has anyone else had similar problems?
I'd appreciate any advice. Hopefully this is a simple mistake...


OpenBSD does not support Python, so Python has to work around.
However, the OpenBSD work-around is only in force for versions
up to OpenBSD 3.4. In configure, locate the place where it
talks about OpenBSD; then add a 5 to the place that already
lists 234.

Regards,
Martin
Jul 18 '05 #2
"Martin v. Löwis" <ma****@v.loewis.de> wrote in message news:<41***********************@news.freenet.de>.. .

OpenBSD does not support Python, so Python has to work around.
However, the OpenBSD work-around is only in force for versions
up to OpenBSD 3.4. In configure, locate the place where it
talks about OpenBSD; then add a 5 to the place that already
lists 234.

Regards,
Martin


Is it more correct to say that Python does not support OpenBSD?
It seems like the language should support the OS and not the other way around.
What limitations are there for Python on OpenBSD? What work-arounds does
Python have to take? It looks like it undefines _XOPEN_SOURCE.
Does this limit features on OpenBSD?

Should it be a bug that configure doesn't also do this for OpenBSD 3.5?
Although Python 2.3.4 came out before OpenBSD 3.5.

Thanks for the tip. This fixed everything and it builds fine now.

Yours,
Noah
Jul 18 '05 #3
Noah wrote:
Is it more correct to say that Python does not support OpenBSD?
It seems like the language should support the OS and not the other way around.
People usuall think that way, yes. However, in this case, it is really
the other way 'round. OpenBSD claims to implement certain
specifications required by Python, but then actually doesn't. Python
could accept systems that make no such claim, or systems that make
the claim and then fully implement the specification (POSIX in this
case). OpenBSD falls in the middle category of systems making false
or confusing claims.
What limitations are there for Python on OpenBSD? What work-arounds does
Python have to take? It looks like it undefines _XOPEN_SOURCE.
Does this limit features on OpenBSD?
No, it (wrongly) exposes them. OpenBSD "honors" _XOPEN_SOURCE, but
incorrectly. If you define _XOPEN_SOURCE on OpenBSD (which one is
entitled to do on any POSIX system), then some system headers fail
to compile. It would be fine if the system headers offered less
functionality in that case, or more - in no case they should stop
to compile. Python requires that systems either totally ignore
_XOPEN_SOURCE, or honor it by reacting accordingly. Failure to
compile is not a proper reaction.

Many systems currently have the similar flaws, since nobody dares
defining _XOPEN_SOURCE. Since Python needs to define _XOPEN_SOURCE
on some systems (most notably Tru64), and it is "the right thing"
on any system claiming POSIX conformance, and should not hurt on
all other systems, Python defines it always, and exempts a few
specific systems which are known to be broken.

Some vendors have acted since and fixed their systems, e.g. Sun
with Solaris 7 and later. Others, like the OpenBSD maintainers,
unfortunately fail to do so to date.
Should it be a bug that configure doesn't also do this for OpenBSD 3.5?
Although Python 2.3.4 came out before OpenBSD 3.5.


Right. Furthermore, we do hope that some OpenBSD release will fix that
bug. Then, we can gradually remove the work-arounds for older BSD
releases when these systems come out of use. For that procedure,
we need to check every OpenBSD release again whether it supports
POSIX properly.

I just recently added a change to Python 2.4 so it extends the
work-around for 3.5, so Python 2.4 should build on OpenBSD 3.5
out of the box.

Regards,
Martin
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: logistix | last post by:
PyXR 0.9.3- Cross-Referenced HTML from Python Source PyXR generates HTML pages from python source files. It also generates cross-referenced hyperlinks and integrates with the Python Library...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
2
by: Steph L | last post by:
Hi, A given Milter program compiles ok on OpenBSD/FreeBSD/Linux but not on Solaris : it uses daemon(3) http://www.openbsd.org/cgi-bin/man.cgi?query=daemon&apropos=0&sektion...
7
by: David. E. Goble | last post by:
Hi all; I need to build a list of strings in one function and use the list in another function. ie buildlist(char list, FILE **infile); { int i;
1
by: insyte | last post by:
I'm attempting to write a faily simple threaded app that fires off a thread to select() on a FIFO while the main loop handles data read from that pipe and a few other tasks. For some reason, calls...
1
by: Geoff | last post by:
Hi! I'm wanting to use openbsd to run a webserver because of its high security. The website is written in python. Before I was using linux with apache 2 and mod_python and this worked well. My...
5
by: nazgul | last post by:
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat'...
5
by: eranshuman | last post by:
Hi, I m very new to perl I m running an API which have the Buil.pl When Im compiling using perl Build.pl I was getting error : Can't locate Module/Build.pm in @INC (@INC contains:...
9
by: YouCanCallMeAl | last post by:
It seems that the multiprocessing module in 2.6 is broken for *BSD; I've seen issue 3770 regarding this. I'm curious if there are more details on this issue since the posts in 3770 were a bit...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.