SANE Backend Driver for Canon PIXMA TR8520 Compilation Errors on Ubuntu Linux 20.04 with GNOME Desktop
I just compiled the backends of the SANE project that come with a driver for use with the scanner component of my multifunction Canon PIXMA TR8520 device. To do so, I first cloned the repository in which these backends were found, by running the following command in the terminal:
git clone https://gitlab.com/sane-project/backends
I then reached the backends folder on my computer using the cd command. Then, I ensured that I had all of the required file dependencies installed. Then, I completed the next step towards compiling these driver backends, as outlined in the instruction inside of the Install.linux, that could be read by opening this file with a text editor. I did so by typing the following command in the terminal:
./autogen.sh
Then, the following warnings came up in the terminal:
autoreconf: running: aclocal --force --warnings=all -I m4
autoreconf: running: /usr/bin/autoconf --force --warnings=all
autoreconf: running: /usr/bin/autoheader --force --warnings=all
autoreconf: running: automake --add-missing --copy --force-missing --warnings=all
backend/Makefile.am:33: warning: '%'-style pattern rules are a GNU make extension
backend/Makefile.am:37: warning: '%'-style pattern rules are a GNU make extension
backend/Makefile.am:33: warning: '%'-style pattern rules are a GNU make extension
backend/Makefile.am:37: warning: '%'-style pattern rules are a GNU make extension
What does that mean? What can I do to fix these warnings? I have checked to ensure that I have the m4 library installed by using the Synaptic Package Manager; and I do!
Then, I continued on to the next step, and ran the following command with the option displayed below:
./configure --enable-locking
I got the following errors:
configure: WARNING: Group uucp does not exist on this system.
configure: WARNING: Locking feature will be disabled.
*** pint backend requires sys/scanio.h - disabling
*** v4l backend requires v4l libraries - disabling
*** pnm backend not manually selected - disabling
From doing a web search, it looks like sys/scanio.h is some source code made for NetBSD. I am not running NetBSD. I am running Ubuntu Linux 20.04. Do I need sys/scanio.h for my SANE backend to work properly? What do those errors mean and what should I do to fix them?
I tried seeing what would happpen if I ran the ./configure command with parameters that are more specific to my scanner. So, I ran the following code:
./configure BACKENDS="escl" --enable-locking
Yet, I still got either errors or warnings. They were the following:
configure: WARNING: Group uucp does not exist on this system.
configure: WARNING: Locking feature will be disabled.
checking whether to enable device locking... no
Lockfiles: Feature is disabled!
POPPLER_GLIB support: no
I have uucp installed in my system as well as the popple glib. So, I don't really know what is going on here. Yet, what I am most concerned about is the fact that enable device locking says no. How can I change that to say yes when I have already tried the --enable-locking option on the ./configure file?
Then, I tried actually compiling the code by using the following command:
make
Yet, the compilation resulted in the following warnings and errors:
sanei_scsi.c:1948:9: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
1948 | system ("cat /proc/scsi/sg/debug 1>&2");)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/sane/sanei_debug.h:153:25: note: in definition of macro ‘IF_DBG’
153 | # define IF_DBG(x) x
| ^
sanei_scsi.c: In function ‘sanei_scsi_req_wait’:
sanei_scsi.c:2262:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
2262 | system ("cat /proc/scsi/sg/debug 1>&2");)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/sane/sanei_debug.h:153:25: note: in definition of macro ‘IF_DBG’
153 | # define IF_DBG(x) x
| ^
sanei_scsi.c: In function ‘sanei_proc_scsi_find_devices’:
sanei_scsi.c:2820:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
2820 | fgets (line, sizeof (line), proc_fp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sanei_auth.c:95:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
95 | fread (buffer, 1, 4, dev_urandom);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
artec.c:3575:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
3575 | write (debug_fd, temp_buf, nread);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
escl/escl_devices.c:87:13: warning: ‘is’ may be used uninitialized in this function [-Wmaybe-uninitialized]
87 | escl_device_add(port, name, a, is, uuid, (char*)type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
as6e.c:148:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
148 | read (s->as6e_params.ctlinpipe, &written, sizeof (written));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
as6e.c:214:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
214 | read (s->as6e_params.ctlinpipe, &written, sizeof (written));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
as6e.c: In function ‘sane_as6e_close’:
as6e.c:520:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
520 | write (s->as6e_params.ctloutpipe, &repeat, sizeof (repeat));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
as6e.c: In function ‘as6e_open’:
as6e.c:582:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
582 | write (ctlinpipe[WRITEPIPE], &exec_result, sizeof (exec_result));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then, to finish compiling and installing this backend for my scan driver, I ran the following command:
sudo make install
This caused the terminal to bring-up the following errors:
/usr/include/poppler/glib/poppler.h:22:10: fatal error: glib-object.h: No such file or directory
22 | #include
| ^~~~~~~~~~~~~~~
compilation terminated.
Then, to test if my scanner was now working, I ran the following command on the terminal:
scanimage
Yet, it did not work. Instead, I received the following message from the terminal:
Output format is not set, using pnm as a default.
scanimage: open of device pixma:04A91823 failed: Device busy
I am basically just trying to get my multifunction device's scanner to work with Ubuntu 20.04 with a free device driver. The scangearmp2 driver that was supplied by the manufacturer for it did not work, so I am trying the SANE backend. Can anyone help me, please?
I would appreciate any assistance with getting this to work.
You will find a more complete copy of what the terminal outputted while I was trying to compile and install the SANE backend driver; for my computer to scan through my Canon PIXMA TR8520 device; in the attached file: SANE_Backend_Compilation_Output