|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Building 2.5 on SLHi all.
I'm trying to build a "private" instance of Python 2.5.4 on Snow Leopard, and am running into a problem. To get started, I'm doing:
Top:Python-2.5.4 shansen$ export CC=/usr/bin/gcc-4.0 Top:Python-2.5.4 shansen$ ./configure --enable-universalsdk --enable-framework=/Library/APT/Frameworks Basically, I need a framework install and such, but don't want to touch anything in the system and don't want any other program to touch this particular python. It needs to run on Tiger+, both intel and PPC architectures. The configuration appears to be correct to me, as the gcc commands seem to have all the arch's and the SDK right:
/usr/bin/gcc-4.0 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
Now the problem is, I get the attached error when compiling posixmodule.c. I was idly curious, so downloaded 2.6.3... and ran into the exact same problem. :/ Any ideas? Thanks in advance. --S _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Building 2.5 on SL - configure-2.5.4-for-10.6.patch (1/1)In article
<7a9c25c20910062100i25e0bbe0jb2c37e9025812f93@...>, Stephen Hansen <apt.shansen@...> 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. Thanks! -- Ned Deily, nad@... --- configure 2008-12-13 06:13:52.000000000 -0800 +++ configure-2.5.4-for-10.6 2009-10-06 23:47:46.000000000 -0700 @@ -2032,14 +2032,15 @@ # but used in struct sockaddr.sa_family. Reported by Tim Rice. SCO_SV/3.2) define_xopen_source=no;; - # On FreeBSD 4 and MacOS X 10.2, a bug in ncurses.h means that - # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently, - # this is fixed in 10.3, which identifies itself as Darwin/7.* - # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE + # On FreeBSD 4, a bug in ncurses.h means that + # it craps out if _XOPEN_EXTENDED_SOURCE is defined. + FreeBSD/4.*) + define_xopen_source=no;; + # On Mac OS X 10.4 and beyond, defining _POSIX_C_SOURCE or _XOPEN_SOURCE # disables platform specific features beyond repair. - # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE - # has no effect, don't bother defining them - FreeBSD/4.* | Darwin/[6789].*) + Darwin/[012345].*) + ;; + Darwin/*) define_xopen_source=no;; # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Building 2.5 on SL - configure-2.5.4-for-10.6.patch (1/1)On Oct 7, 2009, at 3:32 AM, Ned Deily wrote:
> In article > <7a9c25c20910062100i25e0bbe0jb2c37e9025812f93@...>, > Stephen Hansen <apt.shansen@...> 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@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Building 2.5 on SL - configure-2.5.4-for-10.6.patch (1/1)On 7 Oct, 2009, at 15:31, Zvezdan Petkovic wrote: > > > 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. Changing the default won't happen until the release of Python 2.7 and 3.2. I'm thinking about providing two installers in the future though: the current 32-bit build that runs on 10.4 and later, as well as a 3-way universal build that runs on 10.5 or later. Ronald _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Building 2.5 on SL - configure-2.5.4-for-10.6.patch (1/1)In article <48C14E26-E790-47C2-BD44-FC65159D8D03@...>,
Zvezdan Petkovic <zvezdan@...> wrote: > On Oct 7, 2009, at 3:32 AM, Ned Deily wrote: > > In article > > <7a9c25c20910062100i25e0bbe0jb2c37e9025812f93@...>, > > Stephen Hansen <apt.shansen@...> 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. I didn't say anything about building for a 10.6 target; this was to fix building for a 10.4 target on 10.6. But you are right: no change is needed to build on 10.6 for a 10.6 target. Nor is there a problem with building for a 10.5 target. 10.4 target is the problem child. But, after posting this last night, I realized that the solution in the patch is not correct (although it fixes the immediate problem) because the original test in configure is flawed. What it's doing is basing the decision about the _XOPEN_SOURCE stuff on the os level of the build machine (its darwin version); what it should be doing is basing it on the value of the deployment target. That's probably true for other darwin version tests in configure but I didn't see any other glaring 10.6 gotchas on a quick first glance. I plan to submit a different patch after getting some time to test the various configurations. -- Ned Deily, nad@... _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Installer variants [Was: Building 2.5 on SL]In article <48C14E26-E790-47C2-BD44-FC65159D8D03@...>,
Zvezdan Petkovic <zvezdan@...> wrote: > 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. That's a good question and now is a good time to have a discussion about it again. I think the primary reason to use 10.3 was to try to maximize the range of supported OS X version while minimizing the number of installer images that need to be built, tested, and maintained. It takes a fair amount of work to do this and it's not like there is a full-time, paid staff to do any of it. And so far it has worked pretty well. (Thanks be to Ronald!) A potential secondary value is to make it easier for package maintainers to supply binary distributions (including via PyPi) for packages with C extension modules. In theory, right now one should be able to supply one bdist_egg that would work for the python.org 2.6 (say) on any of 10.3 to 10.6, obviating the need for the end user to install Xcode just to install the package. I'm not sure that actually works in practice because the version testing in setuptools/Distribute needs to take into account the special multi-version arch names (e.g. "fat", "universal", etc). Plus, different eggs would still be needed to support the Apple-supplied python(s). So, this may be a nice goal but probably needs more work and guidance for package maintainers to achieve maximum benefit for users. It might be a good project for someone to take on. That said, with the introduction of wide-spread 64-bit support in 10.5, there's been a long standing desire to have an officially-supported 64-bit variant available on python.org. For 10.5, Ronald added a "universal" option to the build infrastructure that creates a 4-way build (ppc 32-bit, ppc g5 64-bit, intel 32, intel 64). It works on 10.5 but there are some rough edges yet: no out-of-the-box 64-bit Tk on 10.5 so no Tkinter in 64-bit mode; most of the old (and deprecated) Macintosh modules fail in 64-bit mode because of Apple's decision to not provide full Carbon 64-bit support; documentation needed for 64-bit support, etc etc. Another rough edge has been the lack of easy access to a G5 for ad-hoc testing of ppc-64. A 4-way universal build on 10.5 can be useful as it stands but more work needs to be done to be able to release a batteries-included installer with 64-bit support at the same level of quality as the current 2-way 32-bit-only one. (A side note: there are fewer 64-bit issues for Python 3.x because the problematic Macintosh modules don't exist there.) The picture changes for 10.6. For one, although the ppc-32 variants of the relevant system frameworks and libraries are still supplied, ppc-64 no longer are. There is also an Apple-supplied 64-bit version of Tk 8.5 (although there is at least one ugly unresolved issue at the moment when IDLE/Tkinter is built with it). For these and other reasons, Ronald added a "3-way" build option (no ppc-64) and we've talked about providing a second installer image per release: a 3-way variant with a deployment target of 10.5 which would provide 32-bit (ppc/intel) and intel-64 support for 10.5 and 10.6. But, after some extended exposure to 10.6 and observing some of the issues people have been running into with installing modules, I've changed my mind about this and now would recommend that, for python.org, we officially support 64-bit starting with 10.6, rather than 10.5. That is, continue to supply the 10.3-on-up 32-bit ppc/i386 variants for the foreseeable future and aim to add a second installer (for 2.6.x and 3.1.y) that is built 2-way-intel-only (32/64) with a deployment target of 10.6. Why not 10.5, too? One, there is the lack of official 64-bit Tk support on 10.5. That complicates the installer build; either don't support Tk in 64-bit mode if built on 10.5 or build on 10.6 and add some checks when running or installing on 10.5. It's not an insurmountable problem although there would still be no 10.5 64-bit Tkinter without a possible dependency on 3rd-party frameworks. A more serious problem, I think, is the -arch ppc dependency for extension modules on 10.6. A significant number of popular packages on PyPi are ones that provide wrappers of various sorts to 3rd-party C libraries not provided with OS X or possibly depend on versions newer than those supplied with the OS X release. MySQLdb and PIL are examples of the first case, lxml of the second. By mandating a 3-way architecture on 10.6, when installing packages distutils will try to build all three architectures and, unless the user has gone to the unnecessary trouble of installing at least a 3-way version of the dependent libraries, the extension build/install will likely emit troublesome warning messages like: ld: warning: in /opt/local/lib/mysql5/mysql/libmysqlclient_r.dylib, missing required architecture ppc in file or, in hypothetically more complex builds, actually fail to build. Again, that could probably be fixed in distutils: don't build ppc on 10.6 by default, as long as there was some way to override that when building distributions intended for 10.5. But is it worth the added complexity? Another hypothetical issue, as Zvezdan alludes to, is the differences in functionality between releases. Certainly there are important differences at the framework API level between 10.4 and 10.5. No doubt there are ones yet to be discovered between 10.5 and 10.6. Many of the 3rd-party libraries supplied with OS X are updated for 10.6. And there's no question that 10.5 is the end of the line for PPC support. For all of these reasons, and I'm sure we can all come up with others, I now think it makes most sense to move forward for 64-bit support starting with 10.6. That's not good news for 10.5 users seeking official 64-bit support but they have been on their own this long anyway. And, presumably, most of the Intel-64 users will be motivated to move to 10.6, sooner or later. The "stuckees" here are the ppc G5 users but, alas, they would not get 64-bit support under the 3-way option anyway. So, to summarize, I suggest that we continue to provide the current style of 10.3+ 32-fat installers for 2.m.n and 3.x.y for the indefinite future and that we work towards providing a second installer for 2.m.n and 3.x.y (m, n, x, y TBD), providing 10.6+ intel 32/64 support. If that seems reasonable to everyone (and, particularly, to Ronald), perhaps we should open a tracker issue (more a meta-issue) towards that end. Comments welcome! -- Ned Deily, nad@... _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Installer variants [Was: Building 2.5 on SL]On Wed, Oct 07, 2009, Ned Deily wrote:
> > So, to summarize, I suggest that we continue to provide the current > style of 10.3+ 32-fat installers for 2.m.n and 3.x.y for the indefinite > future and that we work towards providing a second installer for 2.m.n > and 3.x.y (m, n, x, y TBD), providing 10.6+ intel 32/64 support. If > that seems reasonable to everyone (and, particularly, to Ronald), > perhaps we should open a tracker issue (more a meta-issue) towards that > end. Sounds reasonably good to me! I am less interested in 64-bit support than cross-platform support, but I still want to keep up with changes in Python etc. -- Aahz (aahz@...) <*> http://www.pythoncraft.com/ "....Normal is what cuts off your sixth finger and your tail..." --Siobhan _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
|
Re: Installer variants [Was: Building 2.5 on SL]On Oct 7, 2009, at 6:39 PM, Ned Deily wrote:
> So, to summarize, I suggest that we continue to provide the current > style of 10.3+ 32-fat installers for 2.m.n and 3.x.y for the > indefinite future and that we work towards providing a second > installer for 2.m.n and 3.x.y (m, n, x, y TBD), providing 10.6+ > intel 32/64 support. If that seems reasonable to everyone (and, > particularly, to Ronald), perhaps we should open a tracker issue > (more a meta-issue) towards that end. +1 _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@... http://mail.python.org/mailman/listinfo/pythonmac-sig |
| Free embeddable forum powered by Nabble | Forum Help |