Hi,

Le 26/11/2017 à 22:01, Fabian Klötzl a écrit :
> Ho,
> 
> On 26.11.2017 19:32, Walter Landry wrote:
>> Andreas Tille <andr...@an3as.eu> wrote:
>>> Unfortunately I've hit another issue:
>>>
>>> ...
>>> classifier.h:428:54: error: the value of 'rank' is not usable in a constant 
>>> expression
>>>                      while((uint8_t)_hitMap[i].rank < rank) {
>>>                                                       ^~~~
>>> classifier.h:424:21: note: 'uint8_t rank' is not const
>>>              uint8_t rank = 0;
>>>                      ^~~~
>>
>> That is mysterious to me.  Is that the first error?
>>
> 
> That reminds me of an error where the `<` was mistaken for the opening
> angle brackets of a template. Flipping the order of the comparison or
> adding some extra parentheses might help.

Indeed, it seems gcc understand rank as std::rank, and maybe is trying
to read _hitMap[i].std::rank<rank> ("using namespace std" is used,
"rank" can also reference std::rank).

Reversing the order works: "while(rank > _hitMap[i].rank)".
Removing "using namespace std" is probably a better long-term solution
for upstream.

As a side note, I found the package to not build on 32 bits linux
because the ASM instruction "popcntq" doesn't exists. To avoid that
error, I used "export POPCNT_CAPABILITY=0" in debian/rules.
But I'm not sure this program is designed to run with less than 2GB of
memory anyway :) This flag is needed anyway if you want your package to
build for non-amd64 architecture.

I got a deb file after the following modifications:
 - Reversing the while condition (as said above)
 - Patching Makefile to take into account the DESTDIR variable, used by
Debian packaging scripts to set the target directory where to install
and uninstall files (that is, $(DESTDIR)$(prefix) instead of just $(prefix))
 - Add a dh_auto_install override to set "prefix" to /usr instead of
default /usr/local

And the generated .deb got several lintian warnings/errors:
W: centrifuge: wrong-bug-number-in-closes l3:#xxx
W: centrifuge: new-package-should-close-itp-bug
W: centrifuge: script-with-language-extension
usr/bin/centrifuge-BuildSharedSequence.pl
W: centrifuge: script-with-language-extension
usr/bin/centrifuge-RemoveEmptySequence.pl
W: centrifuge: script-with-language-extension usr/bin/centrifuge-RemoveN.pl
W: centrifuge: script-with-language-extension usr/bin/centrifuge-compress.pl
W: centrifuge: script-with-language-extension usr/bin/centrifuge-sort-nt.pl
W: centrifuge: binary-without-manpage usr/bin/centrifuge
W: centrifuge: binary-without-manpage
usr/bin/centrifuge-BuildSharedSequence.pl
W: centrifuge: binary-without-manpage
usr/bin/centrifuge-RemoveEmptySequence.pl
W: centrifuge: binary-without-manpage usr/bin/centrifuge-RemoveN.pl
W: centrifuge: binary-without-manpage usr/bin/centrifuge-build
W: centrifuge: binary-without-manpage usr/bin/centrifuge-build-bin
W: centrifuge: binary-without-manpage usr/bin/centrifuge-class
W: centrifuge: binary-without-manpage usr/bin/centrifuge-compress.pl
W: centrifuge: binary-without-manpage usr/bin/centrifuge-download
W: centrifuge: binary-without-manpage usr/bin/centrifuge-inspect
W: centrifuge: binary-without-manpage usr/bin/centrifuge-inspect-bin
W: centrifuge: binary-without-manpage usr/bin/centrifuge-sort-nt.pl
E: centrifuge: python-script-but-no-python-dep usr/bin/centrifuge-build
E: centrifuge: python-script-but-no-python-dep usr/bin/centrifuge-inspect
W: centrifuge: script-not-executable
usr/share/centrifuge/doc/strip_markdown.pl

So there is still some work to do after that ^^

> 
> I will do some more investigation, tomorrow.
> 
> Fabian
>

-- 
Alexis Murzeau
PGP: B7E6 0EBB 9293 7B06 BDBC  2787 E7BD 1904 F480 937F

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to