Installation of ROOT on laptop running Windows 10

Hi,

ROOT Version: 6.26.06
Platform: Windows
Compiler: Not Provided


I installed ROOT OK on a laboratory laptop, but when I tried to install it on my office laptop, following the same procedures, i.e. after first installing CMake, Microsoft Visual C++ 2022, and Python, it seemed to install, but when I try to open a ROOT session I get the message:

input_line_1:1:10: fatal error: ‘new’ file not found
#include
^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && “Should have emitted all decls deferred to emit.”, file C:\build\ws\BUILDTYPE\Release\LABEL\windows64\V\6-26\root\interpreter\llvm\src\tools\clang\lib\CodeGen\ModuleBuilder.cpp, line 147"

Any ideas?

David

Did you start from a x64 Native Tools Command Prompt for VS 2022?

No. I created a folder called ROOT on my C drive, copied the .exe installation file (version Windows Visual Studio 2022 64-bit x64 root_v6.26.06.win64.vc17.exe, 111M) from the ROOT website page ‘Release 6.26/06 - 2022-07-29’, and ran it. That seemed to work on the laboratory laptop.

Then try to start root from a x64 Native Tools Command Prompt for VS 2022. You can also call C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat before starting root from a regular command prompt. Those tow methods will properly set the necessary Visual Studio environment variables.

Maybe the environment variables were set globally

Oh, and welcome to the ROOT Forum BTW!

Thanks for the help. I am getting somewhere, but am not sure where!
I did eventually manage to run the vcvars.bat program when I worked out what the ‘x64 Native Tools Command Prompt for VS 2022’ was, and when I realized I had the Professional version of Visual studio. Evidence of success below:
C:\Users\djt\source\repos>“C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat”


** Visual Studio 2022 Developer Command Prompt v17.3.5
** Copyright (c) 2022 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: ‘x64’

I then tried opening ROOT using:
C:\Users\djt\source\repos>“C:\ROOT_v6.26.06\bin\root.exe”
and lo and behold it opened ROOT, although double clicking on ‘root.exe’ still gives me the original error message and oddest of all, entering:
C:\Users\djt\source\repos>“C:\ROOT_v6.26.06\bin\root.exe” a second time gave me a big blue box saying ‘This app can’t run on your PC’
I will continue playing, but I think it is, as you suggested, something to do with how my office laptop is set up. NPL are very cyber security conscious with office laptops.

Before starting root, first call C:\ROOT_v6.26.06\bin\thisroot.bat from anywhere, you can then simply start root by typing root. For example:

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

C:\Users\bellenot>build\release\bin\thisroot.bat

C:\Users\bellenot>root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.27/01                        https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win32 on Oct 01 2022, 20:39:10                         |
  | From heads/master@v6-25-02-2358-gf791131570                      |
  | With MSVC 19.29.30143.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0]

Thanks, and apologies for the delayed reply I am in an on-line meeting about neutron diagnostics at ITER. Your latest suggestion did not cure the problem. I still get a message to say that “This app can’t run on your PC”. My next step will be to uninstall everything and start again following the route you suggested in your emails. It is very weird that ROOT opened up once, but then would not.

The message “This app can’t run on your PC” seems to have disappeared for now, but things are not right.
Using a route via the Developer Command Prompt in Visual Studio 2022 I can get ROOT to work, see below:


** Visual Studio 2022 Developer Command Prompt v17.3.5
** Copyright (c) 2022 Microsoft Corporation


C:\Users\djt\source\repos>C:\Root_v6.26.06\bin\root

| Welcome to ROOT 6.26/06 https://root.cern |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for win64 on Jul 28 2022, 18:08:51 |
| From tags/v6-26-06@v6-26-06 |
| With MSVC 19.32.31332.0 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’

root [0] .q

but trying to run it any other way, by double clicking the .exe file or the desktop icon, or using the normal Windows Command Prompt gives the same original message:
C:\Users\djt>C:\Root_v6.26.06\bin\root
input_line_1:1:10: fatal error: ‘new’ file not found
#include
^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && “Should have emitted all decls deferred to emit.”, file C:\build\ws\BUILDTYPE\Release\LABEL\windows64\V\6-26\root\interpreter\llvm\src\tools\clang\lib\CodeGen\ModuleBuilder.cpp, line 147.
Does anyone have any idea what the ‘new’ file is? The route via Visual Studio seems unnecessarily longwinded.

This is normal, as I said, you first need to call C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat and C:\Root_v6.26.06\bin\thisroot.bat, or ad ROOTSYS as C:\Root_v6.26.06\ in your environment variables and add %ROOTSYS%\bin in your PATH, plus all the variables set by C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat

Thanks for your help, and your patience. It has been a long time since I did anything via the Command Prompt or adjusted Environment Labels.
On my office laptop I added
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\ and C:\Root_v6.26.06\bin
to the path and now Root will run by just tying in vcvars64.bat and then Root in the Command Prompt. That is reasonably simple so I will live with that for now. I do not have to type in thisroot.bat.
Because Root runs just by typing Root in the Command Prompt on the lab laptop I had assumed that when you said I needed to “call C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat and `C:\Root_v6.26.06\bin\thisroot.bat” that this only needed to be done once. The fact that I don’t need to call thisroot.bat on my office PC, and do nothing other than type Root on the lab laptop, is confusing and just illustrates the fact that I don’t understand these things properly. Now on to trying to use Root!

1 Like