ROOT install on grid

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 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!

[url]Release 5.32.03 on Ubuntu 12.04
[url]Problems installing root with --prefix=$HOME/.local

¡Thank you for your (short) reply!

¡It was exactly what I needed! :slight_smile:

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 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

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

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?

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)!

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…