[Numpy-discussion] Need compilations with compilers other than gcc
pearu at scipy.org
Tue Feb 7 08:07:06 EST 2006
On Tue, 7 Feb 2006, Arnd Baecker wrote:
> On Tue, 7 Feb 2006, Pearu Peterson wrote:
>> On Tue, 7 Feb 2006, Arnd Baecker wrote:
>>> Alright, we might need the asbestos suite thing:
>>> Something ahead: I normally used
>>> python numpy/distutils/system_info.py lapack_opt
>>> to figure out which library numpy is going to use.
>>> With current svn I get the folloowing error:
>>> Traceback (most recent call last):
>>> File "numpy/distutils/system_info.py", line 111, in ?
>>> from exec_command import find_executable, exec_command, get_pythonexe
>>> line 56, in ?
>>> from numpy.distutils.misc_util import is_sequence
>>> ImportError: No module named numpy.distutils.misc_util
>> This occurs probably because numpy is not installed.
> Maybe I am wrong, but I thought that I could run the above
> command before any installation to see which
> libraries will be used.
> My installation notes on this give me the feeling that
> this used to work...
from numpy.distutils.misc_util import is_sequence, is_string
should be changed to
from misc_util import is_sequence, is_string
to fix this.
>>> Concerning icc compilation I used:
>>> export FC_VENDOR=Intel
>> This has no effect anymore. Use --fcompiler=intel instead.
> OK - I have to confess that I am really confused about
> which options might work and which not.
> Is there a document which describes this?
FC_VENDOR env. variable was used in old f2py long time ago. When Fortran
compiler support was moved to scipy_distutils, --fcompiler option was
introduced to config, config_fc, build_ext,.. setup.py commands.
One should use any of these commands to specify a Fortran compiler and
config_fc to change various Fortran compiler flags. See
python setup.py config_fc --help
for more information.
How to enhance C compiler options, see standard Distutils documentation.
>>> export F77=ifort
>>> export CC=icc
>>> export CXX=icc
> But these are still needed?
No for F77, using --fcompiler=.. should be enough. I am not sure about CC,
CXX, must try it out..
>> When Python is compiled with a different compiler than numpy (or any
>> extension module) is going to be installed then proper libraries must be
>> specified manually. Which libraries and flags are needed exactly, this is
>> described in compilers manual.
>> So, a recommended fix would be to build Python with icc and as a
>> result correct libraries will be used for building 3rd party extension
> This would also mean that all dependent packages will have
> to be installed again, right?
> I am sorry but then I won't be able to help with icc at the moment
> as I am completely swamped with other stuff...
>> Otherwise one has to read compilers manual, sections like
>> about gcc-compatibility and linking might be useful. See also
> I thought that supplying ``--libraries="irc"``
> might cure the problem, but
> (quoting from
> However, in the build log I only found -lirc for
> the config_tests but nowhere else.
> What should I do instead of the above?
python setup.py build build_ext -lirc
This will probably use gcc for linking but might fix undefined symbol
More information about the NumPy-Discussion