[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help for next version of freebayes needed: libseqlib build error



On Fri, 2017-01-27 at 15:28 +0100, Andreas Tille wrote:
> Hi,
> 
> Version 1.1.x of freebayes needs libseqlib and I commited some
> preliminary packaging to Git[1].  My obviously poor attempt to use
> Debian packaged libraries instead of code copies endet up in
> 
> ...
> g++ -DHAVE_CONFIG_H -I. -I..  -I../ -I../htslib -Wno-sign-compare -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Wno-unknown-pragmas -g -O2 -fdebug-prefix-map=/build/libseqlib-1.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -c -o libseqlib_a-SeqPlot.o `test -f 'SeqPlot.cpp' || echo './'`SeqPlot.cpp
> In file included from ../SeqLib/UnalignedSequence.h:5:0,
>                  from ../SeqLib/BamRecord.h:23,
>                  from ../SeqLib/BFC.h:8,
>                  from BFC.cpp:33:
> /usr/include/bwa/bwa.h:33:3: error: conflicting declaration ‘typedef struct bseq1_t bseq1_t’
>  } bseq1_t;
>    ^~~~~~~
> In file included from ../SeqLib/BFC.h:5:0,
>                  from BFC.cpp:33:
> /usr/include/fml.h:11:3: note: previous declaration as ‘typedef struct bseq1_t bseq1_t’
>  } bseq1_t;
>    ^~~~~~~
> In file included from ../SeqLib/UnalignedSequence.h:5:0,
>                  from ../SeqLib/BamRecord.h:23,
>                  from ../SeqLib/BFC.h:8,
>                  from BFC.cpp:33:
> /usr/include/bwa/bwa.h:42:11: error: conflicting declaration of C function ‘bseq1_t* bseq_read(int, int*, void*, void*)’
>   bseq1_t *bseq_read(int chunk_size, int *n_, void *ks1_, void *ks2_);
>            ^~~~~~~~~
> ...

Looks like the system BWA and FML have conflicting bseq1_t
declaration. 

I noticed that upstream is using personal forks of BWA and FML, not the
upstream ones. If you look for bseq1_t in the SeqLib clones of BWA and
FML, no definition appears. However, they do appear in the respective
upstream repositories.

Looks like upstream had to patch the BWA and FML code bases to be able
to mix them without a multiple-definition error. I am not sure you can
get away from it.


> If you want to make this your riddle for the weekend and you
> can come up with a solution this would simplify upgrading
> freebayes.
> 
> Kind regards
> 
>        Andreas.
> 
> 
> [1] https://anonscm.debian.org/git/debian-med/libseqlib.git
> 


Reply to: