Building root 6-14-04 from source on Windows

I get these errors

-- Configuring incomplete, errors occurred!
See also "D:/buildroot/CMakeFiles/CMakeOutput.log".
See also "D:/buildroot/CMakeFiles/CMakeError.log".

So now open those files and looks what went wrong

CMakeError - Copy.txt (225.6 KB)
CMakeOutput - Copy.txt (83.9 KB)

looks like it couldn’t find a bunch of .h files. attaching the error log.

Well, we’re going nowhere like this. Could you restart from scratch (i.e. delete everything in your build directory) and show me how it fails in the command prompt? (everything printed on the command prompt)

I deleted everything and did all the steps.
The build failed with the following errors.

errror.txt (63.8 KB)

62 Warning(s)
84 Error(s)

Time Elapsed 00:42:46.63

d:\buildroot\include\root\typetraits.hxx(43): fatal error C1001: An internal error has occurred in the compiler.
This is due to a bug in Visual C++ (you can even vote on the bug report here). The only option is to install the version 15.7.6. See the instructions here

retrying with 15.7.6 community edition
I’ll update once I am done

I installed VS 15.7.6 and did all the steps again.

I still get the same errors.errror.txt (56.6 KB)

Well, at least the internal compiler errors are gone. Now your environment is picking some wrong libraries:

  C:\ProgramData\Anaconda3\Library\lib\freetype.lib : warning LNK4272: library machine type 'x64' conflicts with target
 machine type 'x86' [D:\buildroot\graf3d\ftgl\FTGL.vcxproj]
  C:\ProgramData\Anaconda3\Library\lib\z.lib : warning LNK4272: library machine type 'x64' conflicts with target machin
e type 'x86' [D:\buildroot\graf3d\ftgl\FTGL.vcxproj]

So you must add -Dbuiltin_freetype=ON -Dbuiltin_ftgl=ON in the cmake options and try again.

if you see more errors of the same type, please make sure you have the relevant builtin_xxx options enabled (it looks like cmake is finding several incompatible libraries on your system…)

how do I enable that?

As I showed you in my previous posts, or with the cmake-gui

OK, so now you can build…:roll_eyes:

I apologise for asking silly questions as I have no prior succesful experience building root from source.

I added -Dbuiltin_freetype=ON -Dbuiltin_ftgl=ON to the cmake options, and I still get some errors.
Please tell me the options I need to enable / add to the cmake option in order to successfully build root.
errror.txt (57.9 KB)

Try to add -Dbuiltin_zlib in the cmake options and build again

With -Dbuiltin_zlib = ON I still get some errors. The build fails with these errors:
errror.txt (53.1 KB)

I can’t tell what is causing the problem, the error.txt file is only the summary of the errors. You should redirect the output in a text file and look for the origin of the compilation errors…

I think these two are the sources of error. For the first one,I think, it throws an error because of a white space

"D:\buildroot\ALL_BUILD.vcxproj" (default target) (1) ->
"D:\buildroot\math\fftw\FFTW.vcxproj" (default target) (272) ->
(Link target) -> 
  LINK : fatal error LNK1181: cannot open input file 'D:\Software\fftw-3.3.5' [D:\buildroot\math\fftw\FFTW.vcxproj]

"D:\buildroot\ALL_BUILD.vcxproj" (default target) (1) ->
"D:\buildroot\bindings\pyroot\PyROOT.vcxproj" (default target) (314) ->
  python36.lib(python36.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' [D:\buildroot\bindings\pyroot\PyROOT.vcxproj]

I am attaching the entire output of the build as error.txt (1.6 MB)

I think you must specify D:\Software\fftw-3.3.5 as TTTW_INCLUDE_DIR and D:\Software\fftw-3.3.5/libfftw3-3.lib as FFTW_LIBRARY

You must install the 32 bit version of Python

Is there any other way to bypass this python error; I require the 64 bit actually.

Well, you can try to install the 32 bit somewhere, add it in your PATH, and specify which one to use in the Python related variables of CMake, but it might give some conflicts…
Why do you need the 64 bit version?