Missing Canvas

Honestly speaking, sooner or later, you will learn by hard that the policy of using a “system-provided” ROOT version (e.g. in “/usr/[bin|lib]” or “/usr/local/[bin|lib]”) is a dead end.
You will learn that you need something like three different versions of ROOT - just because something that works with a particular ROOT version is not working with another ones, or because some piece of your additional, experiment / analysis specific, software explicitly requires a particular ROOT version.
The safest approach is to “completely remove” (“purge”) all “system-provided” ROOT related packages (this includes any “official” packages that originate from your operating system’s repositories as well as any version that you yourself built) and install all needed versions of ROOT from scratch, each version in a different “version specific” ROOTSYS subdirectory (e.g. something like “/opt/ROOT/v5-32-04”, “/opt/ROOT/v5-34-18”, “/opt/ROOT/v5-34-00-patches” and so on).

I always install ROOT 5 using the ROOTSYS based method described in this old post.
The ROOTSYS based method is almost the same as the official “Location independent installation” method (do remember to “unset ROOTSYS” before running configure and make, if you want to use the official method) but the “ROOTSYS=/Where/You/Want/To/Install/root” subdirectory must be different from the “/Where/You/Unpacked/The/Source/Code/Of/root” subdirectory (i.e. in which you will build ROOT 5).
You can also easily build ROOT 5 “in-place” (with “unset ROOTSYS”).
If you prefer to use the “--prefix” method (i.e. the official “Fixed location installation” method), do always remember to add an appropriate “--etcdir” (no need to do it for ROOT 6) and do remember to “unset ROOTSYS” before running configure and make.
Note that the “--prefix” method produces a different “installation” / “binary distribution” subdirectory structure than the ROOTSYS based method and I have had problems with ROOT’s tutorials (and tests?) when using the “--prefix” method which never appeared when using the ROOTSYS based method (and that’s why I always advertise the ROOTSYS based method).

Building ROOT 6 requires the usage of the new CMake based building method.

Before trying to build ROOT, see the “Build Prerequisites” web page.
In any case, when you are building a new ROOT version, make always sure that nothing in your environment variables (i.e. “ROOTSYS”, “PATH”, “LD_LIBRARY_PATH”) points to another existing version of ROOT (and that’s another good reason why there should be no ROOT related files in “standard” system locations, like “/usr/[bin|lib]” or “/usr/local/[bin|lib]”), otherwise you may end up with a broken build. If you are re-building a particular version, remove the old “installation” / “binary distribution” subdirectory structure before configuring it again (and if you want to re-configure it, make sure that you started with a “fresh” source code, so that there are no remnants from previous builds, for example run “make distclean” or maybe better “make maintainer-clean” before configuring it again).

BTW. See also: Sourcing root for all users

P.S. In order to get rid of “undesired” ROOT versions, if you did “make install”, with ROOT 5 just “make uninstall”, while with ROOT 6, from the build subdirectory, you will need to execute something like “xargs rm < install_manifest.txt”. If it comes from your operating system’s repositories, just “completely remove” / “purge” (i.e. “remove with any associated configuration files”) all ROOT related packages. For example, on Ubuntu 14.04, execute “sudo apt-get purge root-system* root-plugin* libroot*” (afterwards check that the “/usr/lib/i386-linux-gnu/root5.34” and the “/usr/lib/x86_64-linux-gnu/root5.34” subdirectories disappeared completely).

3 Likes