Issues buiidng Root 6.28.04 with FFTW on Windows 11 - VS 17.5.3

Dear Rooters,

I am trying to built a version of root that has the FFTW library in the built under windows 11 using VS 17.5.3 and Windows SDK 10.0.22621.0. I tried both the x64 and x86 variations using the relevant cmake options at the corresponding Visual Studio Native Tools Command Prompt. The cmake commandfor the built is the following:

cmake -G “Visual Studio 17” -A x64-Thost=x64 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYTHON3_EXECUTABLE=“C:/Python311/python.exe” -DCMAKE_INSTALL_PREFIX=“C:/Root/root6.28.04FFTW” -Dmysql=OFF -Dgnuinstall=OFF -Dfftw3=ON -DFFTW_INCLUDE_DIR=C:/Root/FFTW_3.3.5 -DFFTW_LIBRARY=C:/Root/FFTW_3.3.5/libs/libfftw3-3.lib -B=C:/Root/root6.28.04FFTW_built C:/Root/root_6.28.04_source

and the corresponding built command: cmake --build . -j 2 --config Release --target install

I am getting several hundreds of errors all related tot he following sdk header files:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\wtypes.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\wtypesbase.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\objidlbase.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\objidl.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\oaidl.h

Specifically several types are reported as not defined (eg data). The entire issue seems to be a result of either of cyclical includes or some-type of incompatibility with the specific sdk. Any suggestions on a version combination that could work?

Thanks for the help!!! :slight_smile:

ROOT Version: 6.28.04
Platform: Windows 11
Compiler: VS 17.5.3

ROOT builds just fine with FFWT 3.3.5, both Win32 and x64 with VS 2022 (v17.7.5). Can you attach the complete errors you get? Are you sure to use the proper architecture (Win32 vs x64)?

Here my build log with FFTW 3.3.5 on x64:

InitializeBuildStatus:
  Creating "FFTW.dir\RelWithDebInfo\FFTW.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
  Touching "FFTW.dir\RelWithDebInfo\FFTW.tlog\unsuccessfulbuild".
CustomBuild:
  Building Custom Rule C:/root-dev/git/llvm16/math/fftw/CMakeLists.txt
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\CL.exe /c /I"C:\root-dev\git\llvm16\math\fftw\inc" /I"C:\root-dev\git\llvm16\core\winnt\inc" /I"C:\root-dev\git\llvm16\builtins\zstd" /I"C:\root-dev\git\llvm16\core\zstd\inc" /I"C:\root-dev\git\llvm16\core\lz4\inc" /I"C:\root-dev\build\x64\llvm16\LZMA\src\LZMA\include" /I"C:\root-dev\git\llvm16\core\lzma\inc" /I"C:\root-dev\git\llvm16\core\zip\inc" /I"C:\root-dev\git\llvm16\core\thread\inc" /I"C:\root-dev\git\llvm16\core\textinput\src" /I"C:\root-dev\git\llvm16\core\textinput\inc" /I"C:\root-dev\git\llvm16\core\rint\inc" /I"C:\root-dev\git\llvm16\core\meta\inc" /I"C:\root-dev\git\llvm16\core\gui\inc" /I"C:\root-dev\git\llvm16\core\foundation\res" /I"C:\root-dev\git\llvm16\core\foundation\v7\inc" /I"C:\root-dev\git\llvm16\core\foundation\inc" /I"C:\root-dev\git\llvm16\core\cont\inc" /I"C:\root-dev\git\llvm16\core\clingutils\res" /I"C:\root-dev\git\llvm16\core\clingutils\inc" /I"C:\root-dev\git\llvm16\core\clib\inc" /I"C:\root-dev\git\llvm16\core\base\v7\inc" /I"C:\root-dev\git\llvm16\core\base\inc" /I"C:\root-dev\build\x64\llvm16\ginclude" /I"C:\root-dev\git\llvm16\math\mathcore\v7\inc" /I"C:\root-dev\git\llvm16\math\mathcore\inc" /I"C:\root-dev\git\llvm16\core\imt\inc" /IC:\libs\x64\fftw\3.3.5 /I"C:\root-dev\git\llvm16\build\win" /Z7 /nologo /W3 /WX- /diagnostics:column /O2 /Ob1 /D _WINDLL /D _MBCS /D _XKEYCHECK_H /D NOMINMAX /D _CRT_SECURE_NO_WARNINGS /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /D _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING /D "CMAKE_INTDIR=\"RelWithDebInfo\"" /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"FFTW.dir\RelWithDebInfo\\" /Fd"FFTW.dir\RelWithDebInfo\vc143.pdb" /external:W3 /Gd /TP /wd4141 /wd4291 /wd4244 /wd4049 /wd4146 /wd4250 /wd4624 /wd4267 /FIw32pragma.h /FIsehmap.h /errorReport:queue  -Zc:__cplusplus -EHar "C:\root-dev\git\llvm16\math\fftw\src\TFFTComplex.cxx" "C:\root-dev\git\llvm16\math\fftw\src\TFFTComplexReal.cxx" "C:\root-dev\git\llvm16\math\fftw\src\TFFTReal.cxx" "C:\root-dev\git\llvm16\math\fftw\src\TFFTRealComplex.cxx"
  TFFTComplex.cxx
  TFFTComplexReal.cxx
  TFFTReal.cxx
  TFFTRealComplex.cxx
  Generating Code...
