[sane-devel] problem with sane-backends-1.0.28 and gnu c++ 4.9.0

r. a. schmied uwppp at flash.net
Sat Sep 28 18:48:09 BST 2019

Olaf Meeuwissen wrote:
> Hi,
> r. a. schmied writes:
>>platform: Solaris 10 10/09 s10s_u8wos_08a SPARC
>>compiler: g++ (GCC) 4.9.0
>>scanner: canoscan lide200 (genesys gl847)
>>usblib: 0.1.7 (shipped with solaris)
>>notes: sane-backends 1.0.27 and sane-backends-master-e13b80fa built
>>       and work so issue is with new c++ genesys implementation or
>>       in other words my antiquated system and tools
>>i have tried -std=c++11, -std=c++14, -std=gnu++11 and -std=gnu++14 without
>>any change so either my c++ math headers are inadequate or i need additional
>>pow overloading declarations or ???.
> It would help if you mention which git revision you're using when you
> get these errors.  The genesys backend code is changing on an almost
> daily basis :-)

aloha olaf

well got a static tarball from gitlab iirc, is dated 2019-09-14 15:54:37 -0700

i had hoped that once the release hit the skids the changes would slow
down a bit, wishful thinking on my part.

> Recently some changes were made to get it to build again on Ubuntu 16.04
> which also uses an "ancient" C++ compiler (g++-5.4.0, I believe).

if g++-5.4.0 is ancient 4.9.0 must be pre-historic :-)

> If you still have compile errors, please attach your config.log and a
> full log of your `make` output.  A .tar.gz attachment is fine.

have yet to do anything beyond make all check which all tests run pass.
made following casts to the 3 offending pow errors i encountered.  i believe
they are safe from inadvertently changing the parameter, but would like
an expert to concur (opine).

2 in backend/genesys.cc
around 761 line changed from
   value = gamma_max * pow ((float) i / size, 1.0 / gamma);
   value = gamma_max * pow ((float) i / size, (float) 1.0 / gamma);

around 1211 line changed from
  exposure_factor = pow (2, tgtime);	/* todo: originally, this is always 2^0 ! */
  exposure_factor = pow ((double) 2, (double) tgtime);	/* todo: originally, this is always 2^0 ! 

1 in backend/genesys_low.cc
line around 157 changed from
	   pixels_per_line, lines, (int) pow (2, depth) - 1);
	   pixels_per_line, lines, (int) pow ((double) 2, (double) depth) - 1);

i actually wrapped each in a conditional for solaris, but have yet to rebuild
will submit the diffs when i've actually done a scan or 4.

as for the configure autofoo stuff; yeah that was a bit of a struggle and still
have a problem not having the newest and greatest libtool 2.4.6.  is there a
requirement for 2.4.6 unmet with an older (err ancient) version like 2.2.6?
note: looks like LT_PREREQ([2.4.6]) was added at sane-backends-master-e13b80fa,
sane-backends-1.0.27 had no LT_PREREQ criterion at all.


> 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