[Python-Dev] Multilib strikes back

Mihai Ibanescu misa at redhat.com
Mon Nov 22 20:49:39 CET 2004

On Mon, Nov 22, 2004 at 02:04:17PM -0500, Tim Peters wrote:
> [Mihai Ibanescu]
> > This is yet another pain caused by the existance of both 32 and 64-bit
> > libraries/binaries on the same system
> > 
> > This is the bug that landed on my plate:
> > 
> > http://bugzilla.redhat.com/beta/show_bug.cgi?id=139911
> > 
> > Even though I had no plan to have both 32 and 64-bit python on the
> > same system, the reporter of this bug is trying to compule a 32-bit
> > version of libxml on a 64-bit system, and is getting into weird errors,
> > mostly because the .h files have the wrong definition.
> >
> > Please see comment #2 from Jakub about possible solutions. If one
> > has strong preferences one way or another please let me know and I'll
> > write the patch, otherwise I tend to favor the (int(sizeof()) option.
> I can't make time to pretend to understand this, but this solution won't fly:
>     Particularly for the SIZEOF_* defines, one solution is to change them
>     from constants to sizeof (long), sizeof (double) etc.  In C that should
>     make absolutely no difference, ...
> The SIZEOF_* defines are used in C preprocessor #if expressions, and
> sizeof() can't be used in that context.  That's why Python config
> defines them as integer literals to begin with.

Indeed, that would be a problem.
How about a _pyconfig_32.h and a _pyconfig_64.h and have pyconfig.h include
one or the other, depending on the environment?

Thanks again!

More information about the Python-Dev mailing list