ROOT installation Windows problems

Hello, I’d to format the computer, then I’m installing ROOT again…
I downloade the sources and I followed this topic Run ROOT 6.19.02 on Windows 10 - #14 by bellenot

Here the last lines of building

ROOT installation.txt (617.1 KB)

but, when I try to run ROOT

C:\root-6.22.08-build>cd C:\root-6.22.08-build\macrorun
C:\root-6.22.08-build\macrorun>C:\root-6.22.08-build\bin\thisroot.bat

it says ROOT it can’t open it

C:\root-6.22.08-build\macrorun>root -l
"root" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.

@bellenot do you have any idea?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Well, yes, as you can see the build failed, so it cannot work. You have the choice of downloading a pre-built binary or to build from source a more recent version (e.g. master), since apparently you use a recent version of Visual Studio (BTW, can you specify which version exactly?)

Hello @bellenot I’m installing ROOT 6.22.08 Release 62208 - ROOT …isn’t it the last one?

Regarding of visual studio


**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.2
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************

it’s 16.9.2

P.s Does the prebuilt binary works? I remember last year it didn’t work using last VS

Yes, it’s the latest release, but if you build from source you can build the master, or the coming soon 6.24.00, they both support the latest version of VS 2019

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.2
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

C:\Users\sftnight>Downloads\root\bin\thisroot.bat

C:\Users\sftnight>root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/08                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win32 on Mar 10 2021, 14:20:04                         |
  | From tags/v6-22-08@v6-22-08                                      |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0]

ok thank you! I will try to install the prebuild!

Just 3 questions

  1. what is the difference between https://root.cern/download/root_v6.22.08.win32.vc16.debug.exe and https://root.cern/download/root_v6.22.08.win32.vc16.exe and which one should I install? Maybe does the debug version allow alic?
  2. Where do I find the master ? I can’t see it
  3. When will the 6.24.00 be released?
  1. One was built in debug mode, meaning it contains debug symbols if you need to debug your application, but it is slower (not optimized)
  2. master is only available from source (well, not really, but since the binaries are built with an older version of Visual Studio, it doesn’t help)
  3. Soon, but again, it is built with an old version of Visual Studio.

Thank you @bellenot I installaed
https://root.cern/download/root_v6.22.08.win32.vc16.exe and I tried a macro…it looks like working!

Good news! And you’re welcome!

Sorry @bellenot one more question please…I was installing HepMC using ROOTIo HepMC / HepMC3

log.txt (14.4 KB)

as you can read, there are some errors related to ROOT (then the HepMC install directory is empty at the end of the process)…do you think they are ROOT bugs, or due to VS version? and do you know if it’s possible to fix it?
Thank you

The error comes from ROOT, but i’s not a bug, it’s an incompatibility between LLVM/Clang and Visual C++, fixed in master and 6.24. I think the only way to fix this is to build ROOT (e.g. master) yourself with your version of Visual Studio

Thank you @bellenot… but sincerly, I didn’t understand where to download and how to build the master…

you said that master is just from the source, but the only source that I found is this one https://root.cern/download/root_v6.22.08.source.tar.gz (the one that gave me the error in the morning)…maybe do I have to build in different way?

Thank you

Look at Building ROOT from source - ROOT. For example, if you don’t specify a branch, you’ll get the master in the master directory:

git clone https://github.com/root-project/root.git master

Then proceed like with any source distribution

Thank you @bellenot I built Root master, but when i compile HepMC it still doesn’t look like to working fine using ROOTIO…

logroot.txt (10.8 KB)

Now I’m trying setting ROOTIO=OFF (actually I need HepMC for a Geant4 simulation…so I hope I don’t need ROOTIO)

Maybe do you know what ROOTIO=ON add to HepMC?
Thank you

I don’t see any error in the logroot.txt file, only warnings. What doesn’t work?

Hello @bellenot…you are right, because I did a mistake to upload the log file…I upladed the file related to the HepMC building instead of the one releated to the installation (moreover, I deleted the log file, so I don’t have it anymore to show you)
…anyway, when I install HepMC using the ROOTIO option, it dowsn’t install anything and the HepMC-install directory is empty. I tried to install without the ROOTIO option and it looks like that it could install it, because there are directories in the HepMC-install directory

Unfortunately, running the Geant4 simulation, it looks like that CMAKE can’t find the HepMC

I know that it’s related to Geant4, but given that the error is from CMAKE, maybe do you know hot to set the HepMC-install path in CMAKE?

Yes, use CMake-GUI

Thank you @bellenot but, how should I use Cmake-gui?

Consider that this is the Cmakelist of the Geant4 simulation requiring HepMC
CMakeLists.txt (3.5 KB)

and this is the path of HepMC installation

C:\Program Files\HepMC3-install

Type cmake-gui . in the build directory, then simply fill the missing parts. It’s interactive, so just try…

I did it

but CMake can’t still find HepMC…

Look carefully, copy and paste exactly: cmake-gui .