- Installing CERN ROOT under Windows 10 with Subsystem for Linux
- Install the Windows Subsystem for Linux
- Compile ROOT Locally
- Pre-compiled ROOT
- 30 Appendix A: Install and Build ROOT
- 30.1 License
- 30.2 Installing ROOT
- 30.3 Choosing a Version
- 30.4 Installing Precompiled Binaries
- 30.5 Installing the Source
- 30.5.1 Installing and Building the Source from a Compressed File
- 30.5.1.1 Target directory
- 30.5.1.2 Makefile targets
- 30.5.2 More Build Options
- 30.5.2.1 Installing the Source from Subversion
- 30.5.2.2 Subversion for Windows
- 30.5.2.3 Staying up-to-date
- 30.6 File system.rootrc
- 30.6.1 TCanvas Specific Settings
- 30.6.2 THtml Specific Settings
- 30.6.3 GUI Specific Settings
- 30.6.4 TBrowser Settings
- 30.6.5 TRint Specific Settings
- 30.6.6 ACLiC Specific Settings
- 30.6.7 PROOF Related Variables
- 30.6.7.1 Settings Related to Authentication for rootd and proofd
- 30.6.7.2 Server Authentication in TServerSocket
Installing CERN ROOT under Windows 10 with Subsystem for Linux
Oct 27, 2016 · 4 min read
I am not a coding expert by any means, just a physicist that needs to code some stuff sometimes. Hopefully this helps someone else.
I need to use Windows and GNU/Linux for my work and haven’t been able to pic k just one so I am normally running a virtual machine with Ubuntu on my Windows10 host. I’ve avoided a dual boot system since I don’t like partitioning my hard-drive when I don’t have to. Plus, I can share folders across the systems as well as the clipboard, and save my virtual machine state and reload it. However, it’s currently taking up 60 GB of my hard drive, mostly to run CERN ROOT for data analysis and a few other useful Linux tools, and consumes a large fraction of my RAM and CPU resources, such that I can’t run some other large pieces of software in parallel. I’ve not actually tested if Linux for Windows (Beta) is faster or lighter yet.
Update: The speeds seem to be comparable.
Update 10.08.2018: It seems some people have actually read this, and added helpful information in the comments. Thanks, everyone! I’ve added some notes inline as well. I am repeating the installation on a new laptop and will add updates to mirror the changes I found. Current Windows version is 1803.
I also noticed that there is now a preview version compiled under Win32, but this failed to run on my new pc. (preview Windows Visual Studio 2017 (dbg) root_v6.14.02.win32.vc15.debug.exe 167MB)
So let’s try compiling on the linux subsystem.
Install the Windows Subsystem for Linux
You will require Update for Windows 10 Version 1607 or newer for x64-based Systems.
- To get Linux on Windows10 running: under Settings → Updates & Security → For Developers → enable Developer Mode
- open Control Panel → Programs → Turn Windows features on or off → enable Windows Subsystem for Linux .
- Windows will install some files and restart.
- You will need to install and run an X-windows server on Windows: Xming official site: http://www.straightrunning.com/XmingNotes/ or vcXsrv: https://sourceforge.net/projects/vcxsrv/ . Either will run in the background in your taskbar. Be sure to add the additional fonts: https://sourceforge.net/projects/xming/files/Xming-fonts/
- To run Linux for Windows, from the search window, search for and run “bash.exe”. This will open a terminal window (bash shell) and install Ubuntu for Windows from the Windows Store. Enter a user account name and password when prompted. It shows up in the Start menu later “Bash on Ubuntu on Windows” later. I pinned it to the start menu for quick access.
Update 10.08.2018: It seems you can now install many Linux flavours that you like from the Microsoft Store first without executing bash.exe. I chose Ubuntu 18.04 this time for continuity. - Update your distribution. It’s probably a little out of date. It also helped with missing packages.
7. Everything works like Ubuntu 14.04/18.04 now. Execute the following to append the correct display to the .bashrc file. It will allow you to open programs with GUIs. Hint: Ctrl-C to copy and right mouse button to paste.
Skip to to helpful hints at the bottom for additional tips.
Compile ROOT Locally
8. To begin the install of CERN ROOT, first install the basic prerequisites for Ubuntu as shown in https://root.cern.ch/build-prerequisites . In the additional packages, libcfitsio-dev doesn’t seem to work, so I’ve not included it. Execute the following:
to build ROOT 5.34.36 under Ubuntu 14.04
to build ROOT 6.14.02 under Ubuntu 18.04
9. The previous step will take awhile to finish building ROOT. Once it finishes, execute the following:
Pre-compiled ROOT
A precompiled release for Ubuntu 14.04/18.04 works. You should make sure you have the prerequisites listed above installed though. Otherwise you will see some errors.
7a. Just unzip the file and source root/bin/thisroot.sh.
You should now see the ROOT splash screen and the CINT command line.
30 Appendix A: Install and Build ROOT
30.1 License
ROOT is made available under the LGPL v2.1 license. For full details see the file LICENSE in the ROOT distribution.
30.2 Installing ROOT
To install ROOT you will need to go to the ROOT website at: http://root.cern.ch/drupal/content/downloading-root
You have a choice to download the binaries or the source. The source is quicker to transfer since it is only 31 MB, but you will need to compile and link it. The binaries range from 50 MB to 100 MB depending on the target platform.
30.3 Choosing a Version
The ROOT developers follow the principle of “release early and release often”, however a very large portion of a user base requires a stable product therefore generally three versions of the system is available for download — new, old and pro:
The new version evolves quickly, with weekly or bi-weekly releases. Use this to get access to the latest and greatest, but it may not be stable. By trying out the new version you can help us converge quickly to a stable version that can then become the new pro version. If you are a new user we would advice you to try the new version.
The pro (production) version is a version we feel comfortable with to exposing to a large audience for serious work. The change rate of this version is much lower than for the new version, it is about 3 to 6 months.
The old version is the previous pro version that people might need for some time before switching the new pro version. The old change rate is the same as for pro.
30.4 Installing Precompiled Binaries
The binaries are available for downloading from http://root.cern.ch/drupal/content/downloading-root. Once downloaded you need to unzip and de-tar the file. For example, if you have downloaded ROOT v5.30 for Linux-SLC5:
This will create the directory root. Before getting started read the file README/README. Also, read the Introduction chapter for an explanation of the directory structure.
30.5 Installing the Source
You have a choice to download a compressed (tar ball) file containing the source, or you can use the Subversion (svn) source code change control system and check out the most recent source. The compressed file is a one time only choice; every time you would like to upgrade you will need to download the entire new version. Choosing the CVS option will allow you to get changes as they are submitted by the developers and you can stay up to date.
30.5.1 Installing and Building the Source from a Compressed File
To install the ROOT source you can download the tar file containing all the source files from the ROOT website. The first thing you should do is to get the latest version as a tar file. Unpack the source tar file, this creates directory вЂroot’:
Type the build commands:
Add bin/ to PATH and lib/ to LD_LIBRARY_PATH . For the sh shell family do:
and for the csh shell family do:
Try running root:
It is also possible to setup and build ROOT in a fixed location. Please check README/INSTALL for more a detailed description of this procedure.
30.5.1.1 Target directory
By default, ROOT will be built in the $ROOTSYS directory. In that case the whole system (binaries, sources, tutorials, etc.) will be located under the $ROOTSYS directory.
30.5.1.2 Makefile targets
The Makefile is documented in details in the README/BUILDSYSTEM file. It explains the build options and targets.
30.5.2 More Build Options
To build the library providing thread support you need to define either the environment variable †THREAD=-lpthread’ or the configure flag ‗with-thread=-lpthread ’ (it is the default for the linuxegcs architecture). [Note: this is only tested on Linux for the time being.] To build the library providing CERN RFIO (remote I/O) support you need to define either the environment variable †RFIO=
/libshift.a ’ or the configure flag ‗with-rfio=
/libshift.a’ . For pre-built version of libshift.a see ftp://root.cern.ch/root/shift/
To build the PAW and Geant3 conversion programs h2root and g2root you need to define either the environment variable вЂCERNLIB= вЂor the configure flag ‗with-cern-libdir= ’.
To build the MySQL interface library you need to install MySQL first. Visit http://www.mysql.com/ for the latest versions.
To build the strong authentication module used by rootd , you first have to install the SRP (Secure Remote Password) system. Visit http://srp.stanford.edu
To use the library you have to define either the environment variable †SRP= ’ or the configure flag ‗with-srp= ‘.
To build the event generator interfaces for Pythia and Pythia6, you first have to get the Pythia libraries available from ftp: ftp://root.cern.ch/root/pythia6.tar.gz.
To use the libraries you have to define either †PYTHIA=
’ or the configure flag ‗with-pythia=
’. The same applies for Pythia6.
30.5.2.1 Installing the Source from Subversion
This paragraph describes how to checkout and build ROOT from Subversion for Unix systems. For description of a checkout for other platforms, please see ROOT installation web page: http://root.cern.ch/drupal/content/installing-root-source.
If you are a part of collaboration, you may need to use setup procedures specific to the particular development environment prior to running (g)make . For more install instructions and options, see the file README/INSTALL.
30.5.2.2 Subversion for Windows
Although there exists a native version of Subversion for Windows, we only support the build process under the Cygwin environment. You must have svn version 1.6 or newer. The checkout and build procedure is similar to that for UNIX. For detailed install instructions, see the file REAMDE/INSTALL.
30.5.2.3 Staying up-to-date
To keep your local ROOT source up-to-date with the Subversion repository you should regularly run the command:
30.6 File system.rootrc
ROOT Environment settings are handled via the class TEnv . gEnv->Print() shows which values are active. Any settings can be obtained by TEnv::GetValue methods that return an integer, double or character value for a named resource. If the resource is not found, the default value (given as the second parameter) is returned.
Via the method TEnv::SetValue allows you can set the value of a resource or create a new resource:
Path used by dynamic loader to find shared libraries and macros. Paths are different for Unix and Windows. The example shows the defaults for all ROOT applications for either Unix or Windows:
Path where to look for TrueType fonts:
Use Net* API functions:
Use thread library (if exists).
Select the compression algorithm (0=old zlib, 1=new zlib). Setting this to `0’ may be a security vulnerability.
Show where item is found in the specified path:
Activate memory statistics ( size and cnt are used to trap allocation of blocks of a certain size after cnt attempts).
Activate memory leak checker (use in conjunction with $ROOTSYS/bin/memprobe ). Currently only works on Linux with gcc.
Global debug mode. When >0 turns on progressively more details debugging.
Settings for X11 behaviour.
Default editor in use.
Default 3d Viewer. By default 3-D views are shown in the pad, if the next line is activated, the default viewer will be OpenGL.
Default Fitter (current choices are Minuit , Minuit2 , Fumili and Fumili2 ).
Specify list of file endings which TTabCom (TAB completion) should ignore.
30.6.1 TCanvas Specific Settings
Opaque move and resize show full pad during the operation instead of only the outline. Especially for resize you will need serious CPU power. UseScreenFactor=true means to size canvas according to size of screen, so a canvas still looks good on a low resolution laptop screen without having to change canvas size in macros.
Hight color 2 is the red one.
Next three settings are related to different user interface parts of canvas window. If they are set to true, the corresponding event status bar, tool bar, graphics editor to beactivated by default.
AutoExec allows TExec objects to be executed on mouse and key events.
Canvas print directory is set to the current one by default:
Default histogram binnings used by TTree::Draw() method.
Default statistics names used for parameters in TPaveStats :
30.6.2 THtml Specific Settings
See the reference guide documentation of THtml class at http://root.cern.ch/root/htmldoc/THtml.html for more details.
XHTML content charset (see http://www.w3.org/TR/2002/REC-xhtml1-20020801, default: ISO-8859-1) is set by:
Stem of a search engine for the documentation, where %s is replaced by the term entered in the search text box (example: http://www.google.com/search?q=%s+site%3Aroot.cern.ch%2Froot%2Fhtml , default is «» )
Link to the site’s search engine (default: «» , example: http://root.cern.ch/root/Search.phtml )
String to prepend to TClass::GetImplFileName() names containing directories when looking for source files (default: «» , e xample: ../root )
Link stem to ViewCVS entry for classes, where a class name is assumed to match a file name (default: «» , example: http://root.cern.ch/viewcvs ).
Stem of the CERN XWho system (default: http://consult.cern.ch/xwho/people? )
If set to Doc++, allow method documentation in front of method even for methods in the source file (default: «» )
Search path for the source and header files with their default settings:
URL stem for ROOT documentation pages (default is «» ).
Filesystem output directory for generated web pages (default: htmldoc) .
Address of the package’s home page (default: http://root.cern.ch):
Location of user defined header and footer files, see http://root.cern.ch/root/html/THtml#conf:header (defaults are «» , example: ../header.txt , ../footer.txt ):
Tag for detecting class description comments (default value is set below).
Tag for detecting “Author” comment (default value is set below).
Tag for detecting “last updated” comment. THtml uses the current date if this tag is not found in a class source file (default value is set below).
Tag for detecting “Copyright” comment (default value is set below).
30.6.3 GUI Specific Settings
Set the “ native ” ROOT GUI interface to be used in a ROOT session. If set to “ qt ”, the “ native ” GUI interface is replaced with one based on Qt by the regular ROOT plug-in mechanism.
GUI default fonts in use:
Regular background and foreground colors in use:
Selection background and foreground colors in use:
Document background and foreground colors in use:
Tooltip background and foreground colors in use:
Path where all GUI icons in use can be found:
Mime type file setting:
If $(HOME)/.root.mimes does not exists, defaults to this:
30.6.4 TBrowser Settings
Current icon style selection — can be either small , big , list , details :
Current sorting rule applied on the browser objects — can be name , type , size , date :
Number of items in a group view:
Show or not hidden items:
Create a thumbnail view after executing the macro (default is yes ).
30.6.5 TRint Specific Settings
Rint (interactive ROOT executable) specific alias, logon and logoff macros.
Record ROOT session commands in a given history file (default is $(HOME)/.root_hist ). If set to “ — ”, it turn off the command recording.
Next two lines set the history file size handling. Once HistSize is reached, the last HistSave entries are removed. If HistSize is set to 0, it turns off command recording. Both values can be overridden by environment variable ROOT_HIST=size[:save] , where the “ :save ” part is optional.
30.6.6 ACLiC Specific Settings
ACLiC.Linkdef specifies the suffix that will be added to the script name to try to locate a custom linkdef file when generating the dictionary.
The top directory for storing the libraries produced by ACLiC is set by:
The additional include directives for ACLiC compilations are set by:
30.6.7 PROOF Related Variables
PROOF debug options.
PROOF GDB hooks allows a debugger to be attached early in the startup phase of proofserv: 0 — don’t wait; 1 — master proofserv enters wait loop; 2 — slave proofserv enters wait loop; 3 — any proofserv enters wait loop
On the master to enable the parallel startup of workers using threads set next to “ yes ” (default is “ no ”):
Certificate and key
30.6.7.1 Settings Related to Authentication for rootd and proofd
Default authentication method for rootd and proofd . These are supported for backward compatibility but have a very low priority. System defaults are generated by configure as a list in system.rootauthrc in $ROOTSYS/etc/ or /etc/root ; the file $HOME/.rootauthrc can be used to override the system defaults.
The value meaning: 0=UsrPwd , 1=SRP , 2=Krb5 , 3=Globus , 4=SSH , 5=UidGid .
Connection is shutdown at timeout expiration. Timeout is in seconds. Negotiation cannot be attempted at low level (i.e.В inside TAuthenticate::Authenticate()) because of synchronization problems with the server. At higher level, TAuthenticate::HasTimedOut() gives information about timeout: 0 = no timeout; 1 = timeout, no methods left; 2 = timeout, still methods to be tried. Caller should decide about an additional attempt. Timeout is disabled by default ( TAuthenticate::SetTimeOut(to_value) .
Password dialog box is set to 0 if you do not want a dialog box to be popped-up when a password is requested. Default setting is 1.
Set the following to 1 if you want full SRP authentication in PROOF (Client-to-Master and Master-to-Slave).
Set next to 1 to use SSH authentication in PROOF servers (Master-to-Slave or Slaves-to-DataServers). This is switched off by default because credentials forwarding for SSH is not controlled by the system; however the user may have other ways to guarantee it, so it may want to switch it on.
Default login name (if not defined it is taken from $(HOME) ).
To be prompted for login information.
To reuse established security context.
Duration validity of the sec context for UsrPwd, SRP and SSH. Format: : (default 24:00)
To control password encryption for UsrPwd authentication.
Globus Miscellaneous — Globus Proxy duration: HH:MM (ex 12:15 for 12 hours and 15 min); †default ’ for system default.
Number of bits for the initial key.
Path to alternative †ssh ’ (to override $PATH if ever needed).
In case of error, SSH returns 1 (or 256=0x100 ). To trap those errors for which one should retry, error printouts must be parsed; any substring found under the TEnv SSH.ErrorRetry triggers a retry condition; strings can be added here in the form (including double quotes):
This is what one usually gets if the server has reached the maximum number of sshd daemons (defined by MaxStartups in sshd_config ); this is a typical case in which one should retry.
Max number of retries for SSH in case of retry error (see above).
Type of key to be used for RSA encryption: 0=local ; 1=SSL ( default if openssl available).
In case of ‘RSA.KeyType: 1 ’ this specifies the number of bits to be used for the Blowfish key used to encrypt the exchanged information: default — 256, minimum — 128, maximum — 15912.
30.6.7.2 Server Authentication in TServerSocket
General setting: file with server access rules
Check of host equivalence via /etc/hosts . equiv or $HOME/.rhosts .
SRP: pass file (default $HOME/.srootdpass ).
Globus/GSI: hostcert configuration file.
Globus/GSI: gridmap file.
SSH: port for the sshd daemon.
Force file opening via TNetFile ( TXNetFile ) if a hostname is specified in the Url. By default, for local files TFile::Open() invokes directly TFile.