Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sane-backends: fails to find any scanners #224569

Closed
dacioromero opened this issue Apr 4, 2023 · 6 comments · Fixed by #225339
Closed

sane-backends: fails to find any scanners #224569

dacioromero opened this issue Apr 4, 2023 · 6 comments · Fixed by #225339

Comments

@dacioromero
Copy link
Contributor

dacioromero commented Apr 4, 2023

Describe the bug

Simple Scan, Skanlite, and scanimage -L fail to find any scanners immediately on nixos-unstable.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Have a WiFi enabled printer/scanner.
  2. Enable avahi w/ nssmdns and sane
    {
      services.avahi.enable = true;
      services.avahi.nssmdns = true;
      hardware.sane.enable = true;
    }
  3. Run scanimage -L and observe

Expected behavior

SANE should be able to find printers and webcams (v4l).

Screenshots

N/A

Additional context

Reverting to sane-backends 1.1.1 allows scanimage -L to search for scanners again. 1.2.1 might be bugged or require more configuration.

#216017

Notify maintainers

@symphorien

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.21, NixOS, 23.05 (Stoat), 23.05.20230330.e3652e0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos"`
 - channels(xxxxx): `"home-manager-22.05.tar.gz"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@symphorien
Copy link
Member

I can reproduce: scanimage -L does not list anything. What is weird is that it works on top of #216017 but not on your commit anymore e3652e0
I tried to bisect it, but I end up in a staging iteration:

$  git bisect log
git bisect start
# status : en attente d'un commit bon et d'un commit mauvais
# bad: [e3652e0735fbec227f342712f180f4f21f0594f2] Merge pull request #218587 from sephii/python-wagtail
git bisect bad e3652e0735fbec227f342712f180f4f21f0594f2
# status : en attente de bon(s) commit(s), un mauvais commit connu
# good: [f0ddf281c593b82a2bd11110e8147ba85a1de70c] sane-backends: 1.1.1 -> 1.2.1
git bisect good f0ddf281c593b82a2bd11110e8147ba85a1de70c
# good: [90ef5c3c337d8d9f0c97e7641ece70a41f6c16a2] Merge pull request #219870 from mweinelt/evcc-0.114.1
git bisect good 90ef5c3c337d8d9f0c97e7641ece70a41f6c16a2
# good: [7dcef0a1e28f55f887e88e545b6f3544b5c375e7] Merge pull request #219777 from r-ryantm/auto-update/tdb
git bisect good 7dcef0a1e28f55f887e88e545b6f3544b5c375e7
# good: [2e4e45290e8a0e178642ae2414de558ecca0041a] Merge pull request #222930 from Ma27/bump-nextcloud
git bisect good 2e4e45290e8a0e178642ae2414de558ecca0041a
# bad: [ca7c52c4f514952d9cb70a20364f93f1a84e8b49] Merge pull request #222762 from Kiskae/nvidia/530.41.03
git bisect bad ca7c52c4f514952d9cb70a20364f93f1a84e8b49
# bad: [07fb9cae4e13da222e9d356d34e990c162f08a51] Merge master into staging-next
git bisect bad 07fb9cae4e13da222e9d356d34e990c162f08a51
# skip: [d970a8103542838477286f0aa5f6b2c2b4d8a630] Merge branch 'staging' into staging-next
git bisect skip d970a8103542838477286f0aa5f6b2c2b4d8a630
# good: [cceff04ce9c2c4cc3eab27a10dd220cc5c381b3d] mongodb-4_2: 4.2.19 -> 4.2.24
git bisect good cceff04ce9c2c4cc3eab27a10dd220cc5c381b3d
# skip: [1fab86929f7df5cdd60bcf65b4c78f4058777a03] nixos/pipewire: spring cleaning
git bisect skip 1fab86929f7df5cdd60bcf65b4c78f4058777a03
# skip: [764dd10ac0d7700d065571c438953a12aea84cf3] iproute2: 6.1.0 -> 6.2.0
git bisect skip 764dd10ac0d7700d065571c438953a12aea84cf3
# good: [89e0570cab7e8858edad5054f0cbb35a104a7d44] Merge pull request #223078 from wegank/scons-latest
git bisect good 89e0570cab7e8858edad5054f0cbb35a104a7d44
# skip: [05aaf0ddc5bdb6cc4e66fd18b0de70a4d06c6e4a] Merge pull request #219465 from erdnaxe/readline-strictdeps
git bisect skip 05aaf0ddc5bdb6cc4e66fd18b0de70a4d06c6e4a
# good: [7590ada96f561c77b9c5b9e564ab684b9eb34d97] liburcu: add changelog to meta
git bisect good 7590ada96f561c77b9c5b9e564ab684b9eb34d97
# good: [8b0faba367f833e9233172860233fe2b7e3eb503] python310Packages.scmrepo: 0.1.16 -> 0.1.17
git bisect good 8b0faba367f833e9233172860233fe2b7e3eb503
# skip: [7060259b5bc782e9630dc1e2122f0b7154259ab6] Merge pull request #219692 from r-ryantm/auto-update/iproute2
git bisect skip 7060259b5bc782e9630dc1e2122f0b7154259ab6
# skip: [00dff290ed9e4938d06403a69aa4083497178643] Merge staging-next into staging
git bisect skip 00dff290ed9e4938d06403a69aa4083497178643
# skip: [52ffebb7a7a6fb1ad2d64e8099451d0cbb281e68] ruby: add strictDeps
git bisect skip 52ffebb7a7a6fb1ad2d64e8099451d0cbb281e68
# skip: [1e5a594e686f5154b706dfab68550f9f3bde675e] spandsp: enableParallelBuilding = true
git bisect skip 1e5a594e686f5154b706dfab68550f9f3bde675e
# skip: [79cfdf110a45c668879686546e36672dced2426c] Merge pull request #219351 from tie/make-bios-bootable
git bisect skip 79cfdf110a45c668879686546e36672dced2426c

So the culprit is likely to be another dep, maybe curl because I suspect you use the escl backend?

@dacioromero
Copy link
Contributor Author

I feel like there's more to it than that. 1.2.1 fails to find even my webcam and the failure is immediate with no signs of actually having doing anything to search.

@ulrikstrid
Copy link
Member

I have this issue as well. scanimage -L doesn't find anything, but sane-find-scanner find it like this: found possible USB scanner (vendor=0x04a9 [Canon], product=0x174a [MG6100 series]) at libusb:002:002

@symphorien
Copy link
Member

sane is actually not loading any plugins anymore: running LD_DEBUG=files scanimage -L does not show messages like

    813331:	file=/etc/sane-libs/libsane-canon.so.1 [0];  dynamically loaded by /nix/store/fvxr6brg9bhdi4k5x71f7kr9qsg8ipxg-sane-backends-1.0.32/lib/libsane.so.1 [0]

symphorien added a commit to symphorien/nixpkgs that referenced this issue Apr 8, 2023
for some reason that prevents libsane from finding plugins

Fixes NixOS#224569
@symphorien
Copy link
Member

Bisected down to

$  git bisect view --graph --oneline
*   f2499cd5ec2 Merge pull request #221215 from samuela/samuela/snappy
|\  
| * c3a42a047cf snappy: 1.1.9 -> 1.1.10
* 19680e9902c Merge pull request #217568 from trofi/stdenv-parallel-install
* 578fb7fd1ff Merge pull request #220557 from mweinelt/libxcrypt-strong
* 4472cf44eba treewide: Make yescrypt the default algorithm for pam_unix.so
* 909f394f28c pam: Make libxcrypt a non-optional dependency
* 0d7cd666520 nixos/users-groups: Update password scheme validation
* 4e300e071b9 libxcrypt: Build only with strong hashes

and weirdly disabling parallel installs (ie undoing 19680e9) does fix the issue, I don't know why.

Please test #225339 to confirm it is the right solution.

@dacioromero
Copy link
Contributor Author

I overlayed your PR into my configuration and now scanimage -L works!

symphorien added a commit to symphorien/nixpkgs that referenced this issue Apr 10, 2023
parallel install creates a bad symlink at $out/lib/sane/libsane.so.1
which prevents finding plugins.

Fixes NixOS#224569
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants