Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740688 - >=net-print/hplip-3.20.6-r1: /usr/bin/hp-check hangs on checking for jpeglib.h
Summary: >=net-print/hplip-3.20.6-r1: /usr/bin/hp-check hangs on checking for jpeglib.h
Status: RESOLVED DUPLICATE of bug 721018
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
: 740694 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-06 13:43 UTC by tt_1
Modified: 2020-10-06 10:44 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (emerge-info,7.75 KB, text/plain)
2020-09-06 14:03 UTC, tt_1
Details
reverted original patch (hplip-3.20.5-utils-symlink.patch,701 bytes, patch)
2020-10-03 11:47 UTC, Daniel Pielmeier
Details | Diff
new approach (hplip-3.20.6-utils-symlink.patch,677 bytes, patch)
2020-10-03 11:48 UTC, Daniel Pielmeier
Details | Diff
new approach (hplip-3.20.6-utils-symlink.patch,733 bytes, patch)
2020-10-03 12:27 UTC, Daniel Pielmeier
Details | Diff
compressed log (hp-check.log.gz,30.43 KB, application/gzip)
2020-10-03 12:39 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2020-09-06 13:43:24 UTC
I was trying to debug hplip, to see wether there are any obvious problem that went unnoticed and tried to use hp-check as a tool for diagnose. Turns out, it hangs: 

user@tuxbox ~ $ hp-check -r -g
Saving output in log file: /home/tim/hp-check.log

HP Linux Imaging and Printing System (ver. 3.20.6)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to      
successfully compile HPLIP.                                                                                                                                                             
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies  
installed to successfully run.                                                                                                                                                          
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).                              

Check types:                                                                                                                                                                            
a. EXTERNALDEP - External Dependencies                                                                                                                                                  
b. GENERALDEP - General Dependencies (required both at compile and run time)                                                                                                            
c. COMPILEDEP - Compile time Dependencies                                                                                                                                               
d. [All are run-time checks]                                                                                                                                                            
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                                                        

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

hp-check[4546]: debug: ['unknown', 'mepis', 'debian', 'suse', 'mandriva', 'fedora', 'redhat', 'rhel', 'slackware', 'gentoo', 'redflag', 'ubuntu', 'xandros', 'freebsd', 'linspire', 'ark', 'pclinuxos', 'centos', 'igos', 'linuxmint', 'linpus', 'gos', 'boss', 'lfs', 'manjarolinux']
hp-check[4546]: debug: HPLIP Description= Public version=3.20.6 Internal version = 3.20.6
hp-check[4546]: debug: Determining distro...
hp-check[4546]: debug: Able to detect distro
hp-check[4546]: debug: Distro name=gentoo
hp-check[4546]: debug: Distro version=2.7
hp-check[4546]: debug: distro=9, distro_version=2.7
hp-check[4546]: debug: Enable PPD install: True (False=drv)
hp-check[4546]: debug: Default UI toolkit: Qt5
hp-check[4546]: debug: Checking for dependency 'epm'...

hp-check[4546]: debug: Checking: epm --version (min ver=0.000000)
hp-check[4546]: debug: Not found!
hp-check[4546]: debug: have epm = False
hp-check[4546]: debug: Checking for dependency 'automake'...

