[sane-devel] Ubuntu 16.04 LTS cannot build recent Genesys backend

Rolf Bensch rolf at bensch-online.de
Tue Aug 20 10:49:27 BST 2019


Hi Olaf,

Many thanks for fixing this issue. Xenial is building again.

Cheers,
Rolf

Am 19.08.19 um 15:08 schrieb Olaf Meeuwissen:
> Hi Rolf,
> 
> Rolf Bensch writes:
> 
>> Hi Povilas,
>>
>> I just mentioned that your last work cannot be built from Ubuntu 16.04 LTS.
>>
>> This is the error message from Launchpad
>> (https://launchpadlibrarian.net/437734018/buildlog_ubuntu-xenial-amd64.sane-backends_1.0.28+git20190817-xenial0_BUILDING.txt.gz):
>>
>> genesys.cc: In function ‘void sanei_genesys_calculate_zmod(SANE_Bool, uint32_t, const std::vector<short unsigned int>&, unsigned int, unsigned int, unsigned int, uint32_t*, uint32_t*)’:
>> genesys.cc:1251:49: error: wrong number of template arguments (0, should be 1)
>>                                     0, std::plus<>());
> 
> The std::accumulate is iterating of slope_table which is declared as
> 
>   const std::vector<uint16_t>& slope_table
> 
> in the function's argument list so you'd need
> 
>   std::plus<uint16_t>
> 
>> I get the same error if I switch to '-std=c++11' and / or build SANE in
>> a Xenial VM. It seems to be a problem with 'old' gcc 5.x libraries.
> 
> GCC 5.x is *old* but seeing that Ubuntu supports Xenial for five years,
> i.e. until 2021, I guess we need to fix this.  Newer compiler version
> are able to make the same inference as I did above by themselves.
> 
>> Please fix this or give me a hint for additional compiler options.
> 
> Just pushed 5e74e1b7940e32b2a6f387410755149d21672a4f to fix this.  There
> are no other occurences of <> in any of the C++ code.
> 
>> Many thanks in advance.
> 
> You're welcome.
> 
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
>  GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
>  Support Free Software                        https://my.fsf.org/donate
>  Join the Free Software Foundation              https://my.fsf.org/join
> 



More information about the sane-devel mailing list