smithlabcode / methpipe

A pipeline for analyzing DNA methylation data from bisulfite sequencing.
http://smithlabresearch.org/methpipe
67 stars 27 forks source link

Install fatal error: gsl/gsl_sf_psi.h #193

Closed avkermanov closed 2 years ago

avkermanov commented 2 years ago

As the similar issue was closed, I will open it here with the requested error code:

make all-recursive make[1]: Entering directory '/home/akermanov/Packages/methpipe-4.1.1' Making all in src/smithlab_cpp make[2]: Entering directory '/home/akermanov/Packages/methpipe-4.1.1/src/smithlab_cpp' make all-am make[3]: Entering directory '/home/akermanov/Packages/methpipe-4.1.1/src/smithlab_cpp' make[3]: Leaving directory '/home/akermanov/Packages/methpipe-4.1.1/src/smithlab_cpp' make[2]: Leaving directory '/home/akermanov/Packages/methpipe-4.1.1/src/smithlab_cpp' make[2]: Entering directory '/home/akermanov/Packages/methpipe-4.1.1' CXX src/common/BetaBin.o src/common/BetaBin.cpp:31:10: fatal error: gsl/gsl_sf_psi.h: No such file or directory

include <gsl/gsl_sf_psi.h>

^~~~~~ compilation terminated. Makefile:1080: recipe for target 'src/common/BetaBin.o' failed make[2]: [src/common/BetaBin.o] Error 1 make[2]: Leaving directory '/home/akermanov/Packages/methpipe-4.1.1' Makefile:1102: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/akermanov/Packages/methpipe-4.1.1' Makefile:622: recipe for target 'all' failed make: *** [all] Error 2

Originally posted by @avkermanov in https://github.com/smithlabcode/methpipe/issues/189#issuecomment-953014864

terencewtli commented 2 years ago

Hi,

Could you make sure GSL is installed in your system? And that htslib. You should be able to do:

sudo apt install libgsl-dev sudo apt install libhts-dev

After running those two commands, make sure you see the proper gsl and hts directories in /usr/lib and /usr/include (or /usr/local/*). Finally, make sure that you provide the path to the headers during the ./configure step, like below:

../configure CPPFLAGS='-I /path/to/gsl/headers/' \
               LDFLAGS='-L/path/to/gsl/lib'

Also, we recommend that you use methpipe-5.0.0, as there are substantial updates to the software.

avkermanov commented 2 years ago

Hi,

Thank you for suggestions. I have no sudo access on server, things are a bit tricky. I installed tools you noticed in a different folder and changed the PATH but it did not help. But installation of 5.0 version of methpipe ran smoothly. The only problem that I needed .mr files, as I designed scripts for them, but maybe it will be easier to modify my scripts then trying to force 4.1.1. version to install...

Thank you!

terencewtli commented 2 years ago

Hi,

I see, let me check the methpipe 4.1.1 installation. The error you are running into is the one you posted in the original comment?

On my server, I created a /usr/local/ directory somewhere and copied all of the files from the gsl and htslib installation files into the include/lib directories. And then put the following in my ~/.bashrc:

export CPPFLAGS=-I/path/to/usr/local/include/:$CPPFLAGS
export LDFLAGS=-I/path/to/usr/local/lib/:$LDFLAGS

Then I run

./configure --prefix=`pwd`

in the methpipe-4.1.1 directory. This is a bit of a complicated solution, but seems to work for me... please let me know if this works or if you have any other solutions!

guilhermesena1 commented 2 years ago

Just chiming in to say that, without superuser access, you should compile GSL and HTSLib from source, then link to the lib and include directories for both libraries, separated by colons, using the CPPFLAGS and LDFLAGS like Terence mentioned.

If the problem still arises please feel free to re-open this issue.