msg78224 - (view) |
Author: Cournapeau David (cdavid) |
Date: 2008-12-23 03:59 |
I had some problems with python and universal builds related to the WORDS_BIGENDIAN macro. Because universal builds are built in one pass (one configure), the AC_C_ENDIAN cannot be used reliably. Example: int main() { #ifdef WORDS_BIGENDIAN printf("Big endian macro defined\n"); #else printf("No big endian macro defined\n"); #endif return 0; } If I build this against python 2.5, it prints no big endian macro (I have an intel CPU), as expected. But with python 2.6.0 (official binary from python.org), I get Big endian macro defined. |
|
|
msg78228 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2008-12-23 09:24 |
This is related to . Ronald, what is the status of that? The only reason why BIGENDIAN could be defined in the official binaries is that the build was created on a PPC system. Benjamin, is that the case? |
|
|
msg78234 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2008-12-23 13:23 |
Yes, I made the build on a PPC machine. I'm no expert on this, but maybe we should just get rid of the configure check and use the __LITTLE_ENDIAN__ and __BIG_ENDIAN__ macros. |
|
|
msg78247 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2008-12-23 19:04 |
> Yes, I made the build on a PPC machine. Hmm. Ronald's instructions say that the build machine must be x86 for the build to work. I don't know what other consequences using PPC would have; I recommend that we follow these instructions until we understand them enough to change them. > I'm no expert on this, but maybe > we should just get rid of the configure check and use the > __LITTLE_ENDIAN__ and __BIG_ENDIAN__ macros. That won't work, as not all compilers define these macros. The 2.5 approach works fine (use the macros on OSX, and use the configure test elsewhere). Unfortunately, that support got removed in r63955. The patch in looks fine; I'm unsure why it hasn't been applied yet. |
|
|
msg78413 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2008-12-28 15:38 |
I applied the patch for #4060 in r67982. I would still like to know what difference an Intel machine makes in the installers, though. |
|
|
msg78427 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2008-12-28 19:36 |
On 28 Dec, 2008, at 16:38, Benjamin Peterson wrote: > > Benjamin Peterson <benjamin@python.org> added the comment: > > I applied the patch for #4060 in r67982. I've backported that to 2.6-maint in r67987. > > > I would still like to know what difference an Intel machine makes in > the > installers, though. It should make no difference at all. I haven't tested building on a PPC machine though, all 2.5.x installers were build on an intel box because that happens to be my main development machine. A nice side- effect of building on an intel box is that you can test both architectures without switching to another machine (through Rosetta). Ronald |
|
|