msg28566 - (view) |
Author: Toon Knapen (tknapen) |
Date: 2006-05-19 13:04 |
After configuring, making and make installing the svn-trunk version with sunstudio11 on a Solaris 9 box, an extra '-xcode=pic32' argument is added to the compile-command when I try to install numarray using the setup.py that comes with numarray. To configure python I first executed: export CC=cc export CFLAGS="-xarch=v9" # to force 64bit compilation export EXTRA_CFLAGS="-xarch=v9" # export CXX=CC export CXXFLAGS="-xarch=v9" export F77=f77 export FFLAGS="-xarch=v9" export LDFLAGS="-xarch=v9" Note that EXTRA_CFLAGS needs to be defined too, otherwise python itself will not be compiled with the -xarch=v9 option. Afterwards I want to install numarray using the setup.py (`python setup.py install` command). During compilation of numarray I can however see that distutils is adding -xcode=pic32 on the command-line. Afterwards distutils is not able to link because there now is a mix of 32bit and 64bit code. |
|
|
msg28567 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2006-05-20 06:31 |
Logged In: YES user_id=21627 You must be misunderstanding something. -xcode=pic32 does *not* mean that the code ought to be compiled for the 32-bit processor mode. Instead, it means that the PIC (position independent code) offsets are encoded using 32-bit numbers, which works for both 32-bit and 64-bit code as long as the size of the code does not exceed 4GiB. |
|
|
msg28568 - (view) |
Author: Toon Knapen (tknapen) |
Date: 2006-05-22 13:09 |
Logged In: YES user_id=144552 Indeed the -xcode=pic32 is not at fault here. The problem though still is that distutils is not linking the shared libraries using the link-option '-xarch=v9'. The linker therefore complains about a mix of 32bit and 64bit code. Should'nt distutils copy the content of LDFLAGS of when python is being configured and add these options to the link-line ? |
|
|
msg28569 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2006-05-22 22:27 |
Logged In: YES user_id=21627 Something like that, yes. It's quite involved, so it is not easy to see what the right approach is. If you can come up with a patch that works for you, I can review the patch to find out what else it breaks. |
|
|
msg28570 - (view) |
Author: Toon Knapen (tknapen) |
Date: 2006-05-23 09:13 |
Logged In: YES user_id=144552 Looking through the code of distutils I finally found that plenty of information is recoved from the _current_ environment in distutils/sysconfig.py. Thus the LDFLAGS env.var. I had defined when configuring python is not stored somewhere. So when e.g. installing numarray, I need to set the LDFLAGS env.var. again. Would'nt it be better if python would store the flags/options that were used to compile python itself. This guarantees that the extension modules will be compiled/linked with the same flags and guarantees a maximal compatibility? If you prefer to move this discussion to the python-ml .... |
|
|
msg28571 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2006-05-23 21:11 |
Logged In: YES user_id=21627 Yes, please move discussion to python-dev, although discussion of the build process usually fails to attract anybody. |
|
|
msg28572 - (view) |
Author: Toon Knapen (tknapen) |
Date: 2006-05-30 08:39 |
Logged In: YES user_id=144552 Done. AFAIAC you can close this issue or we wait for the outcome of the discussion on python-dev |
|
|
msg28573 - (view) |
Author: Neal Norwitz (nnorwitz) *  |
Date: 2006-10-29 01:02 |
Logged In: YES user_id=33168 Based on last comment, I'm closing this report. |
|
|