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

Povilas Kanapickas povilas at radix.lt
Mon Aug 19 23:06:44 BST 2019


Hi all,

On 8/19/19 4:08 PM, Olaf Meeuwissen wrote:
> 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.

Thanks for fixing this issue. For some reason I didn't get the original
email from Rolf.

Regards,
Povilas




More information about the sane-devel mailing list