[Numpy-discussion] Help building NumPy on Windows

Ralf Gommers ralf.gommers@googlemail....
Mon Jul 16 14:29:36 CDT 2012


On Sun, Jul 15, 2012 at 10:17 PM, Chris Ball <s0454615@sms.ed.ac.uk> wrote:

> Hi,
>
> I'm having some trouble building numpy on a 64-bit Windows 7 machine. I'm
> probably accidentally missing a step following the build process described
> at
> http://scipy.org/Installing_SciPy/Windows; it would be great if someone
> could
> spot what!
>

It complains about not being able to find msvcr90.dll. From some googling
that regularly seems to happen for the 64-bit version of MinGW, but not for
the 32-bit version. Is that dll actually present on your system?


>
> Here's what I did:
> 1. installed python 2.7 from python.org
> 2. installed mingw32 from the link above (results in gcc 3.4.5)
> 3. added c:\mingw\bin to front of path
> 4. ran "python setup.py build --compiler=mingw32 install
> --prefix=numpy-install"
>
> I got the following error:
> [...]
> C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\system_info.py:1409: UserWarning:
>     Lapack (http://www.netlib.org/lapack/) sources not found.
>     Directories to search for the sources can be specified in the
>     numpy/distutils/site.cfg file (section [lapack_src]) or by setting
>     the LAPACK_SRC environment variable.
>   warnings.warn(LapackSrcNotFoundError.__doc__)
> customize GnuFCompiler
> gnu: no Fortran 90 compiler found
> gnu: no Fortran 90 compiler found
> customize GnuFCompiler using config
> C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes
>
> compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900
> -
> Inumpy\core\src\private -Inumpy\core\src -Inumpy\core
> -Inumpy\core\src\npymath -
> Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort
> -
> Inumpy\core\include -Ic:\Python27\include -Ic:\Python27\PC -c'
> gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR
> -
> D__MSVCRT_VERSION__=0x0900 -Inumpy\core\src\private -Inumpy\core\src -
> Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -
> Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\include -
> Ic:\Python27\include -Ic:\Python27\PC -c _configtest.c -o _configtest.o
> Found executable c:\mingw\bin\gcc.exe
> g++ -mno-cygwin _configtest.o -lmsvcr90 -o _configtest.exe
> Found executable c:\mingw\bin\g++.exe
> c:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
> cannot
> find -lmsvcr90
> collect2: ld returned 1 exit status
> failure.
> removing: _configtest.exe.manifest _configtest.c _configtest.o
> Traceback (most recent call last):
>   File "setup.py", line 214, in <module>
>     setup_package()
>   File "setup.py", line 207, in setup_package
>     configuration=configuration )
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\core.py", line 186, in setup
>     return old_setup(**new_attr)
>   File "c:\Python27\lib\distutils\core.py", line 152, in setup
>     dist.run_commands()
>   File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
>     self.run_command(cmd)
>   File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
>     cmd_obj.run()
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\command\build.py", line 37, in run
>     old_build.run(self)
>   File "c:\Python27\lib\distutils\command\build.py", line 127, in run
>     self.run_command(cmd_name)
>   File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
>     self.distribution.run_command(command)
>   File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
>     cmd_obj.run()
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\command\build_src.py", line 152, in run
>     self.build_sources()
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\command\build_src.py", line 163, in
> build_sources
>     self.build_library_sources(*libname_info)
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\command\build_src.py", line 298, in
> build_library_sources
>     sources = self.generate_sources(sources, (lib_name, build_info))
>   File "C:\Users\ceball\npslavetest\Windows7_x64_mingw32_3.4.5-
> py27\build\numpy\distutils\command\build_src.py", line 385, in
> generate_sources
>     source = func(extension, build_dir)
>   File "numpy\core\setup.py", line 648, in get_mathlib_info
>     raise RuntimeError("Broken toolchain: cannot link a simple C program")
> RuntimeError: Broken toolchain: cannot link a simple C program
>
>
> Can anyone see what I've missed from this?
>
>
> I'm not sure what the situation is for supporting building with Microsoft
> compilers, but on another Windows 7 machine (also 64 bits) with MS
> Visual Studio 9.0 installed, the build completes but I get test failures.
> You can see the full output of this here:
> https://jenkins.shiningpanda.com/scipy/job/NumPy-Windows7_x64-
> py27/26/consoleFull
>

The few errors due to invalid values are nothing to worry about, although
they should be fixed. In released versions those are not errors but
warnings. It's likely that those values are correct and the warning should
simply be silenced (disclaimer: I didn't look at this in detail).

That leaves one error:

======================================================================
ERROR: test_not_closing_opened_fid (test_io.TestSavezLoad)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "S:\Users\slave\Jenkins\workspace\NumPy-Windows7_x64-py27\numpy-install\Lib\site-packages\numpy\lib\tests\test_io.py",
line 190, in test_not_closing_opened_fid
    os.remove(tmp)
WindowsError: [Error 32] The process cannot access the file because it
is being used by another process:
'c:\\users\\slave\\appdata\\local\\temp\\tmp46nhch.npz'


Looks odd at first sight. Is it repeatable?

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120716/38dff2a1/attachment-0001.html 


More information about the NumPy-Discussion mailing list