hp-check[4546]: debug: Checking: automake --version (min ver=0.000000)
hp-check[4546]: debug: automake (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.

hp-check[4546]: debug: Found.
hp-check[4546]: debug: have automake = True
hp-check[4546]: debug: Checking for dependency 'libjpeg'...

hp-check[4546]: debug: Checking for library 'libjpeg'...
hp-check[4546]: debug: Found.
hp-check[4546]: debug: Searching for file 'jpeglib.h' in '/usr/include'...
 
the search hangs for about a minute, and after a minute it keeps on hanging but does consume 100% of one cpu core
Comment 1 tt_1 2020-09-06 14:03:12 UTC
Created attachment 658752 [details]
output from emerge --info
Comment 2 tt_1 2020-09-06 15:52:22 UTC
*** Bug 740694 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Pielmeier gentoo-dev 2020-09-23 19:02:15 UTC
Hm, I can not reproduce this. The patch applied fixing this issue is applied since 3.20.5.
Comment 4 tt_1 2020-09-25 17:09:19 UTC
the bug only manifests itself if net-libs/nodejs is emerge, at least on my system.  there might be other packages involved triggering this?
Comment 5 Daniel Pielmeier gentoo-dev 2020-09-25 21:13:29 UTC
There is a patch applied which should ignore symlinks like the one for nodejs. It does not hang there for me!
Comment 6 tt_1 2020-10-03 10:50:31 UTC
the fix must be incomplete then, I'm able to reproduce 100%: with nodejs emerged hp-check hangs, and when I remove it temporarily it doesn't anymore.
Comment 7 Daniel Pielmeier gentoo-dev 2020-10-03 11:47:23 UTC
(In reply to tt_1 from comment #6)
> the fix must be incomplete then, I'm able to reproduce 100%: with nodejs
> emerged hp-check hangs, and when I remove it temporarily it doesn't anymore.

Maybe! For somebody on the upstream bug tracker this fix also did not work and he tried something different.

As it works for me you have to try this yourself. As there is no patch provided for his modifications I compared his file (/usr/share/hplip/base/utils.py) with the hplip version for which he reported it. For some reasons his(?) changes were commented and he uncommented only the same two lines as in the original patch. So I suppose his additions have to be uncommented and the original changes reverted.

I will attach two files. The first shows the reverted original patch (hplip-3.20.5-utils-symlink.patch). Here you have to add the comments back! The second adds the new changes (hplip-3.20.6-utils-symlink.patch). This lines you have to add at the proper location.
Comment 8 Daniel Pielmeier gentoo-dev 2020-10-03 11:47:57 UTC
Created attachment 663592 [details, diff]
reverted original patch
Comment 9 Daniel Pielmeier gentoo-dev 2020-10-03 11:48:12 UTC
Created attachment 663595 [details, diff]
new approach
Comment 10 tt_1 2020-10-03 12:14:19 UTC
hey, thanks for your reply. I dropped both patches into /etc/portage/patches and they were applied on top of =hplip-3.20.6-r1, however that made it only more angry:

hp-check -r -g
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 39, in <module>
    from base import utils, tui, queues, smart_install
  File "/usr/share/hplip/base/utils.py", line 277
    if os.path.islink(fullname):
                               ^
TabError: inconsistent use of tabs and spaces in indentation
Comment 11 Daniel Pielmeier gentoo-dev 2020-10-03 12:27:39 UTC
Created attachment 663598 [details, diff]
new approach
Comment 12 Daniel Pielmeier gentoo-dev 2020-10-03 12:29:56 UTC
(In reply to tt_1 from comment #10)
> hey, thanks for your reply. I dropped both patches into /etc/portage/patches
> and they were applied on top of =hplip-3.20.6-r1, however that made it only
> more angry:
> 
> hp-check -r -g
> Traceback (most recent call last):
>   File "/usr/bin/hp-check", line 39, in <module>
>     from base import utils, tui, queues, smart_install
>   File "/usr/share/hplip/base/utils.py", line 277
>     if os.path.islink(fullname):
>                                ^
> TabError: inconsistent use of tabs and spaces in indentation

Now it is just python being picky about indentation and mixing tabs and spaces. Try the new hopefully correct patch.
Comment 13 tt_1 2020-10-03 12:39:43 UTC
Created attachment 663601 [details]
compressed log

that's better, thank you 

the hp-check binary still isn't fully working but now there's at least some output when used with --debug instruction. 

I stopped the output after ten seconds, it keeps going like that non stop at circa 10mb of log size per minute.
Comment 14 Daniel Pielmeier gentoo-dev 2020-10-03 12:45:12 UTC
(In reply to tt_1 from comment #13)
> Created attachment 663601 [details]
> compressed log
> 
> that's better, thank you 
> 
> the hp-check binary still isn't fully working but now there's at least some
> output when used with --debug instruction. 
> 
> I stopped the output after ten seconds, it keeps going like that non stop at
> circa 10mb of log size per minute.

Another thing to try is not reverting the initial patch.

Sorry, I don't have the time to dig into this. If it still does not work you can add your voice to the upstream bug tracker. Hopefully they will fix it but as this one is open since 2011!?
Comment 15 Daniel Pielmeier gentoo-dev 2020-10-06 10:44:44 UTC

*** This bug has been marked as a duplicate of bug 721018 ***