Dr. David Kirkby wrote: > On some 64-bit platforms, which include, but is not limited to: > > * Some version of OS X (I don't know what versions or processors) > * Solaris on SPARC processors. > * Solaris on x86 processors. > * OpenSolaris on SPARC processors. > * OpenSolaris on x86 processors. > * HP-UX on PA-RISC processors. > > the default is to build 32-bit objects, but 64-bit objects can be created if > needed. This is usually done via adding the -m64 flag when compiling with GCC > or > SunStudio, though the flag will be different with HP's compiler. > > Numpy is used as part of Sage, but it would appear that adding -m64 to CFLAGS > will not work. A comment in the script used to build numpy shows: > First: Is Python built using -m64? If not, is there a reason that NumPy in 64 bit and load it into 32 bit Python work? If Python is built with -m64 I'd expect NumPy to pick it up automatically as it queries Python for the build flags to use... > # numpy's distutils is buggy and runs a conftest without > # taking CFLAGS into account. With 64 bit OSX this results > # in *boom* > > it then goes on to copy a file called gcc_fake, which is basically a script > which gets renamed to gcc, but includes the -m64 flag. > > We are using numpy-1.3.0. > > Is this a known bug? If not, can I submit it to a bug database? Better still, > does anyone have a patch to resolve it - I hate the idea of making > Until somebody who really knows an answer chimes in;
AFAIK this is a "feature" in distutils itself, so it affects most Python software. (Setting CFLAGS overwrites the necesarry CFLAGS settings, like -fPIC and -fno-strict-aliasing, that is queried from Python). Try setting "OPT" instead? Dag Sverre _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
