On Oct 7, 2009, at 3:32 AM, Ned Deily wrote:

In article
<7a9c25c20910062100i25e0bbe0jb2c37e9025812...@mail.gmail.com>,
Stephen Hansen <apt.shan...@gmail.com> wrote:
I'm trying to build a "private" instance of Python 2.5.4 on Snow Leopard,
and am running into a problem. [...]

A-hah!  The problem is that Snow Leopard is also Darwin 10.0 and it
turns out that an important test in the configure script doesn't handle
the two-digit major version number correctly.

The attached patch should fix the problem.  Or simply manually edit
configure to replace the line:
 FreeBSD/4.* | Darwin/[6789].*)

with the three lines:
 Darwin/[012345].*)
     ;;
 Darwin/*)

The same problem affects all of the current Pythons which is why you saw it on 2.6.3 as well. I'll see that it gets taken care of.

First, let me state that your patch is probably in agreement with the intended purpose of that case in the configuration.

But, just for the record, the setting itself does not cause the problems for Python 2.6 if it's built for Mac OS X 10.6 target.

See configure.in around line 60:
=====
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
# them.
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
=====

That takes care of _POSIX_C_SOURCE_ (see "man compat" on Mac).

I compiled Python 2.4 successfully on Snow Leopard adding the above definition of _DARWIN_C_SOURCE to configure.in (and removing -Wno-long- double -no-cpp-precomp from BASECFLAGS since gcc-4.2 does not accept them any more). I bet 2.5 would compile fine too, but I used 10.6 as the deployment target.

The OP compiled using -macosx-version-min=10.4 to make it compatible with Tiger.

According to Apple's development documentation, between Tiger and Leopard, many important changes happened (including full UNIX certification) that these incompatibilities will always pop-up.

Why do we make 10.4 or even 10.3 the default target for Mac builds of Python any more? Moving the default to 10.5 would be better, IMHO.

Best regards,

        Zvezdan

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to