Bug#1055567: Error: gscan2pdf fails to compile
Thank you Jeff for your persistent effort in tracking down the bug. It has given me a workaround to run gscan2pdf. As advised, I will raise a separate request for libsane. On 21/11/23 02:47, Jeff wrote: On 20/11/2023 17:51, Soumyanath Chatterjee wrote: soumyanath@ganak-desktop:~$ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/ gscan2pdf This one works. Please suggest what changes I need to make to run it normally For me, this isn't a problem with gscan2pdf, but with the way that libsane was compiled (or better, linked) against libusb. i.e. the problem can only be fixed by a new version of libsane. As you are using Ubuntu, I suggest you raise a bug against the libsane package: https://packages.ubuntu.com/search?keywords=libsane
Bug#1055567: Error: gscan2pdf fails to compile
On 20/11/23 17:03, Jeff wrote: What about: sudo ldconfig cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf If you start gscan2pdf as follows: LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/ gscan2pdf ? Can you start xsane, simple-scan or scanimage ? soumyanath@ganak-desktop:~$ sudo ldconfig [sudo] password for soumyanath: soumyanath@ganak-desktop:~$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf # Multiarch support /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu soumyanath@ganak-desktop:~$ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/ gscan2pdf This one works. Please suggest what changes I need to make to run it normally
Bug#1055567: Error: gscan2pdf fails to compile
On 19/11/23 21:35, Jeff wrote: It looks like the version of libusb libsane was built against is not the same as the one you are running with. There are some similarities here: https://askubuntu.com/questions/1264001/error-installing-xsane-sane-hplip-etc-with-undefined-symbol-libusb-set-optio What does the following return? apt-cache policy libsane1 libsane-common libimage-sane-perl libusb-1.0 soumyanath@ganak-desktop:~$ apt-cache policy libsane1 libsane-common libimage-sane-perl libusb-1.0 libsane1: Installed: 1.0.29-0ubuntu5.2 Candidate: 1.0.29-0ubuntu5.2 Version table: *** 1.0.29-0ubuntu5.2 500 500 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages 100 /var/lib/dpkg/status 1.0.29-0ubuntu5.1 500 500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages 1.0.29-0ubuntu5 500 500 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 Packages libsane-common: Installed: 1.0.29-0ubuntu5.2 Candidate: 1.0.29-0ubuntu5.2 Version table: *** 1.0.29-0ubuntu5.2 500 500 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 500 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages 100 /var/lib/dpkg/status 1.0.29-0ubuntu5.1 500 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages 1.0.29-0ubuntu5 500 500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages 500 http://in.archive.ubuntu.com/ubuntu focal/main i386 Packages libimage-sane-perl: Installed: 5-1 Candidate: 5-1 Version table: *** 5-1 500 500 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 Packages 100 /var/lib/dpkg/status libusb-1.0-0: Installed: 2:1.0.23-2build1 Candidate: 2:1.0.23-2build1 Version table: *** 2:1.0.23-2build1 500 500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages 100 /var/lib/dpkg/status libusb-1.0-0-dev: Installed: (none) Candidate: 2:1.0.23-2build1 Version table: 2:1.0.23-2build1 500 500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages libusb-1.0-doc: Installed: (none) Candidate: 2:1.0.23-2build1 Version table: 2:1.0.23-2build1 500 500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages 500 http://in.archive.ubuntu.com/ubuntu focal/main i386 Packages
Bug#1055567: Error: gscan2pdf fails to compile
On 19/11/23 16:15, Jeff wrote: Please reinstall the packages: sudo apt reinstall libsane1 libimage-sane-perl and try to start gscan2pdf again. This is what I get soumyanath@ganak-desktop:~$ gscan2pdf Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so' for module Image::Sane: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: l ibusb_set_option at /usr/share/perl/5.30/XSLoader.pm line 93. at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 144. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Document.pm line 12. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Document.pm line 12. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. Compilation failed in require at /usr/bin/gscan2pdf line 61. BEGIN failed--compilation aborted at /usr/bin/gscan2pdf line 61. Undefined subroutine ::Sane::_exit called at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 190. END failed--call queue aborted at /usr/bin/gscan2pdf line 61. ---
Bug#1055567: Error: gscan2pdf fails to compile
Please find the responses in red. On 16/11/23 02:22, jeff wrote: On 15/11/2023 12:19, Soumyanath Chatterjee wrote: I find line 8 is commented out I take it, therefore, that you didn't comment out the line yourself sometime in the past? How did you install gscan2pdf? I am not very sure. I think I installed it from ubuntu repository or might have taken it from sourceforge ls -l /usr/lib/x86_64-linux-gnu/libsane.so.1 lrwxrwxrwx 1 root root 17 Sep 17 2020 /usr/lib/x86_64-linux-gnu/libsane.so.1-> libsane.so.1.0.29 What about ls -l /usr/lib/x86_64-linux-gnu/libsane.so.1.0.29 -rw-r--r-- 1 root root 92232 Sep 17 2020 /usr/lib/x86_64-linux-gnu/libsane.so.1.0.29
Bug#1055567: Error: gscan2pdf fails to compile
Please find response to your questions below (in blue ) Regards Soumyanath Chatterjee / FIE, FIIE/ / / On 13/11/23 22:46, Jeff wrote: On 13/11/2023 16:24, Soumyanath Chatterjee wrote: DB<1> use Image::Sane ':all'; Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so' for module Image::Sane: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: l ibusb_set_option at /usr/share/perl/5.30/XSLoader.pm line 93. at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 144. If that failed, my first question is why you didn't see the same failure from the same line in /usr/share/perl5/Gscan2pdf/Scanner/Options.pm ? What do you see in line 8 of that file? I find line 8 is commented out package Gscan2pdf::Scanner::Options; use strict; use warnings; no if $] >= 5.018, warnings => 'experimental::smartmatch'; use Carp; use Glib qw(TRUE FALSE); # To get TRUE and FALSE # use Image::Sane ':all'; # For enums What do you get from ldd /usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so linux-vdso.so.1 (0x7ffc2831c000) libsane.so.1 => /usr/lib/x86_64-linux-gnu/libsane.so.1 (0x7f3ae5f7b000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f3ae5d89000) libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x7f3ae5b7b000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f3ae5b75000) libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x7f3ae59bb000) /lib64/ld-linux-x86-64.so.2 (0x7f3ae5fd4000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x7f3ae59b1000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f3ae598c000) libicuuc.so.66 => /usr/lib/x86_64-linux-gnu/libicuuc.so.66 (0x7f3ae57a6000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f3ae578a000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x7f3ae5761000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f3ae5612000) libicudata.so.66 => /usr/lib/x86_64-linux-gnu/libicudata.so.66 (0x7f3ae3b51000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f3ae396d000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f3ae3952000) ls -l /usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so -rw-r--r-- 1 root root 51192 Nov 24 2019 /usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so ls -l /usr/lib/x86_64-linux-gnu/libsane.so.1 lrwxrwxrwx 1 root root 17 Sep 17 2020 /usr/lib/x86_64-linux-gnu/libsane.so.1-> libsane.so.1.0.29 ? I tried to remove the comment in line 8 of /usr/share/perl5/Gscan2pdf/Scanner/Options.pm and run gscan2pdf both as normal user and as su. Here is the output from that: soumyanath@ganak-desktop:~$ gscan2pdf Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so' for module Image::Sane: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: l ibusb_set_option at /usr/share/perl/5.30/XSLoader.pm line 93. at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 144. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Document.pm line 12. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Document.pm line 12. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. Compilation failed in require at /usr/bin/gscan2pdf line 61. BEGIN failed--compilation aborted at /usr/bin/gscan2pdf line 61. Undefined subroutine ::Sane::_exit called at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 190. END failed--call queue aborted at /usr/bin/gscan2pdf line 61. soumyanath@ganak-desktop:~$ sudo gscan2pdf Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so' for module Image::Sane: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: l ibusb_set_option at /usr/share/perl/5.30/XSLoader.pm line 93. at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 144. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 8. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Document.pm line 12. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Document.pm line 12. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. Compilation failed in require at /usr/bin/gscan2pdf line 61. BEGIN failed--compilation aborted at /usr/bin/gsc
Bug#1055567: Error: gscan2pdf fails to compile
Please find the output: Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(-e:1): l DB<1> use Image::Sane ':all'; Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/Image/Sane/Sane.so' for module Image::Sane: /usr/lib/x86_64-linux-gnu/libsane.so.1: undefined symbol: l ibusb_set_option at /usr/share/perl/5.30/XSLoader.pm line 93. at /usr/lib/x86_64-linux-gnu/perl5/5.30/Image/Sane.pm line 144. Compilation failed in require at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2. at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2. main::BEGIN() called at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2 eval {...} called at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2 eval 'no strict; ($@, $!, $^E, $,, $/, $\\, $^W) = @DB::saved;package main; $^D = $^D | $DB::db_stop; use Image::Sane \':all\';; ' called at /usr/share/perl/5.30/perl5db.pl line 738 DB::eval called at /usr/share/perl/5.30/perl5db.pl line 3138 DB::DB called at -e line 1 BEGIN failed--compilation aborted at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2. at (eval 10)[/usr/share/perl/5.30/perl5db.pl:738] line 2. eval 'no strict; ($@, $!, $^E, $,, $/, $\\, $^W) = @DB::saved;package main; $^D = $^D | $DB::db_stop; use Image::Sane \':all\';; ' called at /usr/share/perl/5.30/perl5db.pl line 738 DB::eval called at /usr/share/perl/5.30/perl5db.pl line 3138 DB::DB called at -e line 1 DB<2> print SANE_NAME_PAGE_HEIGHT, "\n"; No comma allowed after filehandle at (eval 15)[/usr/share/perl/5.30/perl5db.pl:738] line 2. at (eval 15)[/usr/share/perl/5.30/perl5db.pl:738] line 2. eval 'no strict; ($@, $!, $^E, $,, $/, $\\, $^W) = @DB::saved;package main; $^D = $^D | $DB::db_stop; print SANE_NAME_PAGE_HEIGHT, "\\n";; ' called at /usr/share/perl/5.30/perl5db.pl line 738 DB::eval called at /usr/share/perl/5.30/perl5db.pl line 3138 DB::DB called at -e line 1 DB<3> On 12/11/23 22:52, Jeff wrote: Please start an interactive Perl session with: perl -d -e 1 Then execute the following: use Image::Sane ':all'; print SANE_NAME_PAGE_HEIGHT, "\n"; and report the response. Afterwards, you can quit with q
Bug#1055567: Error: gscan2pdf fails to compile
Tried running it but no log file is generated. Here is the console output: soumyanath@ganak-desktop:~$ gscan2pdf --log=log Bareword "SANE_NAME_SCAN_TL_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 128. Bareword "SANE_NAME_SCAN_TL_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 143. Bareword "SANE_NAME_SCAN_TL_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 145. Bareword "SANE_NAME_SCAN_BR_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 146. Bareword "SANE_NAME_SCAN_BR_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 149. Bareword "SANE_NAME_SCAN_TL_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 130. Bareword "SANE_NAME_SCAN_BR_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 131. Bareword "SANE_NAME_SCAN_BR_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 134. Bareword "SANE_NAME_PAGE_HEIGHT" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 116. Bareword "SANE_NAME_PAGE_WIDTH" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 122. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Document.pm line 12. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Document.pm line 12. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. Compilation failed in require at /usr/bin/gscan2pdf line 61. BEGIN failed--compilation aborted at /usr/bin/gscan2pdf line 61. Regards Soumyanath Chatterjee / FIE, FIIE/ Prod. Dev & SCM coach Former TVS Motors Chair Professor, IIT Kharagpur, INDIA *URL:* http://www.soumyanath.in *Ph:* +91 33 46004248(R) +91 98318 04223(M) *ORCiD:* -0003-4411-0669 <https://orcid.org/-0003-4411-0669> On 12/11/23 15:16, Jeff wrote: gscan2pdf --log=log
Bug#1055567: Error: gscan2pdf fails to compile
Thank you for your prompt reply. I run gscan2pdf from command prompt to get the error list. Here is the output you wanted: $apt list libimage-sane-perl Listing... Done libimage-sane-perl/focal,now 5-1 amd64 [installed,automatic] Please note: I do not have any scanner connected with my computer. Regards Soumyanath Chatterjee / FIE, FIIE/ Prod. Dev & SCM coach Former TVS Motors Chair Professor, IIT Kharagpur, INDIA *URL:* http://www.soumyanath.in *Ph:* +91 33 46004248(R) +91 98318 04223(M) *ORCiD:* -0003-4411-0669 <https://orcid.org/-0003-4411-0669> On 08/11/23 23:38, Jeff wrote: How are you starting gscan2pdf? What does the following return? apt list libimage-sane-perl Regards Jeff
Bug#1055567: Error: gscan2pdf fails to compile
Package: gscan2pdf Version: 2.13.2-0~ppa1focal OS: Kubuntu 20.04 Other details: No scanner is attached with the computer. I use gscan2pdf for stitching images scanned by a handheld scanner. The program worked perfectly till last Aug'23. Problem: gscan2pdf fails at command with the following error message. No logfile is generated. Error Message: Bareword "SANE_NAME_SCAN_TL_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 128. Bareword "SANE_NAME_SCAN_TL_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 143. Bareword "SANE_NAME_SCAN_TL_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 145. Bareword "SANE_NAME_SCAN_BR_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 146. Bareword "SANE_NAME_SCAN_BR_Y" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 149. Bareword "SANE_NAME_SCAN_TL_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 130. Bareword "SANE_NAME_SCAN_BR_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 131. Bareword "SANE_NAME_SCAN_BR_X" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 134. Bareword "SANE_NAME_PAGE_HEIGHT" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 116. Bareword "SANE_NAME_PAGE_WIDTH" not allowed while "strict subs" in use at /usr/share/perl5/Gscan2pdf/Scanner/Options.pm line 122. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Document.pm line 12. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Document.pm line 12. Compilation failed in require at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Gscan2pdf/Dialog/Renumber.pm line 7. Compilation failed in require at /usr/bin/gscan2pdf line 61. BEGIN failed--compilation aborted at /usr/bin/gscan2pdf line 61. Please help to resolve the problem. -- Regards Soumyanath Chatterjee / FIE, FIIE/ Prod. Dev & SCM coach Former TVS Motors Chair Professor, IIT Kharagpur, INDIA *URL:* http://www.soumyanath.in *Ph:* +91 33 46004248(R) +91 98318 04223(M) *ORCiD:* -0003-4411-0669 <https://orcid.org/-0003-4411-0669>