sousasag / ARES

ARES - Automatic Routine for line Equivalent widths in stellar Spectra

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

areslib.h:589:24: error: 'gsl_multifit_fdfsolver

veronicaloatac opened this issue · comments

I am trying to install ARES v2 program and I am having problems.

I have OS Ubuntu 18.04 and the versions of cfitsio 3.48 and gsl 2.6 (I already tried also with version 2.4).

After to run:

gcc -o ARES ARES_v2.c -L/usr/local/cfitsio-3.48/lib -I/usr/local/cfitsio-3.48/include -lcfitsio -lgsl -lgslcblas -lm -lgomp -fopenmp

I have the following problem:

In file included from ARES_v2.c:47:0:
areslib.h: In function 'fitngauss':
areslib.h:589:24: error: 'gsl_multifit_fdfsolver {aka struct }' has no member named 'J'
gsl_multifit_covar (s->J, 0.0, covar);
^~

Hi,

That's seems to be a problem with the gsl version. You are most likely using an old gsl version in the system since you are not pointing to any gsl manually installed?
Anyway, before trying to solve that and since you are using Ubuntu, I recommend you to simply install the required libraries from the repository:

sudo apt-get install libgsl-dev libcfitsio-dev

Then be sure to do a git pull.
Then try the make command directly with the normal compilation:
make install
It should work.
Let me know if you still have problems

Dear Sergio,

I did 'sudo apt-get install libgsl-dev libcfitsio-dev' to install from the repository as you suggested, then I ran 'make install' and I get the following

gcc -o ARES ARES_v2.c -lcfitsio -lgsl -lgslcblas -lm -lgomp -fopenmp
In file included from ARES_v2.c:47:0:
areslib.h:13:10: fatal error: fitsio.h: No such file or directory
#include "fitsio.h"
^~~~~~~~~~
compilation terminated.
make: *** [makefile:2: install] Error 1

It seems your previous try to manual install cfitsio might be overriding the repo installation...
Do you remember how did you manually installed cfitsio?

You can try to fix that overriding... Not sure exactly how...

Alternatively you may try to gave the paths for either your manual installation or the one of the repository (you need to do a search for the fitsio.h), For example:
gcc -o ARES ARES_v2.c -L/usr/local/cfitsio/lib/ -I/usr/local/cfitsio/include/ -lcfitsio -lgsl -lgslcblas -lm -lgomp -fopenmp

This should work if the gsl is correctly installed. Otherwise you might have to add the path for the gsl installation.

Can you also check what you got with these commands:
ldconfig -p | grep libcfitsio
ldconfig -p | grep libgsl

This in principal checks what are the libs installed in your system...

I solved the problem using the path of the libraries installed manually

Thanks so much

Great!