[NumPy-Tickets] [NumPy] #2194: Gnu95FCompiler doesn't find libmingwex.a when using msvc + gfortran
NumPy Trac
numpy-tickets@scipy....
Mon Jul 30 12:50:52 CDT 2012
#2194: Gnu95FCompiler doesn't find libmingwex.a when using msvc + gfortran
---------------------------------------+------------------------------------
Reporter: stevenwinfield | Owner: cdavid
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.distutils | Version: 1.6.1
Keywords: win32 msvc gfortran mingw |
---------------------------------------+------------------------------------
(This is actually a bug in 1.6.2, but I couldn't select that)
A MingW installation is laid out as follows:
{{{
MingW
| - lib
| | - libmingw32.a
| | - libmingwex.a
| | - gcc
| | - mingw32
| | - <version number>
| | - libgcc.a
| - mingw32
| - lib
| - ...
}}}
In numpy/distutils/fcompiler/gnu.py, in the get_library_dirs() method of
Gnu95FCompiler (beginning line 299) the code first gets the libgcc
directory then tries to navigate to the directory containing libmingwex.a
by doing the following:
{{{
d = os.path.normpath(self.get_libgcc_dir())
root = os.path.join(d, os.pardir, os.pardir, os.pardir, os.pardir)
mingwdir = os.path.normpath(os.path.join(root, target, "lib"))
}}}
"target" here is "mingw32", so mingwdir is "MingW\mingw32\lib", which
exists but doesn't contain libmingwex.a. If "target" were to be removed
from the last line then all would be fine.
This problem manifests itself when trying to build scipy, with the error
message:
{{{
LINK : fatal error LNK1181: cannot open input file 'mingw32.lib'
}}}
This is because a few MingW .a files are copied (by
_libs_with_msvc_and_fortran() in numpy/distutils/command/build_ext.py) to
.lib files in a temporary build directory so that they can be found by
msvc - one of which should be libmingw32.a => mingw32.lib. However, the .a
file is never found and so the copying never takes place.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2194>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list