PreLinkEvent:
  Auto build dll exports
  setlocal
  cd C:\root-dev\build\x64\llvm16\math\fftw
  if %errorlevel% neq 0 goto :cmEnd
  C:
  if %errorlevel% neq 0 goto :cmEnd
  "C:\Program Files\CMake\bin\cmake.exe" -E __create_def C:/root-dev/build/x64/llvm16/math/fftw/FFTW.dir/RelWithDebInfo/exports.def C:/root-dev/build/x64/llvm16/math/fftw/FFTW.dir/RelWithDebInfo//objects.txt
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  :VCEnd
Link:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\root-dev\build\x64\llvm16\bin\libFFTW.dll" /INCREMENTAL /ILK:"FFTW.dir\RelWithDebInfo\libFFTW.ilk" /NOLOGO ..\..\lib\libMathCore.lib "C:\libs\x64\fftw\3.3.5\fftw3-3.lib" ..\..\lib\libImt.lib ..\..\lib\libCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /DEF:"C:/root-dev/build/x64/llvm16/math/fftw/FFTW.dir/RelWithDebInfo/exports.def" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/root-dev/build/x64/llvm16/bin/libFFTW.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/root-dev/build/x64/llvm16/lib/libFFTW.lib" /MACHINE:X64  /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no /DLL FFTW.dir\RelWithDebInfo\TFFTComplex.obj
  FFTW.dir\RelWithDebInfo\TFFTComplexReal.obj
  FFTW.dir\RelWithDebInfo\TFFTReal.obj
  FFTW.dir\RelWithDebInfo\TFFTRealComplex.obj
  "C:\root-dev\build\x64\llvm16\math\fftw\G__FFTW.dir\RelWithDebInfo\G__FFTW.obj"
     Creating library C:/root-dev/build/x64/llvm16/lib/libFFTW.lib and object C:/root-dev/build/x64/llvm16/lib/libFFTW.exp
  FFTW.vcxproj -> C:\root-dev\build\x64\llvm16\bin\libFFTW.dll
FinalizeBuildStatus:
  Deleting file "FFTW.dir\RelWithDebInfo\FFTW.tlog\unsuccessfulbuild".
  Touching "FFTW.dir\RelWithDebInfo\FFTW.tlog\FFTW.lastbuildstate".
Done Building Project "C:\root-dev\build\x64\llvm16\math\fftw\FFTW.vcxproj" (default targets).

Thanks for the quick reply. I directed the output of a built to a text file and I am attaching it here.
Install.txt (962.9 KB)

That’s weird… Do you build from a x64 Native Command Prompt for VS 2022? Can you paste the result of echo %VSCMD_ARG_TGT_ARCH%? And you have the complete Desktop development with C++ workload installed, right?

P.S. And BTW, these errors are unrelated to FFTW…

Yes it is a native command prompt but since all it does actually is to call vcvarsall.bat with the appropriate arguments, I set the SDK to 10.0.22000.0 and it now compiles… It seems to be an issue with SDK 10.0.22621.0

I also use 10.0.22621.0

I also downgraded my version of visual studio to 17.4.4 from 17.5.3… In retrospect, I probably could have upgraded to17.7.5 and it might have worked there…
Thanks for the help, I will post again once the compilation is done if there is an issue…

Well, I think I have built ROOT with basically all version of Visual Studio and all version of the Windows SDK… Anyway, if you still have issues, don’t forget to answer my questions as well

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.