sane-backends 1.1 compatibility
When building imagescane
(and presumably utsushi
) with sane-backends-1.1.1
I get the following error:
In file included from backend.cpp:56:
version.hpp:41:2: error: #error "SANE installation violates versioning portability constraints."
41 | #error "SANE installation violates versioning portability constraints."
| ^~~~~
Error comes from
#if !((SANE_MAJOR == SANE_CURRENT_MAJOR) && (SANE_MINOR == 0))
#error "SANE installation violates versioning portability constraints."
#endif
SANE_MAJOR
and SANE_MINOR
comes from package version (output of sane-config --version
command) eg. 1.1.1
would set SANE_MAJOR
to 1
and SANE_MINOR
to 1
. This does not play nicely with 2nd condition (SANE_MINOR == 0
), so effectively we fail. Dropping 2nd condition works around the problem, although I still don't see reasoning why such condition was created in the first place. SANE_CURRENT_MAJOR
and SANE_CURRENT_MINOR
are set in SANE header file (sane.h
) and seem to represent API version (they are set to 1
and 0
respectively for sane-backends-1.1.1
).