walaj / SeqLib

C++ htslib/bwa-mem/fermi interface for interrogating sequence data
http://bioinformatics.oxfordjournals.org/content/early/2016/12/21/bioinformatics.btw741.full.pdf+html
Other
133 stars 36 forks source link

Build failure with newer libjsoncpp #58

Closed LocutusOfBorg closed 3 years ago

LocutusOfBorg commented 3 years ago

Hello, with the new libjsoncpp 1.9.4 looks like the package fails to build from source:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include/htslib -I/usr/include/fml -I/usr/include/jsoncpp -Wno-sign-compare -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wno-unknown-pragmas -g -O2 -fdebug-prefix-map=/libseqlib-1.1.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -c RefGenome.cpp -o libseqlib_la-RefGenome.o >/dev/null 2>&1
ReadFilter.cpp: In constructor 'SeqLib::Filter::ReadFilterCollection::ReadFilterCollection(const string&, const SeqLib::BamHeader&)':
ReadFilter.cpp:181:18: warning: 'Reader' is deprecated: Use CharReader and CharReaderBuilder instead. [-Wdeprecated-declarations]
  181 |     Json::Reader reader;
      |                  ^~~~~~
In file included from /usr/include/jsoncpp/json/json.h:11,
                 from ../SeqLib/ReadFilter.h:10,
                 from ReadFilter.cpp:1:
/usr/include/jsoncpp/json/reader.h:37:63: note: declared here
   37 |     "Use CharReader and CharReaderBuilder instead.") JSON_API Reader {
      |                                                               ^~~~~~
ReadFilter.cpp:181:18: warning: 'Json::Reader::Reader()' is deprecated: Use CharReader and CharReaderBuilder instead [-Wdeprecated-declarations]
  181 |     Json::Reader reader;
      |                  ^~~~~~
In file included from /usr/include/jsoncpp/json/json.h:11,
                 from ../SeqLib/ReadFilter.h:10,
                 from ReadFilter.cpp:1:
/usr/include/jsoncpp/json/reader.h:56:3: note: declared here
   56 |   Reader();
      |   ^~~~~~
ReadFilter.cpp:196:41: error: conversion from 'void' to non-scalar type 'Json::Value' requested
  196 |     Json::Value glob = root.removeMember("global");
      |                        ~~~~~~~~~~~~~~~~~^~~~~~~~~~
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include/htslib -I/usr/include/fml -I/usr/include/jsoncpp -Wno-sign-compare -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wno-unknown-pragmas -g -O2 -fdebug-prefix-map=/libseqlib-1.1.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -c BamWriter.cpp -o libseqlib_la-BamWriter.o >/dev/null 2>&1

I don't know, if we can just discard the return value of removeMember (because it now returns void), or some more code changes are needed

tillea commented 3 years ago

An answer to this question (either by accepting the proposed patch or by stating that its not possible to do it this way) would be extremely helpful. If the patch might get accepted it would be great to include it into the new release tag (which I was asking for in pull request #53 Kind regards, Andreas.

LocutusOfBorg commented 3 years ago

Hello, ping?

walaj commented 3 years ago

Thanks for your patience (very busy month at the hospital) -- I completed this merge request and updated to the new Json CharReader. I also just removed the bundled Json in favor of using the system library version.

tillea commented 3 years ago

On Mon, Jan 04, 2021 at 01:54:05PM -0800, Jeremiah Wala wrote:

Thanks for your patience (very busy month at the hospital) -- I completed this merge request and updated to the new Json CharReader. I also just removed the bundled Json in favor of using the system library version. Thanks to you. Would you mind tagging a new release? Kind regards, Andreas.