gt1 / biobambam2

Tools for early stage alignment file processing
Other
93 stars 17 forks source link

libmaus2 detected but gives can not compile error in configure script #54

Closed jeffbhasin closed 6 years ago

jeffbhasin commented 6 years ago

Hello, I am running into difficulty building biobambam2 from source on Ubuntu 16.04.3 LTS (Xenial), kernel version 4.4.0-103-generic.

I successfully compiled libmaus2 (version libmaus2-2.0.432-release-20171214144141) and used "make install" to install into the prefix /home/ubuntu/tools.

wget https://github.com/gt1/libmaus2/archive/2.0.432-release-20171214144141.tar.gz
tar xvf 2.0.432-release-20171214144141.tar.gz
cd libmaus2-2.0.432-release-20171214144141/
./configure --prefix=/home/ubuntu/tools
make
make install

However, when I follow the instructions to compile biobambam2, it does detect libmaus2, but then gives a subsequent error about not being able to use it for compilation.

These are the commands I ran:

https://github.com/gt1/biobambam2/archive/2.0.82-release-20171214120547.tar.gz
tar xvf 2.0.82-release-20171214120547.tar.gz
cd biobambam2-2.0.82-release-20171214120547/
./configure --with-libmaus2=/home/ubuntu/tools --prefix=/home/ubuntu/tools

This is the error I see after running the configure script (only showing last 5 lines of output):

checking for libmaus2... yes
checking for libmaus2digests... yes
checking for libmaus2seqchksumsfactory... yes
checking whether we can compile a program using libmaus2... no
configure: error: Required libmaus2 is not available.

Is there some compatibility error here, or do I need to add some additional settings in the build process? Thank you very much for your help.

I've tried setting the following environment variables before running configure, yet get the same error still.

export LDFLAGS="-L/home/ubuntu/tools/lib"
export CPPFLAGS="-I/home/ubuntu/tools/include/libmaus2"

Best, Jeff

gt1 commented 6 years ago

Hello Jeff,

could you please post the lines following

configure:<linenumber>: checking whether we can compile a program using libmaus2

from config.log? This should give a hint why configure thinks libmaus2 is not available although it was installed.

Thanks German

jeffbhasin commented 6 years ago

Hello German, Thanks for helping me. Here are the lines from config.log:

configure:17229: checking whether we can compile a program using libmaus2
configure:17241: g++ -o conftest  -O3  -W -Wall -fopenmp -std=gnu++0x -I/home/ubuntu/tools/include  -rdynamic conftest.cpp  -L/home/ubuntu/tools/lib -lmaus2 -lmaus2_simd_align_128 -lmaus2_simd_align_256 -ldl -fopenmp -lz >&5
In file included from /home/ubuntu/tools/include/assert.h:5:0,
                 from /usr/include/c++/5/cassert:43,
                 from /home/ubuntu/tools/include/libmaus2/autoarray/AutoArray.hpp:25,
                 from /home/ubuntu/tools/include/libmaus2/util/ArgInfo.hpp:35,
                 from conftest.cpp:25:
/home/ubuntu/tools/include/except.h:15:32: error: conflicting declaration 'typedef struct Except_Frame_T* Except_Frame_T'
 typedef struct Except_Frame_T *Except_Frame_T;
                                ^
/home/ubuntu/tools/include/except.h:15:16: note: previous declaration as 'struct Except_Frame_T'
 typedef struct Except_Frame_T *Except_Frame_T;
                ^
/home/ubuntu/tools/include/except.h:17:18: error: field 'prev' has incomplete type 'Except_Frame_T'
   Except_Frame_T prev;
                  ^
/home/ubuntu/tools/include/except.h:16:8: note: definition of 'struct Except_Frame_T' is not complete until the closing brace
 struct Except_Frame_T {
        ^
configure:17241: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "biobambam2"
| #define PACKAGE_TARNAME "biobambam2"
| #define PACKAGE_VERSION "2.0.82"
| #define PACKAGE_STRING "biobambam2 2.0.82"
| #define PACKAGE_BUGREPORT "tischler@mpi-cbg.de"
| #define PACKAGE_URL "http://www.sanger.ac.uk"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define PACKAGE "biobambam2"
| #define VERSION "2.0.82"
| #define STDC_HEADERS 1
| /* end confdefs.h.  */
| 
| #include <libmaus2/util/ArgInfo.hpp>
| 
|                               int main(int argc, char * argv[]) {
|                                       ::libmaus2::util::ArgInfo const arginfo(argc,argv);
|                                       return 0;
|                       }
configure:17255: result: no
configure:17259: error: Required libmaus2 is not available.

Best, Jeff

gt1 commented 6 years ago

Hi Jeff,

it looks like you have some package in /home/ubuntu/tools which installs a file named assert.h . This is a no go because this is a file name also used by the C and C++ standard. I would suggest moving the file out of the way for compiling libmaus2 and biobambam2.

Best, German

jeffbhasin commented 6 years ago

Hello German, Thank you very much for the help with this issue. I installed libmaus2 and then biobambam2 to a fresh prefix and all configured and built successfully. The issue was conflicts with other things I had installed to that prefix it appears and files they put into include.

Jeff