Home | News | Documentation | Download

Thisroot.csh gives setenv error, unless included in the ~/.cshrc file

Hi,

I am trying to declutter my environment after hitting some issues. One such problem is with ROOT and Jupyter, where something was killing Jupyter Lab.

I previously had:
``setenv ROOTSYS “/cern/root/v6.22.03g9/”
in my .cshrc and this was fine. My idea was to move this (and other ROOT related/dependant environmental varables into a separate file, which I could source when I was going to launch root.
However, when I do this I get a “setenv: Too many arguments.” error. I have narrowed this down to the thisroot.csh command.

Replacing the identical line back into the .cshrc resolves the issue.

What is going on here? Am I misunderstanding that I should be able to use this script out-with the .cshrc?

For reference my (reduced) .cshrc:
`
#!/bin/tcsh

if ( $?HOSTNAME == 0 ) setenv HOSTNAME uname -n || hostname

################## USER SECTION #############################################

# PATH is a list of directories to search for executable files
setenv PATH "./:/bin:/usr/bin:/usr/local/bin"
setenv LD_LIBRARY_PATH "./:/usr/X11R6/lib:/usr/local/lib64"
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/local/lib:/usr/lib:/usr/lib64:/usr/local/java/latest/bin"

#root
#source /cern/root/v6.22.03g9/bin/thisroot.csh

setenv PATH "/usr/local/bin:${PATH}" #for gcc9 

setenv EDITOR nano

setenv COATJAVA /home/clas12/coatjava

#for Ananconda
#setenv ANACONDASYS /home/clas12/anaconda3
#setenv PATH "${PATH}:${ANACONDASYS}/bin"

setenv PATH "${PATH}:/w/work3/home/pauln/Miniconda/bin"

set autolist=ambiguous

####PATH additions
setenv PATH "${PATH}:/w/work3/home/pauln/TeXLive/2020/bin/x86_64-linux"

`
The second file is reduced to only contain the line:

`
#!/bin/tcsh

setenv ROOTSYS "/cern/root/v6.22.03g9/

source ${ROOTSYS}/bin/thisroot.csh
`

Thanks in advanced for any help!

Cheers,
Paul

ROOT Version:_ 6.22.03
Platform: CentOS 7
Compiler: Not Provided


Hello,

So if I understand correctly, the issue is that when you separate the sourcing of thisroot.csh to a second file, and you source that file from the original one, you get an error?