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

Unable to configure due to bamtools dependency #1

Closed
michaelbarton opened this issue Nov 18, 2017 · 5 comments
Closed

Unable to configure due to bamtools dependency #1

michaelbarton opened this issue Nov 18, 2017 · 5 comments
Assignees

Comments

@michaelbarton
Copy link

I am currently getting this error:

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 running this command both of these two ways:

CXXFLAGS="-I/usr/include/bamtools" ./configure

Or

./configure --with-bamtools=/usr/include/bamtools/

The contents of /usr/include/bamtools/ is:

drwxr-xr-x  3 root root 4096 Nov 18 00:28 api
drwxr-xr-x  2 root root 4096 Nov 18 00:28 shared
-rw-r--r--  1 root root  852 Aug  7 21:01 bamtools_version.h

The contents of /usr/include/bamtools/api is:

drwxr-xr-x 2 root root  4096 Nov 18 00:28 algorithms
-rw-r--r-- 1 root root 23779 Aug  7 21:01 BamAlignment.h
-rw-r--r-- 1 root root 15082 Aug  7 21:01 BamAux.h
-rw-r--r-- 1 root root   847 Jul  5  2016 BamAlgorithms.h
-rw-r--r-- 1 root root  9682 Jul  5  2016 BamConstants.h
-rw-r--r-- 1 root root  2885 Jul  5  2016 BamIndex.h
-rw-r--r-- 1 root root  4676 Jul  5  2016 BamMultiReader.h
-rw-r--r-- 1 root root  4285 Jul  5  2016 BamReader.h
-rw-r--r-- 1 root root  2208 Jul  5  2016 BamWriter.h
-rw-r--r-- 1 root root  3022 Jul  5  2016 IBamIODevice.h
-rw-r--r-- 1 root root  3725 Jul  5  2016 SamConstants.h
-rw-r--r-- 1 root root  2959 Jul  5  2016 SamHeader.h
-rw-r--r-- 1 root root  2389 Jul  5  2016 SamProgram.h
-rw-r--r-- 1 root root  3127 Jul  5  2016 SamProgramChain.h
-rw-r--r-- 1 root root  3449 Jul  5  2016 SamReadGroup.h
-rw-r--r-- 1 root root  3281 Jul  5  2016 SamReadGroupDictionary.h
-rw-r--r-- 1 root root  2567 Jul  5  2016 SamSequence.h
-rw-r--r-- 1 root root  3248 Jul  5  2016 SamSequenceDictionary.h
-rw-r--r-- 1 root root   757 Jul  5  2016 api_global.h

Any assistance you can provide is appreciated.

@mpre
Copy link
Member

mpre commented Nov 20, 2017

Hi Michael,
this seems to happen in sga too (e.g., this issue ).
Anyway, usually ./configure --with-bamtools=/usr works for me. Can you try it?

@mpre mpre self-assigned this Nov 20, 2017
@michaelbarton
Copy link
Author

Thanks for following up Marco. That fixed it. I appreciate your help with this.

I now however get the error:

g++ -DHAVE_CONFIG_H -I. -I..  -I../Bigraph -I../Thirdparty -fopenmp  -I/usr/include -I/usr/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -O3 -MT libutil_a-ClusterReader.o -MD -MP -MF .deps/libutil_a-ClusterReader.Tpo -c -o libutil_a-ClusterReader.o `test -f 'ClusterReader.cpp' || echo './'`ClusterReader.cpp
ClusterReader.cpp: In member function 'bool ClusterReader::readCluster(ClusterRecord&)':
ClusterReader.cpp:70:41: error: cannot convert 'std::basic_istream<char>' to 'bool' in initialization
     bool good = getline(*m_pReader, line);
                                         ^
make[2]: *** [libutil_a-ClusterReader.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Makefile:718: recipe for target 'libutil_a-ClusterReader.o' failed
make[2]: Leaving directory '/tmp/fsga/Util'
Makefile:359: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/tmp/fsga'
Makefile:300: recipe for target 'all' failed
The command '/bin/sh -c fsga.sh' returned a non-zero code: 2

@michaelbarton
Copy link
Author

I'm building a docker file here, if that is useful:
https://github.com/bioboxes/fast-sga/tree/feature/add-fsg-version

@mpre
Copy link
Member

mpre commented Nov 21, 2017

Thank you for reporting this Michael.
I tried to compile fsg on ubuntu 17.10 and I get the same error when using g++ versions 6 and 7. Indeed, by the c++11 standard the conversion from std::basic_ios to bool should be explicit (see this link for more ).
I can compile the tool if I set g++-5 as default (sudo update-alternatives --config g++ on ubuntu, I'm not sure if other Linux distributions provide the same tool). As a quick (and "dirty") workaround you could use that version of g++ to get fsg compiling.

Note that the error you get is in the sga codebase (the code we wrote is in src/FSG) so we should probably update the version we are distributing. Unfortunately, the developers of that tool chose to follow the g++-98 standard (see this commit) but we can't do the same since I'm pretty sure we use lambdas somewhere in src/FSG. Therefore, integrating the last commits of sga in fsg could require some time.

@michaelbarton
Copy link
Author

This was what was exactly needed to resolve this. Thank you for you help.

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

2 participants