LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-10-2010, 11:52 AM   #1
kirillpushkin
LQ Newbie
 
Registered: May 2010
Location: Tuscaloosa, Alabam
Posts: 4

Rep: Reputation: 0
problems with editing .tcshrc file


Hi,

I have a problem with setting up 2 programs ROOT and GEANT4 through .tcshrc file. In order to better understand what I mean, I have attached the contents of my .tcshrc below. So, when I open a new Terminal, ROOT would not work, but the Geant4 works. Although everything is set up correctly, I have checked the commands for ROOT later, and in that case it works perfectly fine. When I switch ROOT and Geant4, and put Geant4 commands first, and later ROOT commands then ROOT would work, but the GEANT4 libraries won't. Please let me know what is wrong with my .tcshrc file.

# Running ROOT
setenv ROOTSYS /home/kirillpushkin/Documents/root
setenv PATH ${ROOTSYS}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH}

# Running GEANT4
setenv G4WORKDIR /home/kirillpushkin/geant4
source /home/kirillpushkin/Documents/geant4.9.2.p02/env.csh
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/geant4.9.2.p02/lib/Linux-g++
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/2.0.4.2/CLHEP/lib/:$LD_LIBRARY_PATH
 
Old 05-10-2010, 12:04 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Hi and welcome to LinuxQuestions!

Maybe the line
Code:
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/geant4.9.2.p02/lib/Linux-g++
should be
Code:
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/geant4.9.2.p02/lib/Linux-g++:$LD_LIBRARY_PATH
Please, can you post the exact error messages in both cases?
 
1 members found this post helpful.
Old 05-10-2010, 12:28 PM   #3
kirillpushkin
LQ Newbie
 
Registered: May 2010
Location: Tuscaloosa, Alabam
Posts: 4

Original Poster
Rep: Reputation: 0
Hi, thank you very much for your reply, and I am sorry for being unclear. So, there are no error messages. Clearly, when I set in .tcshrc first 3 command lines related to ROOT as it is below they do not get executed, and as result ROOT does not work, whereas 3 last lines related to GEANT4 get executed, the program GEANT works.

# Running ROOT
setenv ROOTSYS /home/kirillpushkin/Documents/root
setenv PATH ${ROOTSYS}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH}

# Running GEANT4
setenv G4WORKDIR /home/kirillpushkin/geant4
source /home/kirillpushkin/Documents/geant4.9.2.p02/env.csh
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/geant4.9.2.p02/lib/Linux-g++

when I switch them like that below Geant4 doesn't work, but ROOT works successfully. In other words, it seems that the file ignores now the first 3 lines related to GEANT4, but rather executes the last 3 lines related to ROOT. My goal is to have them both working!

# Running GEANT4
setenv G4WORKDIR /home/kirillpushkin/geant4
source /home/kirillpushkin/Documents/geant4.9.2.p02/env.csh
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/geant4.9.2.p02/lib/Linux-g++
setenv LD_LIBRARY_PATH /home/kirillpushkin/Documents/2.0.4.2/CLHEP/lib/:$LD_LIBRARY_PATH

# Running ROOT
setenv ROOTSYS /home/kirillpushkin/Documents/root
setenv PATH ${ROOTSYS}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH}
 
Old 05-11-2010, 10:25 PM   #4
kirillpushkin
LQ Newbie
 
Registered: May 2010
Location: Tuscaloosa, Alabam
Posts: 4

Original Poster
Rep: Reputation: 0
Problems with .tcshrc source file

Looks like nobody knows an answer on my problem.
 
Old 05-12-2010, 04:42 AM   #5
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 718

Rep: Reputation: 72
Hi.

I think what colucix was suggesting is that you are resetting environment variable LD_LIBRARY_PATH in the second set of commands. That effectively removes the first setting. We also don't know what you have in file "...env.csh", which may affect the variable.

Perhaps to see this more clearly, after you login, display the value:
Code:
echo "LD_LIB   : $LD_LIBRARY_PATH"
echo "ROOTSYS  : $ROOTSYS"
echo "G4WORKDIR: $G4WORKDIR"
Best wishes ... cheers, makyo
 
Old 05-12-2010, 07:27 PM   #6
kirillpushkin
LQ Newbie
 
Registered: May 2010
Location: Tuscaloosa, Alabam
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks guys. It helped! I appreciate it!
 
  


Reply

Tags
editing, file, linux, tcshrc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.tcshrc mess up carrots Linux - Newbie 4 09-03-2008 08:21 PM
.tcshrc error and setting env. variables leblebi Linux - Newbie 1 04-14-2008 02:02 AM
read-only file system error when editing a config file smallfrowne Linux - Newbie 5 02-19-2008 06:06 PM
Editing .tcshrc problems boydasilva Linux - Newbie 16 12-10-2004 07:35 AM
How to logout from .tcshrc? (never log in) BrianK Linux - General 3 04-13-2004 02:47 AM


All times are GMT -5. The time now is 01:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration