Building root on windows 10 again


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.22.02
_Platform: Windows 10
_Compiler: Visual Studio Community 2019
16.7.6


Hello, ROOT community,

I tried to build rood after reading



and was unsuccessful.

I started x86 Native Tools Command Prompt for VS 2019, created and changed to
D:\root-6.22.02-build

cmake -G "Visual Studio 16 2019" -A Win32 -Thost=x64 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_STANDARD=14 -Droofit=ON -Dfftw3=ON -DFFTW_INCLUDE_DIR=D:\fftw -DFFTW_LIBRARY=D:\fftw\libfftw3-3.lib D:\root-6.22.02-source > ..\cmake-output-1-22.02.txt
The output is herecmake-output-1-22.02.txt (10.1 KB)
Everything is configured and generated well.

Then, I do
cmake --build . --config Release -- /maxcpucount > ..\cmake-build-1-22.02.txt
cmake-build-1-22.02.txt (1.4 MB)
There are 6 errors:

         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error G08EB1F86: expected member name or ';' after declaration specifiers [D:\root-6.22.02-build\core\G__Core.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error GC66A3811: expected ')' [D:\root-6.22.02-build\core\G__Core.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error G08EB1F86: expected member name or ';' after declaration specifiers [D:\root-6.22.02-build\core\G__Core.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error GC66A3811: expected ')' [D:\root-6.22.02-build\core\G__Core.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xutility(63,31): error G959205E0: '_To' does not refer to a value [D:\root-6.22.02-build\core\G__Core.vcxproj]
         CUSTOMBUILD : error : Error loading the default header files. [D:\root-6.22.02-build\core\G__Core.vcxproj]

I tried to convert
D:\root-6.22.02-source\graf2d\win32gdk\gdk\src\glib\gunichartables.h to UTF 8 with BOM
configure and build again, and I have got the same 6 errors.
Here are the output of configure and build
cmake-output-1-22.02.txt (10.1 KB) cmake-build-2-22.02.txt (1.4 MB)

Could you help me solve the problem?
Anton

Hi,

Unfortunately ROOT v6.22 cannot be built with the latest version of Visual Studio. Please try the master, or wait until the v6.22 gets fixed (if it gets fixed…)
You can also try to add those lines in interpreter/cling/lib/Interpreter/CIFactory.cpp, at line 766, as shown in this diff:

diff --git a/interpreter/cling/lib/Interpreter/CIFactory.cpp b/interpreter/cling/lib/Interpreter/CIFactory.cppindex 3e623a8d99..8d08a1bbda 100644
--- a/interpreter/cling/lib/Interpreter/CIFactory.cpp
+++ b/interpreter/cling/lib/Interpreter/CIFactory.cpp
@@ -763,6 +763,12 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
     PPOpts.addMacroDef("__CLING__GNUC_MINOR__=" ClingStringify(__GNUC_MINOR__));
 #elif defined(_MSC_VER)
     PPOpts.addMacroDef("__CLING__MSVC__=" ClingStringify(_MSC_VER));
+#if (_MSC_VER >= 1926)
+    // FIXME: Silly workaround for cling not being able to parse the STL
+    //        headers anymore after the update of Visual Studio v16.7.0
+    //        To be checked/removed after the upgrade of LLVM & Clang
+    PPOpts.addMacroDef("__CUDACC__");
+#endif
 #endif

 // https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

Cheers, Bertrand.

Thank you Bertrand,

I tried adding the lines you proposed, now there are only two errors

         CUSTOMBUILD : error : D:/root-6.22.02-build/bin/rootcling.exe: compilation failure (D:/root-6.22.02-build/bin/libROOTVecOps7571783666_dictUmbrella.h) [D:\root-6.22.02-build\math\vecops\G__ROOTVecOps.vcxproj]
'''
[cmake-build-4-22.02.txt|attachment](upload://vklIWD51wbPMqdtMjFfCjliffBg.txt) (2.0 MB) 
Anton

Add #include <tuple> in math\vecops\inc\ROOT\RVec.hxx
BTW, FYI, those errors should be fixed in the next versions of ROOT

Would it be possible to ass all this information on https://root.cern/install/build_from_source/ ? Currently, we could think that it is possible to compile ROOT on Windows 10 when not.

I think it would be good this page be updated with the latest information concerning Windows 10 (32-bit compilation only, which build options work or not, etc).

Well, this was 6.22 only and will most probably be fixed today… I.e. master always compiles with the latest version of Visual Studio

Will do.

A github issue has just been created

1 Like

Thank you Bertrand, It compiled without errors. I will test it tomorrow.
By the way, how to get the master?
I tried the prebuilt exe, ACLIC does not work and I need FFTW…

With git, from github. For example: git clone https://github.com/root-project/root.git root_src

Bertrand,
When I tried to build the master I got an error

CUSTOMBUILD : CMake error : Cannot restore timestamp D:/root-build/interpreter/llvm/src/tools/clang/include/clang/AST/CMakeFiles/generate.stamp [D:\root-build\interpreter\llvm\src\tools\clang\include\clang\AST\ClangAttrDump.vcxproj]

But the tar source was built without errors and ACLIC, FFT work.

However, when I ran the tutorials through demos.C after quitting root there is an errors message

D:\Users\avbog\Work\RootTutorials>root -l D:\root-6.22.02-build\tutorials\demos.C
root [0]
Processing D:\root-6.22.02-build\tutorials\demos.C...
root [1] .q
Assertion failed: content[posOpenCurly] == '{' && "No curly at claimed position of opening curly!", file D:\root-6.22.02-source\interpreter\cling\lib\MetaProcessor\MetaProcessor.cpp, line 431```

Never seen this error… Try to delete the file and re-build

Good! Then you can use this one I suppose

Yes, this Assertion failed: content[posOpenCurly] message is a known issue, but we couldn’t find what the problem is so far

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