alex-mcdaniel / RX-DMFIT

A tool used for calculating the expected secondary emission from DM annihilation and placing constraints on dark matter properties, incorporating important astrophysics including the diffusion of charged particles, relevant radiative energy losses, and magnetic field modelling.
12 stars 5 forks source link

Issue with gsl #6

Closed joshua-benabou closed 1 year ago

joshua-benabou commented 1 year ago

rx_dmfit_makefile.txt Hi,

I am very interested in using your software, but am having compilation issues.

I am using DarkSusy 6.3.1 and followed https://github.com/alex-mcdaniel/RX-DMFIT/issues/1 to deal with the issue of this version being newer than whay RX-DMFIT was initially designed for. I had to change -lisospin to -lsuperiso since that github issue concernes the older DarkSusy 6.2.0.

My makefile is attached. The issue I have is with rather with the gsl package. Doing

make example1

creates the executable example1. But then running %./example1 in the terminal gives

./example1: error while loading shared libraries: libgsl.so.27: cannot open shared object file: No such file or directory I installed with a prefix from https://www.gnu.org/software/gsl/. After unzippping, I followed the install instructions in gsl-2.7.1/INSTALL. I did:

./configure --prefix=path_to_gsl_2.7.1_install
make
make install

where path_to_gsl_2.7.1_install is an absolute path. and 'make check' shows that all checks pass, so I believe I installed the gsl package correctly. I do have a line in the RX-DMFIT makefile

prefix_gsl = path_to_gsl_2.7.1_install Following the suggestions about shared libraries in https://www.gnu.org/software/gsl/doc/html/usage.html#shared-libraries, I tried in the linux terminal:

LD_LIBRARY_PATH=path_to_gsl_2.7.1_install/lib
export LD_LIBRARY_PATH
./example1

which then gives

creating Target... 

 *********************************************************
 *** Welcome to DarkSUSY version
 *** darksusy 6.3.1                                              
 *********************************************************
Segmentation fault (core dumped)

Thanks for your help.