I am trying to get the buttons on my Canon CanoScan LiDE 60 to work. So far I installed the sane-utils
, the printer is detected and I can scan. However the front buttons on the scanner are not detected by SANE. I read in this case, one should compile scandb
from sources and run ./configure --enable-scanbuttond
which I did and then run make. However make
doesn't complete, as there is a warning which is treated as an error:
config.c: In function ‘cfg_do_parse’:
config.c:117:5: error: ‘strncpy’ specified bound 4096 equals destination size [-Werror=stringop-truncation]
strncpy(config_file, config_file_name, PATH_MAX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:503: config.o] Error 1
make[1]: Leaving directory '/usr/local/src/scanbd-1.5.1/src/scanbd'
make: *** [Makefile:425: all-recursive] Error 1
Is there either a simpler way to get the buttons working or how can I compile scanbd to get my buttons to work?
The warning that's being treated as an error By the C compiler is causing the compilation to fail.
You can have it treated as a warning by compiling with the following:
make CFLAGS="-Wno-error=stringop-truncation"
If you receive errors where it's the CXX compiler:
make CXXLAGS="-Wno-error=format-truncation"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments