Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all fails with error: No such file or directory #include <gsl/gsl_rng.h> #12

Open
Samashoon opened this issue Apr 27, 2020 · 1 comment

Comments

@Samashoon
Copy link

Hi,

I try to install Piranha 1.2.1 but "make all" step gives the following error:

...
g++ -Wall -fPIC -fmessage-length=50 -O3 -c -o ../common/NegativeBinomial.o ../common/NegativeBinomial.cpp -I/draco/u/samas/piranha/piranha-1.2.1/src/smithlab_cpp -I../common/
../common/NegativeBinomial.cpp:44:25: fatal error: gsl/gsl_rng.h
: No such file or directory
#include <gsl/gsl_rng.h>
^
compilation terminated.
Makefile:55: recipe for target '../common/NegativeBinomial.o' failed
make[2]: *** [../common/NegativeBinomial.o] Error 1
make[2]: Leaving directory '/draco/u/samas/piranha/piranha-1.2.1/src/progs'
Makefile:27: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/draco/u/samas/piranha/piranha-1.2.1/src'
Makefile:27: recipe for target 'all' failed

./configure doesn't give any error and config.log looks ok to me.
I passed include and lib directories to ./configure via CPPFLAGS and LDFLAGS .
I used different versions of gcc and gsl.
I passed include directory to "make all" as well.
"gsl/gsl_rng.h" file is present in include directory I don't know why it can't be found.

Could you please help me to solve the problem? I would really like to use Piranha over other peak calling tools.

Thanks,
Sama

@Samashoon Samashoon changed the title make all gives erroroo make all gives error Apr 27, 2020
@Samashoon Samashoon changed the title make all gives error Make all fails with error: No such file or directory #include <gsl/gsl_rng.h> Apr 27, 2020
@Samashoon
Copy link
Author

Issue solved.
I explain here what I did, in the case that someone else has the same problem while installing (it took me really long to solve it as I am not a programmer!).

Piranha Makefile code is written in a way that cannot link to nonstandard include and lib directories even when passed by the LDFLAGS and CPPFLAGS. So if you have headers and libraries in nonstandard directories you will have the same issue.

I solved the problem of linking include directory by making a symlink for path/to/directory/include/gsl/ inside the common folder (../src/common).

Makefile could not link to the lib folder too(error= /usr/bin/ld: cannot find -lgsl). I figured out that LDFLAGS were not passed to the processor (Makefile.in located in /src/progs/ has to be modified). To fix it, I modified Makefile.in. which is located in /src/progs/.
I typed -L/path/to/directory/gsl/lib/ before $(LIBS). You may also pass LDFLAGS to the processor in Makefile.in.
To make the "Make test" work you should do the same for the Makefile.in located in src/test as well. This file needs more modifications.

I hope the developers can fix the issue in the code.
-Sama

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant