Syntax error in thisroot.csh during installation

Hello everyone,
I recently installed root_v6.26.02 on my lenovo ideapad 5 from the root’s website. There I followed the installation procedure as written in the installation website:

  1. Install all [required dependencies] with the system package manager
  2. [Download the release] for the desired platform and ROOT version
  3. Unpack the archive
  4. Add the ROOT libraries and executables to your environment by sourcing the appropriate thisroot.* script. These setup scripts can be found in the ROOT binary release, in the bin directory.
    And i typed in terminal the following commands as written in the website:
$ wget https://root.cern/download/root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
$ tar -xzvf root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
$ source thisroot.{csh,fish,bat}

When I now run root I get this error:

-bash: /home/kostas/Desktop/root/bin/thisroot.csh: line 17: syntax error near unexpected token `('
-bash: /home/kostas/Desktop/root/bin/thisroot.csh: line 17: `set ARGS=($_)'

I doubt the .csh file actually has a syntax error since I didn’t touch it, what am I doing wrong?
Thanks in advance.

ROOT Version: [root_v6.26.02.Linux-ubuntu22-x86_64-gcc11.2.tar.gz]
Platform: Ubuntu 22.04

It seems that bash is being run, so you need to do source thisroot.sh

Otherwise, I believe that thisroot.csh is buggy and need some rework, as was done already with thisroot.sh make thisroot.sh compatible with dash and ksh shell by ferdymercury · Pull Request #10332 · root-project/root · GitHub

That isn’t the actual code to be executed. Please run one of the following lines, depending on your shell:

source thisroot.sh
source thisroot.csh
source thisroot.fish
thisroot.bat

I am updating the ROOT install web page which I suspect to be the cause of this?

1 Like

Hello Axel,
thanks for the response. I now execute the following commands:

source thisroot.sh

Then i follow the steps from this website: https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuideChapters/GettingStarted.pdf
and i execute the following commands:

export ROOTSYS=$HOME/root
export PATH=$PATH:$ROOTSYS/bin
export SHLIB_PATH=$SHLIB_PATH:$ROOTSYS/lib

And then when i execute root this error appears:

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C x86_64-linux-gnu-g++-9   -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
   ------------------------------------------------------------------
  | Welcome to ROOT 6.24/02                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Jun 28 2021, 09:28:51                 |
  | From tags/v6-24-02@v6-24-02                                      |
  | With                                                             |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

cling::DynamicLibraryManager::loadLibrary(): libssl.so.1.1: cannot open shared object file: No such file or directory
root [0] 

What shall i do to fix the problem?

You should not.
source thisroot.sh does that for you the proper way.

1 Like

You seem to be trying to use a ROOT binary distribution for “Ubuntu 20.04 / gcc 9.4” on a “Ubuntu 22.04 / gcc 11.2”.

1 Like

I have opened GettingStarted thisroot misleading · Issue #10722 · root-project/root · GitHub for this.

2 Likes

Hello ,
I tried to do the same thing with the correct binary distribution and the same happens…

Hello ,

I installed the new root binary distribution root_v6.26.04.Linux-ubuntu22-x86_64-gcc11.2.tar.gz and followed the same steps on installation guide. Then i used only source thisroot.sh command as you told me , i executed root and i got this error:

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C x86_64-linux-gnu-g++-9   -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
   ------------------------------------------------------------------
  | Welcome to ROOT 6.24/02                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Jun 28 2021, 09:28:51                 |
  | From tags/v6-24-02@v6-24-02                                      |
  | With                                                             |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

cling::DynamicLibraryManager::loadLibrary(): libssl.so.1.1: cannot open shared object file: No such file or directory
root [0]

It still says “ROOT 6.24/02”.

1 Like

Maybe you have two versions of ROOT installed at the same time, one by your package manager?

  • Open a new terminal.

  • Call whereis root and post the output here.

  • Then: Do NOT call these commands:

export ROOTSYS=$HOME/root
export PATH=$PATH:$ROOTSYS/bin
export SHLIB_PATH=$SHLIB_PATH:$ROOTSYS/lib
  • Call then source /home/user/path-to-wherever-you-installed-root/bin/thisroot.sh (modifying the path accordingly)
  • Start ROOT
  • If the error persists, please post here the output of the command printenv

Thanks for the response ,

It looks like i was still installing an older ROOT distribution . I installed the latest one and everything worked.

I would like to thank everyone for their responses. The problem is solved. I installed the newest ROOT distribution for Ubuntu as Wile_E_Coyote advised me to and the problem was solved.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.