sga icon indicating copy to clipboard operation
sga copied to clipboard

configure issues

Open irenatfh opened this issue 8 years ago • 8 comments

Hi, I'm trying to install SGA and have installed the google sparse hash library and bamtools. The ./configure command seems to be hanging up on finding bamtools, since it returns this error message:

checking api/BamReader.h usability... no
checking api/BamReader.h presence... no
checking for api/BamReader.h... no
configure: error: The bamtools library must be installed (http://github.com/pezmaster31/bamtools). You can specify its path with the --with-bamtools=PATH option

I have tried specifying its path by pointing it to the root directory of bamtools (I've checked that that directory contains include/ and lib/ as subdirectories, and that /include/api does indeed contain BamReader.h). I have also added the bamtools path to my $PATH and checked that bamtools works just fine. Any thoughts on how to fix this?

irenatfh avatar Nov 03 '16 16:11 irenatfh

A suggestion would be to check the config.log and see where it is failing. configure will try to build a test program when checking for these headers and libraries, and so config.log should contain the full command supplied to your compiler when running these tests. Could help get to the root of the issue.

walaj avatar Nov 03 '16 23:11 walaj

Here are the lines in config.log pertinent to BamReader.h, does this provide more useful information?

| #include <api/BamReader.h>
configure:5231: result: no
configure:5231: checking api/BamReader.h presence
configure:5231: g++ -E  -fopenmp    conftest.cpp
conftest.cpp:30:27: fatal error: api/BamReader.h: No such file or directory
 #include <api/BamReader.h>

irenatfh avatar Nov 04 '16 00:11 irenatfh

Can you provide the full ./configure command you are providing? Your arguments to --with-bamtools aren't being seen by configure. From my config.log:

configure:5895: checking api/BamReader.h usability                                                                                                                                                          
configure:5912: g++ -c -O3  -fopenmp -I/xchip/gistic/Jeremiah/GIT/sparsehash/src -I/broad/software/free/Linux/redhat_6_x86_64/pkgs/pezmaster31_bamtools-6708a21/include -I/broad/software/free/Linux/redhat_6_x86_64/pkgs/pezmaster31_bamtools-6708a21/include/bamtools conftest.cpp >&5

walaj avatar Nov 04 '16 01:11 walaj

Sure, interestingly I get the same lines in config.log when I use ./configure as well as ./configure --with-bamtools=~/Programs/bamtools:

configure:5231: checking api/BamReader.h presence
configure:5231: g++ -c -std=c++98 -03 -fopenmp conftest.cpp >&5

irenatfh avatar Nov 04 '16 19:11 irenatfh

Hmm, this is puzzling. Perhaps something in the way autotools is building the configure script? If you do ./configure --help do you see the with-bamtools options?

Otherwise, can you try with the attached configure? If that works, then most likely something off about the autotools build of configure.

configure.zip

walaj avatar Nov 06 '16 22:11 walaj

Thanks for the suggestion. When I do ./configure --help I do indeed see the --with-bamtools option. Unfortunately, still no dice with the attached configure, whether or not I specify my bamtools path.

irenatfh avatar Nov 09 '16 21:11 irenatfh

Hmm, I'm stumped, I don't know why even the attached configure isn't working.

As a work around, I think you can just comment out the bamtools check of configure.ac and rebuild the configure script and configure without errors. Then pass all the necessary includes via make CXXFLAGS='-I<path_to_bamtools_include>' LDFLAGS=<path_to_libbamtools.a>' You may then run into other issues though with sparsehash etc, so the above may not work either.

walaj avatar Nov 10 '16 15:11 walaj

Hi, I had the same problems, but I managed to figure out what is needed. You need to specify as --with-bamtools the directory where the include dir is located. For example if your bamtools headers are in /usr/include/bamtools, then just put '/usr/'

idaios avatar Dec 07 '17 21:12 idaios