It is currently Sat Dec 04, 2021 6:32 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 30, 2013 2:48 pm 
Offline

Joined: Wed Jun 06, 2012 7:47 pm
Posts: 4
Hi all,

I successfully installed galprop on SLAC cluster but now when I try to run it I get this one line fatal error:

./galprop: error while loading shared libraries: libcfitsio.so: cannot open shared object file: No such file or directory

I tried checking the path to cftio installation I feed it when doing "./configure" and did find the file over there so I'm a clueless.

Any help would be greatly appreciated.


Top
 Profile  
 
PostPosted: Wed Oct 30, 2013 3:49 pm 
Offline
Site Admin

Joined: Wed Oct 21, 2009 6:30 pm
Posts: 47
Location: Stanford U.
You probably need to set the environment variable LD_LIBRARY_PATH so that it contains the location of libcfitsio.so:

export LD_LIBRARY_PATH=/path/to/libcfitsio:$LD_LIBRARY_PATH

_________________
Andrey Vladimirov
http://galprop.stanford.edu/


Top
 Profile  
 
PostPosted: Wed Oct 30, 2013 4:29 pm 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
The default shell on SLAC is tsh so the command is

setenv LD_LIBRARY_PATH /path/to/libcfitsio:$LD_LIBRARY_PATH

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Thu Oct 31, 2013 12:39 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
Normally the ./configure as in the README does this automatically without requiring the setenv, as for the other libraries.
Except for clhep which seems to still require it.
Evidently it does not always work.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Thu Oct 31, 2013 2:03 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
The configure script only finds the library during compilation. That is only enough for the runtime, if the library is statically compiled. For shared libraries you need to set the LD_LIBRARY_PATH as well unless it was installed in a system library directory.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Thu Oct 31, 2013 9:13 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
So when only static (.a) is available, it is incorporated in the executable. When only runtime (.so) is available, it requires setting the LD_LIBRARY_PATH.
When both are available (e.g. CCfits, gsl) , it evidently takes the .a.
But I find that for clhep, where both are also available, it takes the .so and requires setting the LD_LIBRARY_PATH.
So it is not yet quite clear.
Useful info to add to the README.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Tue Nov 12, 2013 2:06 pm 
Offline

Joined: Wed Jun 06, 2012 7:47 pm
Posts: 4
Thank you so much guys!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group