[gmx-users] Build failure - Gromacs 5.1.4 on Windows 10 64-bit

Sam Sutton sam.sutton at chem.ox.ac.uk
Wed Sep 14 10:17:33 CEST 2016


Sorry about the formatting issues of my first email: Mac mail defaulting to rich not plain text… Here is the email again in hopefully legible plain text form.

Hi all, 

I've been trying to install Gromacs 5.1.4 on my desktop PC, and after googling every new error and slowly progressing, I've reached an impasse. I have successfully installed Gromacs 5.1.4 on an Ubuntu 14.04 virtual machine on said PC, and am hoping the details I provide below are sufficient for someone wiser to help me out in getting it working on Windows!

Windows 10 64-bit
Cygwin version 2.6.0
CMake version 3.6.1

Installed fftw-3.3.5 from source using Cygwin:

directory: cygdrive/c/fftw-3.3.5

$ ./configure --enable-float --enable-sse2 --enable-avx --enable-avx2 --enable-shared
$ make
$ make install

Resulting In:

/usr/local/bin:
cygfftw3f-3.dll
fftw-wisdom.exe
fftw-wisdom-to-conf

/usr/local/include:
fftw3.f
fftw3.f03
fftw3.h
fftw3l.f03
fftw3q.f03

/usr/local/lib:
pkgconfig/fftw3f.pc
libfftw3f.a
libfftw3f.dll.a
libfftw3f.la

No shared libraries seem to have been created.

I then create: C:\gromacs-5.1.4\build and run (again in Cygwin):

$ CMAKE_PREFIX_PATH="C:\cygwin64\usr\local" cmake .. -DGMX_GPU=ON -DGMX_FFT_LIBRARY=fftw3 -DREGRESSIONTEST_DOWNLOAD=ON

This results in a failure to find the fftw3f library. I read on the mailing list that I can specify include and lib directories manually to try and solve this issue:

$ cmake .. -DCMAKE_INCLUDE_PATH="/usr/local/include" -DCMAKE_LIBRARY_PATH="/usr/local/lib" -DGMX_GPU=ON -DGMX_FFT_LIBRARY=fftw3 -DREGRESSIONTEST_DOWNLOAD=ON

But this also results in:

-- Checking for module 'fftw3f'
--   No package 'fftw3f' found
-- pkg-config could not detect fftw3f, trying generic detection
Could not find fftw3f library named libfftw3f, please specify its location in CMAKE_PREFIX_PATH or FFTWF_LIBRARY by hand (e.g. -DFFTWF_LIBRARY='/path/to/libfftw3f.so')
CMake Error at cmake/gmxManageFFTLibraries.cmake:81 (MESSAGE):
 Cannot find FFTW 3 (with correct precision - libfftw3f for mixed-precision
 GROMACS or libfftw3 for double-precision GROMACS).  Either choose the right
 precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the
 advanced option to let GROMACS build FFTW 3 for you
 (-DGMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack
 library (-DGMX_FFT_LIBRARY=fftpack).
Call Stack (most recent call first):
 CMakeLists.txt:669 (include)

I then specify the location of the fftw library file:

$ cmake .. -DFFTWF_LIBRARY="/usr/local/lib/libfftw3f.a" -DGMX_GPU=ON -DGMX_FFT_LIBRARY=fftw3 -DREGRESSIONTEST_DOWNLOAD=ON

Which results in:

-- Checking for module 'fftw3f'
--   No package 'fftw3f' found
-- pkg-config could not detect fftw3f, trying generic detection
-- Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a
-- Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a - not found
CMake Error at cmake/FindFFTW.cmake:101 (message):
 Could not find fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a, take a look
 at the error message in C:/gromacs-5.1.4/build/CMakeFiles/CMakeError.log to
 find out what went wrong.  If you are using a static lib (.a) make sure you
 have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
 -DFFTWF_LIBRARY='/path/to/libfftw3f.so;/path/to/libm.so') !
Call Stack (most recent call first):
 cmake/gmxManageFFTLibraries.cmake:78 (find_package)
 CMakeLists.txt:669 (include)

To remedy the pkg-config issue:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:PKG_CONFIG_PATH

I then ran:

$ cmake .. -DFFTWF_LIBRARY='/usr/local/lib/libfftw3f.a' -DFFTW_INCLUDE_DIR='/usr/include' -DGMX_PREFER_STATIC_LIBS=ON -DGMX_GPU=ON -DGMX_FFT_LIBRARY=fftw3 -DREGRESSIONTEST_DOWNLOAD=ON

Resulting in:

-- Checking for module 'fftw3f'
--   Found fftw3f, version 3.3.5
-- Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a
-- Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a - not found
CMake Error at cmake/FindFFTW.cmake:101 (message):
 Could not find fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.a, take a look
 at the error message in C:/gromacs-5.1.4/build/CMakeFiles/CMakeError.log to
 find out what went wrong.  If you are using a static lib (.a) make sure you
 have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
 -DFFTWF_LIBRARY='/path/to/libfftw3f.so;/path/to/libm.so') !
Call Stack (most recent call first):
 cmake/gmxManageFFTLibraries.cmake:78 (find_package)
 CMakeLists.txt:669 (include)

I have tried searching the Gromacs documentation and using Google to determine what the dependencies referred to are, and how to link them, but I have not been successful. The relevant section of the CMakeError.log file is pasted below:

Source file was:
int main() { return 0;}
Determining if the function fftwf_plan_r2r_1d exists in the /cygdrive/c/fftw-3.3.5/.libs/libfftw3f.a failed with the following output:
Change Dir: C:/gromacs-5.1.4/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_600ec.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 13/09/2016 10:57:24.
Project "C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\cmTC_600ec.vcxproj" on node 1 (default targets).
PrepareForBuild:
 Creating directory "cmTC_600ec.dir\Debug\".
 Creating directory "C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\Debug\".
 Creating directory "cmTC_600ec.dir\Debug\cmTC_600ec.tlog\".
InitializeBuildStatus:
 Creating "cmTC_600ec.dir\Debug\cmTC_600ec.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=fftwf_plan_r2r_1d /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_600ec.dir\Debug\\" /Fd"cmTC_600ec.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.6\Modules\CheckFunctionExists.c"
 Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86
 Copyright (C) Microsoft Corporation.  All rights reserved.

 cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=fftwf_plan_r2r_1d /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_600ec.dir\Debug\\" /Fd"cmTC_600ec.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.6\Modules\CheckFunctionExists.c"

 CheckFunctionExists.c
Link:
 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\Debug\cmTC_600ec.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib "\cygdrive\c\fftw-3.3.5\.libs\libfftw3f.a" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/gromacs-5.1.4/build/CMakeFiles/CMakeTmp/Debug/cmTC_600ec.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/gromacs-5.1.4/build/CMakeFiles/CMakeTmp/Debug/cmTC_600ec.lib" /MACHINE:X86 /SAFESEH  /machine:X86 cmTC_600ec.dir\Debug\CheckFunctionExists.obj
LINK : fatal error LNK1104: cannot open file '\cygdrive\c\fftw-3.3.5\.libs\libfftw3f.a' [C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\cmTC_600ec.vcxproj]
Done Building Project "C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\cmTC_600ec.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\cmTC_600ec.vcxproj" (default target) (1) ->
(Link target) -> 
 LINK : fatal error LNK1104: cannot open file '\cygdrive\c\fftw-3.3.5\.libs\libfftw3f.a' [C:\gromacs-5.1.4\build\CMakeFiles\CMakeTmp\cmTC_600ec.vcxproj]

   0 Warning(s)
   1 Error(s)

Time Elapsed 00:00:00.45

Thanks in advance,

Sam


More information about the gromacs.org_gmx-users mailing list