[Numpy-discussion] failure building numpy using icc

Charles R Harris charlesr.harris@gmail....
Tue Apr 29 11:24:56 CDT 2008


On Tue, Apr 29, 2008 at 9:50 AM, Glen W. Mabey <Glen.Mabey@swri.org> wrote:

> On Tue, Apr 29, 2008 at 10:41:25AM -0500, Charles R Harris wrote:
> > Could you post the new output? The conv_template routine has changed a
> bit, you should make sure you have the latest version. Also, it is pure
> python and the use of icc shouldn't make a difference in substituting the
> keys in the template to generate the source files. Also try deleting the
> build directory before the new build.
>
> Okay, I deleted the build directory, and here is the full output:
>
>
> executing numpy/core/code_generators/generate_array_api.py
>  adding 'build/src.linux-x86_64-2.5/numpy/core/__multiarray_api.h' to
> sources.
> creating build/src.linux-x86_64-2.5/numpy/core/src
> conv_template:> build/src.linux-x86_64-2.5/numpy/core/src/scalartypes.inc
> Traceback (most recent call last):
>  File "setup.py", line 96, in <module>
>    setup_package()
>  File "setup.py", line 89, in setup_package
>    configuration=configuration )
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/core.py",
> line 184, in setup
>     return old_setup(**new_attr)
>  File "/usr/local/lib/python2.5/distutils/core.py", line 151, in setup
>    dist.run_commands()
>  File "/usr/local/lib/python2.5/distutils/dist.py", line 974, in
> run_commands
>    self.run_command(cmd)
>  File "/usr/local/lib/python2.5/distutils/dist.py", line 994, in
> run_command
>    cmd_obj.run()
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/command/build_ext.py",
> line 56, in run
>     self.run_command('build_src')
>  File "/usr/local/lib/python2.5/distutils/cmd.py", line 333, in
> run_command
>    self.distribution.run_command(command)
>  File "/usr/local/lib/python2.5/distutils/dist.py", line 994, in
> run_command
>    cmd_obj.run()
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/command/build_src.py",
> line 130, in run
>    self.build_sources()
>  File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/command/build_src.py",
> line 147, in build_sources
>     self.build_extension_sources(ext)
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/command/build_src.py",
> line 252, in build_extension_sources
>     sources = self.template_sources(sources, ext)
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/command/build_src.py",
> line 359, in template_sources
>     outstr = process_c_file(source)
>   File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/conv_template.py",
> line 252, in process_file
>    code = process_str(''.join(lines))
>  File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/conv_template.py",
> line 222, in process_str
>    code.extend(parse_string(astr, global_names, 0, 1))
>  File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/conv_template.py",
> line 210, in parse_string
>    newcode = parse_string(text, newenv, newlevel, newline)
>  File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/conv_template.py",
> line 216, in parse_string
>    code.append(replace_re.sub(replace, astr))
>  File
> "/home/gmabey/src/DiamondBack/Diamondback/src/numpy-20080429_svn/numpy/distutils/conv_template.py",
> line 187, in replace
>    raise KeyError, msg
> KeyError: "#line 497\n: 'PREFIX'"
>
>
Hmm, something must be mucking with the sources. You can run conv_template
on the pure file from the src directory with

 python ../../distutils/conv_template.py scalartypes.inc.src

However, when called from within python the routine also processes the
include files and I suspect that may be the problem. Try going into
distutils/conv_template and find the line

include_src_re = re.compile(r"(\n|\A)#include\s*['\"]"
                            r"(?P<name>[\w\d./\\]+[.]src)['\"]", re.I)


and replace it with

include_src_re = re.compile(r"(\n|\A)\s*#include\s*['\"]"
                            r"(?P<name>[\w\d./\\]+[.]src)['\"]", re.I)

Which should knock off any whitespace before #include. This is not a fix,
but it might help us find the problem.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080429/2ed6d40b/attachment.html 


More information about the Numpy-discussion mailing list