gfortran.exe жалуется на опцию -mno-cygwin, используя f2py - PullRequest
0 голосов
/ 12 февраля 2019

При компиляции кода Fortran с помощью f2py, gfortran.exe жалуется на опцию '-mno-cygwin'

Я проверил все ответы об аналогичной проблеме с компилятором gcc и удалил опцию -mno -Cygwinот cygwincompiler.py (он был там только один раз).Я использую python (x, y) версии 2.7.10

f2py -c -m ex2lib ex2lib.f90 --fcompiler = gnu95 --compiler = mingw32

Reading fortran codes...
        Reading file 'ex2lib.f90' (format:free)
Post-processing...
        Block: ex2lib
                        Block: calcenergy
                        Block: calcforces
                        Block: calcenergyforces
Post-processing (stage 2)...
Building modules...
        Building module "ex2lib"...
                Constructing wrapper function "calcenergy"...
                  penergy = calcenergy(pos,[dim,natom])
                Constructing wrapper function "calcforces"...
                  forces = calcforces(pos,[dim,natom])
                Constructing wrapper function "calcenergyforces"...
                  penergy,forces = calcenergyforces(pos,[dim,natom])
        Wrote C/API module "ex2lib" to file "c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.c"
  adding 'c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.c' to sources.
  adding 'c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7' to include_dirs.
copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.c -> c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.h -> c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
build_src: building npy-pkg config files
running build_ext
Cannot build msvcr library: "msvcr90d.dll" not found
customize Mingw32CCompiler
customize Mingw32CCompiler using build_ext
customize Gnu95FCompiler
Found executable C:\MinGW\bin\gfortran.exe
Found executable C:\MinGW\bin\gfortran.exe
customize Gnu95FCompiler using build_ext
building 'ex2lib' extension
compiling C sources
C compiler: gcc -O2 -Wall -Wstrict-prototypes

creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.c -o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o
Found executable C:\MinGW\bin\gcc.exe
gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.c -o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o
compiling Fortran sources
Fortran f77 compiler: C:\MinGW\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O2 -funroll-loops
Fortran f90 compiler: C:\MinGW\bin\gfortran.exe -Wall -g -fno-second-underscore -O2 -funroll-loops
Fortran fix compiler: C:\MinGW\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O2 -funroll-loops
compile options: '-Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gfortran.exe:f90: ex2lib.f90
C:\MinGW\bin\gfortran.exe -Wall -g -mno-cygwin -Wall -g -mno-cygwin -shared c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\ex2lib.o -Lc:\mingw\lib\gcc\mingw32\6.3.0 -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lgfortran -o .\ex2lib.pyd
gfortran.exe: error: unrecognized command line option '-mno-cygwin'; did you mean '-mno-clwb'?
gfortran.exe: error: unrecognized command line option '-mno-cygwin'; did you mean '-mno-clwb'?
error: Command "C:\MinGW\bin\gfortran.exe -Wall -g -mno-cygwin -Wall -g -mno-cygwin -shared c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\ex2lib.o -Lc:\mingw\lib\gcc\mingw32\6.3.0 -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lgfortran -o .\ex2lib.pyd" failed with exit status 1```


...