473,671 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ 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**********@gn u.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**********@gn u.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**********@gn u.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**********@gn u.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 1770
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.loewi s.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
1719
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 Reference as well, which makes it distinctive from the 8 million other prettyprinters out there. It's been tested on 2.3 for Windows, OpenBSD 3.2 and RedHat 7.3. There's no reason it shouldn't work on other platforms with minor configuration. ...
699
33884
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 capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
2
3811
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 =0&manpath=OpenBSD+Current&arch=i386&format=html http://www.freebsd.org/cgi/man.cgi?query=daemon&sektion=3&apropos=0 &manpath=FreeBSD+5.1-RELEASE
7
1647
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
1403
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 to time.sleep() seem to block until the first time data is dumped into the pipe. Clearly, I could work around this quite easily by "priming the pipe" as it were with a bit of garbage data. However, I'd rather understand the problem. Here's...
1
2089
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 problem is that mod_python 3.x does not work on apache 1 which is what comes with openbsd (and has been hardened buy the openbsd guys). One option is to use mod_python 2.x, but this has not seen any development since 2004. I'm now looking at...
5
2306
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' undeclared (first use in this function) I browsed the source and don't understand why I'm getting it. I'm not a configure expert, but I did figure out that pyconfig.h has these set:
5
7819
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: C:/Perl/site/lib C:/Perl/li b .) at Build.PL line 5.
9
2465
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 unclear. For example, one post claimed that the problem was that sem_open isn't implemented in *BSD, but it is available on FreeBSD 7 (I checked). I'd be willing to help get this working if someone could point me in the right direction.
0
8472
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8596
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.