jts / sga

de novo sequence assembler using string graphs
http://genome.cshlp.org/content/22/3/549
237 stars 82 forks source link

configure issues #130

Open irenatfh opened 7 years ago

irenatfh commented 7 years ago

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?

walaj commented 7 years ago

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.

irenatfh commented 7 years ago

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>
walaj commented 7 years ago

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
irenatfh commented 7 years ago

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
walaj commented 7 years ago

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

irenatfh commented 7 years ago

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.

walaj commented 7 years ago

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.

idaios commented 6 years ago

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/'