Old version vs. New Version Installation Processes

I had installed root version 5 two weeks ago on my Fedora Linux. However, I noticed that version 6 is recommended on the website. But, the problem is that my Fedora21 root repository only has version 5 in it. So, I have to do it myself. My question is should I remove the old version before installing the new version? Also, it seems installation has lots of steps as seen from the documentation. Should I follow every single one of those? I am new to Linux and I don’t want to risk with commands? Is there a way to get those files directly into my system root?
Your help is appreciated,

[root.cern.ch/phpBB3/viewtopic.p … 931#p76931](Missing Canvas

Thanks dear Wile,

Would do you mind letting me know the command line procedure to remove my old version completely from my root repository and then installing all versions each one in a different place?
It is highly appreciated.

Sincerely,

I don’t work on Fedora, but you could try something like this:
rpm -e root5
Several examples how to install ROOT:
[root.cern.ch/phpBB3/viewtopic.p … 803#p81803](Error compiling Root from source on Ubuntu 14.04
[root.cern.ch/phpBB3/viewtopic.p … 797#p78797](Trouble Installing
[root.cern.ch/phpBB3/viewtopic.p … 839#p78839](Problem with png of divided canvas in 5-34/19 on Mac
[root.cern.ch/phpBB3/viewtopic.p … 528#p63528](Release 5.32.03 on Ubuntu 12.04

I have uninstalled old version from depository and installed new version based on documentation. I have chosen “Root-SYS based” method of installing:

[code]
root-6.02.05
xport ROOTSYS=/usr/local/root-6.02.05
./configure --enable-soversion –all

============================================================
=== ROOT BUILD SUCCESSFUL. ===
=== Run ‘source bin/thisroot.[c]sh’ before starting ROOT ===

[…@localhost root-6.02.05]$ sudo make install
[sudo] password for …:
root [0]
Processing hsimple.C…
hsimple : Real Time = 0.15 seconds Cpu Time = 0.15 seconds
(class TFile *) 0x96a8790

============================================================
=== ROOT BUILD SUCCESSFUL. ===
=== Run ‘source bin/thisroot.[c]sh’ before starting ROOT ===

ROOTSYS not set, set it to a destination directory
Makefile:1139: recipe for target ‘install’ failed
make: *** [install] Error 1
[…@localhost root-6.02.05]$ make install
root [0]
Processing hsimple.C…
hsimple : Real Time = 0.17 seconds Cpu Time = 0.17 seconds
(class TFile *) 0xa7389f0

============================================================
=== ROOT BUILD SUCCESSFUL. ===
=== Run ‘source bin/thisroot.[c]sh’ before starting ROOT ===

Installing binaries in /usr/local/root-6.02.05/bin
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/bin’ is not a directory
Installing libraries in /usr/local/root-6.02.05/lib
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/lib’ is not a directory
Installing headers in /usr/local/root-6.02.05/include
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/include’ is not a directory
Installing /home/aashoormaram/root-6.02.05/main/src/rmain.cxx in /usr/local/root-6.02.05/include
cp: cannot create regular file ‘/usr/local/root-6.02.05/include’: No such file or directory
Installing icons in /usr/local/root-6.02.05/icons
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/icons’ is not a directory
cp: target ‘/usr/local/root-6.02.05/icons’ is not a directory
cp: target ‘/usr/local/root-6.02.05/icons’ is not a directory
Installing fonts in /usr/local/root-6.02.05/fonts
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/fonts’ is not a directory
Installing misc docs in /usr/local/root-6.02.05
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: cannot create regular file ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05’ is not a directory
Installing tutorials in /usr/local/root-6.02.05/tutorials
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/tutorials’ is not a directory
Installing tests in /usr/local/root-6.02.05/test
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/test’ is not a directory
Installing macros in /usr/local/root-6.02.05/macros
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/macros’ is not a directory
Installing man(1) pages in /usr/local/root-6.02.05/man/man1
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/man/man1’ is not a directory
Installing config files in /usr/local/root-6.02.05/etc
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: target ‘/usr/local/root-6.02.05/etc’ is not a directory
Installing Autoconf macro in /usr/local/root-6.02.05/build/misc
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: cannot create regular file ‘/usr/local/root-6.02.05/build/misc’: No such file or directory
Installing Emacs Lisp library in /usr/local/root-6.02.05/build/misc
mkdir: cannot create directory ‘/usr/local/root-6.02.05’: Permission denied
cp: cannot create regular file ‘/usr/local/root-6.02.05/build/misc’: No such file or directory
Installing GDML conversion scripts in /usr/local/root-6.02.05/lib
cp: target ‘/usr/local/root-6.02.05/lib’ is not a directory
/bin/sh: line 69: cd: /usr/local/root-6.02.05/tutorials: No such file or directory
/bin/sh: line 70: /usr/local/root-6.02.05/bin/root: No such file or directory
[…@localhost root-6.02.05]$ source bin/thisroot.sh
[…@localhost root-6.02.05]$ source bin/thisroot.csh
bash: bin/thisroot.csh: line 15: syntax error near unexpected token (' bash: bin/thisroot.csh: line 15:set ARGS=($_)'
source bin/thisroot.sh[/code]

After I open my Konsole and type “root”, I am receiving the following error message:

[...@localhost root-6.02.05]$ root bash: root: command not found

I know I am doing something silly. What is that?

Thanks,

It seems that I have to do the following command line before starting root in its directory each time in order to be able to run root.

source bin/thisroot.sh

However, I noticed that I cannot exactly get what I expect from 2.6. Interactive Root section from the following documentation: ftp://root.cern.ch/root/doc/primer/ROOTPrimer.html#f25

In particular, as I rightclick on the resultant plot of any function, I am not able to see “Set Parameters” option. The editor seems to be very limited compared to what is told in the documentation.

I think it may be related to Libcore library but I don’t know how to resolve the issue.

Your help is greatly appreciated.

First sorry, the command line to install ROOT with “sudo” should have been: sudo ROOTSYS=${ROOTSYS} make install or: sudo -E make install
Yes, you need to “source /Where/You/Installed/Root/bin/thisroot.sh” in every x-terminal window in which you want to run “root”. In my opinion, the best idea is to create several shell aliases -> I usually have four “default” ones, e.g.:
alias root-old="source /opt/ROOT/v5-34-26/bin/thisroot.sh"
alias root-pro="source /opt/ROOT/v5-34-28/bin/thisroot.sh"
alias root-new="source /opt/ROOT/v6-02-05/bin/thisroot.sh"
alias root-dev=“source /opt/ROOT/v5-34-00-patches/bin/thisroot.sh”
(The “dev” version is actually built “in-place” and I add “–build=debug” to the configure options -> I use this version when I need to “debug” my code.)
Then I can easily switch between different installed version just by calling one of these aliases.
(Some people hardcode such a call in their shell’s rcfile so that it’s automatically executed on every shell startup, but I don’t think it is a really good idea -> it will then behave as a kind of a “system-provided” ROOT version.)

The picture that you reference in the “ROOT Primer” is the “FitPanel” for a histogram (you can set parameters’ values and ranges for the “Fit Function” using the “Set Parameters…” button) -> note: you need to right-click a histogram.
If you right-click a drawn function, then you can also set its parameters interactively -> in the menu that appeared select “SetParameters” (there is no “FitPanel”, of course).

Thanks dear Wile,
Now, I have both versions on my linux using your recommended method of rootsys based.

In the documentation, it says, "To run this macro, simply type in the shell: > root macro1.C"
However, it does not work for me because I have used System-Root based method and each time I have to go into the directory in which the file macro1.C is located and then run the above command. Would you mind letting me know if there is any easier method to access and run a code from root prompt?

Sincerely,

You need to execute “source /…/bin/thisroot.sh” only once per x-terminal window (afterwards you can run “root” as many times as you want in this window).

You can run a macro using the full path to it, i.e.:
root /Where/The/Macro/Resides/macro.C
or you can add some “private” subdirectories to your “Root.MacroPath” -> see ROOT User’s Guide -> Getting Started -> Environment Setup. The default value is usually simply “.:$(ROOTSYS)/macros”, so you could also just copy some of your “private” macros to the “$(ROOTSYS)/macros” subdirectory (though you would need to do this for every ROOT version that you have installed).

Now, it seems everything is working fine.
I believe since I enabled --ALL option during installation, I should have all the features of root. However, as I was trying to work with event generator Pythia within root, it seems that root is not recognizing this command and within its .cpp file says that you should have enabled --pythia in order to use it in root. I really don’t want to repeat the same installation. I am wondering if there is any easy way to solve this issue.

Sincerely,

The option “–all” means that configure will TRY to find everything that’s available on your system and apparently it did not find “Pythia6” nor “Pythia8”. Try:
root-config --features | grep -i pythia
See your “config.log” file and search for the string “Pythia” inside in order to get an idea why it failed.
In order to see “Pythia[68]” related options, try:
configure --help | grep -i pythia
Search also this forum for “pythia” -> you will find many examples.

In general, you will probably need to build your ROOT from scratch again.
First, “make uninstall” the version that you have now. Then, build it again, starting with a “fresh” source code (e.g. “make maintainer-clean”).
Right after the “configure” step, check the “config.log” file and make sure that you see your “Pythia[68]” related entries in the line “Result: Enabled support for …” (almost in the end of this file).
If you do not see any “pythia” in this line that means that ROOT still haven’t found it (don’t try to run “make” then -> it will be useless).

Yes, I don’t see pythia in that line of config.log file.
What should I do now?

Search this forum for “pythia” -> you can find many hints here.

Sure, I am doing that. It seems there are lots of posts I need to look at.

Thanks though for your support,

I had installed pythia8 from repository of my Fedora 21. Now, that I want to build root and to be able to use it to run pythia, it seems they are not compatible as there might be some conflict between the pythia in root and the pythia installed from repository. However, it was my second shot after being unsuccessful in installing both from outside sources. Namely the following link http://zuysal.web.cern.ch/zuysal/pythia.html.
Now I am trying to not use repository for root and see if root can find pythia that is installed from repository.

After the command ./configure --enable-soversion --all --build=debug --with-pythia8-incdir=$PYTHIA8/include --with-pythia8-libdir=$PYTHIA8/lib > configure.out.txt 2>&1, in my config.log file, I am receiving this:

This is why there is no pythia in the results of configure.out.txt file.
As you said I ran this code to see what is the issue.
After./configure --help | grep -i pythia
I am receiving this:

I know that my Pythia.h file is located at Root>usr>include>Pythia8>Pythia.h
How should I modify configure command to be able to resolve it?

What’s your “PYTHIA8” setting?
I think I can see that you’ve got “libpythia8.so” in “/lib” which seems really strange to me.
In this case you would probably need to have “/include” subdirectory which again seems really strange to me (and apparently ROOT’s configure hasn’t found pythia8’s includes at all).

Hi Wile,
What do you mean by its setting?

You write:
–with-pythia8-incdir=$PYTHIA8/include
–with-pythia8-libdir=$PYTHIA8/lib
so you set some value to the “PYTHIA8” environment variable, don’t you.

Actually I am just following that link steps exactly. I just want to know what it does and whether it will give me a satisfied result. Otherwise, I don’t know why they are doing that. My only intent is to run pythia from root and that is why I typed those --with options to look for those libraries.