GALPROP
https://galprop.stanford.edu/forum/

error while loading shared libraries
https://galprop.stanford.edu/forum/viewtopic.php?f=20&t=175
Page 1 of 1

Author:  Maxos [ Wed Oct 30, 2013 2:48 pm ]
Post subject:  error while loading shared libraries

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.

Author:  avladim [ Wed Oct 30, 2013 3:49 pm ]
Post subject:  Re: error while loading shared libraries

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

Author:  gudlaugu [ Wed Oct 30, 2013 4:29 pm ]
Post subject:  Re: error while loading shared libraries

The default shell on SLAC is tsh so the command is

setenv LD_LIBRARY_PATH /path/to/libcfitsio:$LD_LIBRARY_PATH

Author:  strong [ Thu Oct 31, 2013 12:39 am ]
Post subject:  Re: error while loading shared libraries

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.

Author:  gudlaugu [ Thu Oct 31, 2013 2:03 am ]
Post subject:  Re: error while loading shared libraries

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.

Author:  strong [ Thu Oct 31, 2013 9:13 am ]
Post subject:  Re: error while loading shared libraries

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.

Author:  Maxos [ Tue Nov 12, 2013 2:06 pm ]
Post subject:  Re: error while loading shared libraries

Thank you so much guys!

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/