GNU bug report logs - #38929
sane-hpaio not found by simple-scan?

Previous Next

Package: guix;

Reported by: Arne Babenhauserheide <arne_bab <at> web.de>

Date: Sat, 4 Jan 2020 22:39:01 UTC

Severity: normal

To reply to this bug, email your comments to 38929 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#38929; Package guix. (Sat, 04 Jan 2020 22:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arne Babenhauserheide <arne_bab <at> web.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 04 Jan 2020 22:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: bug-guix <at> gnu.org
Subject: sane-hpaio not found by simple-scan?
Date: Sat, 04 Jan 2020 23:38:46 +0100
I have a scanner in HP Photosmart C3100 series. Using simple-scan I get
the information that I need to install the driver sane-hpaio.

But simple-scan has sane-backends as input for which the Guix source file
says "This variant links in the hpaio backend, provided by hplip".

So somehow simple-scan does not find ~/.guix-profile/lib/sane/hpaio.so.1
(which exists).

It actually works when I call it as follows:

LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$HOME/.guix-profile/lib" simple-scan

But this cannot be the proper solution.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken




Information forwarded to bug-guix <at> gnu.org:
bug#38929; Package guix. (Wed, 10 Feb 2021 12:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 38929 <at> debbugs.gnu.org (full text, mbox):

From: raid5atemyhomework <raid5atemyhomework <at> protonmail.com>
To: "38929 <at> debbugs.gnu.org" <38929 <at> debbugs.gnu.org>
Subject: Re: sane-hpaio not found by simple-scan?
Date: Wed, 10 Feb 2021 12:32:44 +0000
I have a USB-connected HP DeskJet Ink Advantage 1515 printer/scanner.

On my own system (this is a full Guix System, not Guix on a foreign distro) I modified the configuration.scm:

```scheme
(use-package-modules #;... scanner)

(operating-system
  #;...
  (services
    (append
      #;...
      (modify-services %desktop-services
        (sane-service-type _ => sane-backends))))
  #;...)
```

After `sudo guix system reconfigure configuration.scm`, `simple-scan` still could not find it.  However, on reboot, it was able to find my already-connected USB printer/scanner without any issues.

Perhaps only some kind of force-trigger of `udev` would be needed after the above setup, but `udev` is pretty early in the Shepherd tree.

On the other hand the `sane-service-type` documentation in `info guix` is ***severely*** lacking, and the documentation is somehow lost in the middle of documentation about geolocation services, so it should probably be fixed.

Thanks
raid5atemyhomework




Information forwarded to liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, noelopez <at> free.fr, vivien <at> planete-kraus.eu, bug-guix <at> gnu.org:
bug#38929; Package guix. (Mon, 09 Jun 2025 13:22:01 GMT) Full text and rfc822 format available.

Message #11 received at 38929 <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: guix-patches <at> gnu.org,
	38929 <at> debbugs.gnu.org
Cc: Rostislav Svoboda <Rostislav.Svoboda <at> gmail.com>
Subject: [PATCH] gnu: simple-scan: enable scanning over network for eSCL/WSD
 scanners
Date: Mon,  9 Jun 2025 15:21:03 +0200
* gnu/packages/gnome.scm (simple-scan)[inputs]: Add sane-airscan.
<#:phases>: Wrap simple-scan to set
  - LD_LIBRARY_PATH to sane-airscan's lib/sane
  - SANE_CONFIG_DIR to sane-airscan's etc/sane.d

This change allows simple-scan to automatically detect and use eSCL or WSD
(AirScan) backends over the network.

Change-Id: Id1d95c77c3fc549b7baf91d31049541a687bce2d
---
 gnu/packages/gnome.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 56236013a7..3bc26192ff 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7330,7 +7330,19 @@ (define-public simple-scan
         (base32 "1aghnkvjdyj73kv55nd9gl5b1xjkpcxjn4j3a6z67r9g2j86avn1"))))
     (build-system meson-build-system)
     (arguments
-     '(#:glib-or-gtk? #t))
+     (list
+      #:glib-or-gtk? #t
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'wrap-flatpak
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((simple-scan (string-append #$output "/bin/simple-scan"))
+                    (sane-airscan-inputs (assoc-ref inputs "sane-airscan")))
+                (wrap-program simple-scan
+                  `("LD_LIBRARY_PATH" =
+                    (,(string-append sane-airscan-inputs "/lib/sane")))
+                  `("SANE_CONFIG_DIR" prefix
+                    (,(string-append sane-airscan-inputs "/etc/sane.d"))))))))))
     (native-inputs
      (list gettext-minimal
            itstool
@@ -7347,6 +7359,7 @@ (define-public simple-scan
            gdk-pixbuf
            gusb
            libadwaita
+           sane-airscan
            sane-backends))
     (home-page "https://gitlab.gnome.org/GNOME/simple-scan")
     (synopsis "Document and image scanner")

base-commit: 03ce76718c41b32d174713c945d269d6fcdd8bf1
-- 
2.49.0





Information forwarded to bug-guix <at> gnu.org:
bug#38929; Package guix. (Mon, 09 Jun 2025 18:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 38929 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>, 78732 <at> debbugs.gnu.org, 
 38929 <at> debbugs.gnu.org
Cc: Noé Lopez <noelopez <at> free.fr>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#78732] [PATCH] gnu: simple-scan: enable scanning over
 network for eSCL/WSD scanners
Date: Mon, 09 Jun 2025 20:34:02 +0200
Am Montag, dem 09.06.2025 um 15:21 +0200 schrieb Rostislav Svoboda:
> * gnu/packages/gnome.scm (simple-scan)[inputs]: Add sane-airscan.
> <#:phases>: Wrap simple-scan to set
>   - LD_LIBRARY_PATH to sane-airscan's lib/sane
>   - SANE_CONFIG_DIR to sane-airscan's etc/sane.d
> 
> This change allows simple-scan to automatically detect and use eSCL
> or WSD (AirScan) backends over the network.
> 
> Change-Id: Id1d95c77c3fc549b7baf91d31049541a687bce2d
The LD_LIBRARY_PATH looks suspicious.  Is there any way around it using
other SANE tooling?

Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#38929; Package guix. (Mon, 09 Jun 2025 19:39:02 GMT) Full text and rfc822 format available.

Message #17 received at 38929 <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, 38929 <at> debbugs.gnu.org,
 78732 <at> debbugs.gnu.org, Noé Lopez <noelopez <at> free.fr>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#78732] [PATCH] gnu: simple-scan: enable scanning over
 network for eSCL/WSD scanners
Date: Mon, 9 Jun 2025 21:38:10 +0200
[Message part 1 (text/plain, inline)]
Hello

> The LD_LIBRARY_PATH looks suspicious.

What exactly is suspicious?

>  Is there any way around it using other SANE tooling?

AFAIK there's no simpler runtime-only solution:
- You could use patchelf to prepend the store's lib/sane directory
onto the binary's RPATH, but that's as even even more fiddly as
setting LD_LIBRARY_PATH
- sane-config only spits out compile-time flags (-I..., -L...,
-lsane); it doesn't tell the loader where to find backends at runtime.

BTW, I've polished the patch. Please ignore the previous one - the
phase name was wrong ("wrap-flatpak" instead of "wrap-simple-scan").


Cheers
[0001-gnu-simple-scan-enable-scanning-over-network-for-eSC.patch (text/x-patch, attachment)]

This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.