# ROOT install on grid

**URL:** <https://root-forum.cern.ch/t/root-install-on-grid/15615>\
**Category:** ROOT\
**Created:** [February 7, 2013, 11:59am UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615 "2013-02-07T11:59:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tialis](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@Tialis](https://root-forum.cern.ch/u/Tialis)\
**Post date:** [February 7, 2013, 11:59am UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/1 "2013-02-07T11:59:37Z")

</div>

Hello rooters,

I have been trying to create a tar file with a compiled root within, and make it work in jobs in a grid, and I cannot make it work. All machines have same architecture.

The steps I take are:

localPATH=`pwd`  
installPATH="$localPATH/root"  
svn co [root.cern.ch/svn/root/tags/v5-32-04](http://root.cern.ch/svn/root/tags/v5-32-04) root-5.32.04  
mkdir -p $installPATH  
cd root-5.32.04  
./configure --prefix=$installPATH --disable-x11  
make  
#(make install) not sure if needed  
cd …  
tar zcf root-5.32.04.tgz root/

And with this tar file, in a job, I untar it, and define ROOTSYS, LD\_LIBRARY\_PATH and PATH pointing to the extracted folder.

Is there a better way to do it? Is there a step missing? Because I cannot make the tar file work.

Thank you!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 7, 2013, 12:37pm UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/2 "2013-02-07T12:37:32Z")

</div>

[url][Release 5.32.03 on Ubuntu 12.04](https://root-forum.cern.ch/t/release-5-32-03-on-ubuntu-12-04/14368/2)  
[url][Problems installing root with --prefix=$HOME/.local](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/4)

---

<div class="post-metadata">

**Author:** ![Tialis](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@Tialis](https://root-forum.cern.ch/u/Tialis)\
**Post date:** [February 8, 2013, 9:27am UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/3 "2013-02-08T09:27:23Z")

</div>

¡Thank you for your (short) reply!

¡It was exactly what I needed! 🙂

If someone needs it in the future, the trick was:

#!/bin/bash

# Define install path

localPATH=`pwd`  
installPATH="$localPATH/root"

svn co [root.cern.ch/svn/root/tags/v5-32-04](http://root.cern.ch/svn/root/tags/v5-32-04) root-5.32.04  
cd root-5.32.04  
mkdir -p $installPATH  
./configure --enable-explicitlink --enable-soversion --disable-x11  
make  
make install  
cd …  
echo "taring…"  
tar zcf root-5.32.04.tgz root/  
echo “…done.”

And while using in another job, just:  
tar -xzvf root-5.32.04.tgz  
export WORKDIR=`pwd`  
export ROOTSYS=$WORKDIR/root  
source $ROOTSYS/bin/thisroot.sh

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 8, 2013, 9:34am UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/4 "2013-02-08T09:34:22Z")

</div>

You do not set ROOTSYS in the beginning (before running “configure”). That means that your ROOT will be built “in-place” and so you should NOT run “make install” afterwards.  
Note, if you set ROOTSYS in the beginning, it MUST be a different subdirectory from the one where you configure and compile ROOT (and then you do need to run “make install” afterwards).

Also, do not define ROOTSYS afterwards yourself. Do simply:  
export WORKDIR=`pwd`  
source $WORKDIR/root/bin/thisroot.sh

---

<div class="post-metadata">

**Author:** ![Tialis](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@Tialis](https://root-forum.cern.ch/u/Tialis)\
**Post date:** [February 8, 2013, 3:21pm UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/5 "2013-02-08T15:21:50Z")

</div>

I was able to compile programs that need root, but I still can’t run macros. I removed “make install”, and reinstalled, I will let you know if it works.

I realized with my old method, “root” executable does not appear (only roots, rootn, rootd…). Why is that? Is it related to any of the configuring options?

---

<div class="post-metadata">

**Author:** ![Tialis](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@Tialis](https://root-forum.cern.ch/u/Tialis)\
**Post date:** [February 10, 2013, 8:08pm UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/6 "2013-02-10T20:08:43Z")

</div>

Excuse me for asking again, but I have already lost so much time with this.

I’m pretty sure I have no root executable because of the “–disable-libX11”. And I still have a few questions about it:

To run on grid, I really need no visual output at all. Which is the best way to install/run root on grid? I guess many people encountered this problem, but I found no guidelines or tutorials.

Is there a way to install root “machine independent”, including all needed libraries in the installation itself?

Thank your for your help (and patience)!

---

<div class="post-metadata">

**Author:** ![Tialis](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@Tialis](https://root-forum.cern.ch/u/Tialis)\
**Post date:** [February 11, 2013, 2:28pm UTC](https://root-forum.cern.ch/t/root-install-on-grid/15615/7 "2013-02-11T14:28:26Z")

</div>

Well… the answer to my question was simple in the end…

The root.exe is a executable file for linux (not for windows, as I feared).

$ file root.exe  
root.exe: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.18, dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

So in the end, using root.exe as root (with an alias, for example) works just fine.

I don’t really know if it is a standard or something… but shouldn’t that executable’s name be changed? at least classically .exe have always been used by windows…
