[Patches] [ python-Patches-636318 ] Build fixes for FreeBSD 5.0 (-current)

noreply@sourceforge.net noreply@sourceforge.net
Mon, 11 Nov 2002 09:24:39 -0800


Patches item #636318, was opened at 2002-11-10 20:56
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=636318&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 4
Submitted By: Marc Recht (marc)
Assigned to: Martin v. Löwis (loewis)
Summary: Build fixes for FreeBSD 5.0 (-current)

Initial Comment:
The fixes the building problems on FreeBSD 5.0 (-current).

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

>Comment By: Marc Recht (marc)
Date: 2002-11-11 18:24

Message:
Logged In: YES 
user_id=205

rpc/clnt.h is used by the nismodule so it should be set.
(And IIRC it's used more often in FreeBSD 4.x.)

The problem is that if _POSIX_SOURCE or _POSIX_C_SOURCE is set
__BSD_VISIBLE isn't defined. Because of that certain
functions and defines which Python seems to rely on aren't
defined. Another problem is that some functions like ftello
are defined at a higher POSIX level than python expects.
The cleanest way for FreeBSD to solve this issues for
FreeBSD is to
not define  _POSIX_SOURCE or _POSIX_C_SOURCE. This means
also _XOPEN_SOURCE can't be defined, because then
_POSIX_C_SOURCE
will be defined in cdefs.h.


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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-11 15:48

Message:
Logged In: YES 
user_id=21627

Can you please explain *why* _THREAD_SAFE is needed for
threaded programs on FreeBSD? Looking at the -CURRENT
sources, I find but a single occurrence of _THREAD_SAFE (in
rpc/clnt.h), which is not relevant to Python.

As for the build problems we talked on python-dev: Can you
please re-iterate what those problems are, if you take the
current Python CVS as a starting point?

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

Comment By: Marc Recht (marc)
Date: 2002-11-11 15:39

Message:
Logged In: YES 
user_id=205

The patches contain two parts. A work-around for the FreeBSD
5.0-current
build problems, we talked/talking about at python-dev@.
The second part is the addition of _THREAD_SAFE to the
CFLAGS, if Python is build with threads. _THREAD_SAFE is
needed for threaded programs on FreeBSD.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-11 15:24

Message:
Logged In: YES 
user_id=21627

Can you please list the problems that this patch fixes? They
might be fixed in the current CVS.

In particular, what is the effect of defining _THREAD_SAFE?

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-10 22:53

Message:
Logged In: YES 
user_id=21627

In this form, the patch likely won't be accepted. I see it
is not urgent, since the system it applies to has not been
released, yet. So I would like to resolve #635034 first, and
would propose that the _XOPEN_SOURCE issue then integrates
with the framework established there.

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

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