Bug 208142 - print/hplip 3.16
Summary: print/hplip 3.16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-19 16:55 UTC by Loïc Bartoletti
Modified: 2016-05-11 07:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (makc)


Attachments
patch (8.80 KB, patch)
2016-03-20 15:01 UTC, Tijl Coosemans
no flags Details | Diff
screenshot (57.22 KB, image/png)
2016-04-19 04:06 UTC, Loïc Bartoletti
no flags Details
patch (844 bytes, patch)
2016-04-19 07:25 UTC, Tijl Coosemans
no flags Details | Diff
patch2 (795 bytes, patch)
2016-04-20 09:03 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer freebsd_triage 2016-03-19 16:55:54 UTC
Since hplip is 3.16 I can't print with HP_LaserJet_Professional_M1212nf_MFP.

Driver is available in ppd but not installed (see pkg-plist) and have some error with foomatic:
HP_LaserJet_Professional_M1212nf_MFP: File \"/usr/local/libexec/cups/filter/foomatic-rip-hplip\" not available: No such file or directory

Worked nice with hplip 3.14
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-20 10:38:43 UTC
Open HP Device Manager and try removing and re-adding the printer.
Comment 2 Loïc Bartoletti freebsd_committer freebsd_triage 2016-03-20 14:05:06 UTC
I already try to remove/re-add the printer.

I also try to change driver and I have this error "filter failed".

I continue to search the problem.
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-20 15:01:45 UTC
Created attachment 168425 [details]
patch

I see this printer requires print/hplip-plugin.  There's a known problem with that port.  Please patch it with the attached patch, then rebuild and reinstall it.  When you re-add the printer you should not have to change the PPD file.  The default should be fine (something that starts with "drv://hpcups.drv/").
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-03-21 11:22:22 UTC
A commit references this bug:

Author: tijl
Date: Mon Mar 21 11:21:29 UTC 2016
New revision: 411553
URL: https://svnweb.freebsd.org/changeset/ports/411553

Log:
  - These binary plugins are compiled for Linux and some require glibc
    functions that our libc does not provide so they fail to load.  Implement
    the glibc functions in a wrapper library for each plugin.
  - Do all of the building and installing from do-build and do-install.  The
    upstream install scripts require too many hacks to stay inside the work
    directory.
  - Add LICENSE information.

  PR:		208142
  Tested by:	avg

Changes:
  head/print/hplip-plugin/Makefile
  head/print/hplip-plugin/files/patch-installPlugin.py
  head/print/hplip-plugin/files/patch-plugin_install.py
  head/print/hplip-plugin/files/wrap.c
  head/print/hplip-plugin/pkg-descr
  head/print/hplip-plugin/pkg-plist
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-21 11:28:17 UTC
I've just committed the patch so please try if using hplip-plugin-3.16.2_1 fixes your problem.
Comment 6 Loïc Bartoletti freebsd_committer freebsd_triage 2016-03-23 06:17:25 UTC
Hello,
I tried with your patch. I managed to print, only it does not work with him, but with cups; hplip wan't install hplip-plugin...
I retried deinstall delete everything related to cups hplip and hplip plugin and reinstall all, and now I get the message "unable to get list of printer drivers - internal error"
I'll do more tests this week
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-25 15:27:26 UTC
Comment on attachment 168425 [details]
patch

Try the following:

1. Run this command as root:

service cupsd stop

2. Delete cups, cups-filters, hplip and hplip-plugin:

pkg delete -f cups cups-filters hplip hplip-plugin

3. Make sure the following directories are also gone:

/usr/local/etc/cups
/usr/local/libexec/cups
/usr/local/share/cups
/usr/local/share/hplip
/usr/local/share/ppd/HP
/var/cache/cups
/var/lib/hp
/var/log/cups
/var/run/cups
/var/spool/cups
~/.cups
~/.hplip
/root/.cups
/root/.hplip

4. Update your ports tree.

5. If you made any changes to print/cups, print/cups-filters, print/hplip or print/hplip-plugin, please undo them.

6. Do a clean rebuild and reinstall of cups, cups-filters, hplip and hplip-plugin:

cd /usr/ports/print/cups
make clean
make install clean
cd /usr/ports/print/cups-filters
make clean
make install clean
cd /usr/ports/print/hplip
make clean
make install clean
cd /usr/ports/print/hplip-plugin
make clean
make install clean

7. Restart devd and cupsd:

service devd restart
service cupsd restart

8. Open HP Device Manager and try to setup the printer.
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-15 15:20:30 UTC
Did you get the printer working?
Comment 9 Loïc Bartoletti freebsd_committer freebsd_triage 2016-04-16 07:04:09 UTC
I follow your instructions without success. BUT I can print configuring my printer with cups... My steps:
Install cups, hplip, hplip-plugin etc.
Copy hp-laserjet_professional_m1212nf_mfp.ppd from distifles into /usr/local/share/ppd/HP/
configure printer with cups

Now I can print.
Comment 10 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-16 09:56:14 UTC
So what exactly goes wrong when you follow my steps?
Comment 11 Loïc Bartoletti freebsd_committer freebsd_triage 2016-04-17 08:01:48 UTC
First, I can't found ppd of my printer with your patch. I need to put manually into /usr/local/share/ppd/HP

Second, I can't configure my printer with HPLIP.
Comment 12 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-17 10:12:26 UTC
You don't need to look for a PPD file.  When configuring with CUPS it should give you a list of HP printers.  Your printer is listed as "HP LaserJet Professional m1212nf MFP, hpcups 3.16.2, requires proprietary plugin".  When you select this model a PPD file will be generated automatically.

What goes wrong when you use HP Device Manager?
Comment 13 Loïc Bartoletti freebsd_committer freebsd_triage 2016-04-19 04:06:34 UTC
Created attachment 169459 [details]
screenshot

OK. When I try to install the printer via HP Device Manager I get the same error with plugin. See the screenshot.
Comment 14 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-19 07:25:30 UTC
Created attachment 169461 [details]
patch

Can you apply this patch for print/hplip-plugin and rebuild/reinstall that port?  Then retry with HP Device Manager.
Comment 15 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-20 09:03:18 UTC
Created attachment 169486 [details]
patch2

The previous patch doesn't make a difference.  Try this one instead.
Comment 16 Loïc Bartoletti freebsd_committer freebsd_triage 2016-04-24 17:05:00 UTC
Hello,

It's ok for the printer! Thanks!

now I've a problem with xsane IO/error. I search if it's related with hplip-plugin.
Comment 17 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-24 18:58:29 UTC
I'm not familiar with Sane.  The obvious thing to check is that it can access the USB device.  CUPS installs a devd file in /usr/local/etc/devd/cups.conf.  This sets the permissions on USB printers to root:cups 660.  You may have to add users to group cups.  Or maybe you need to add the saned user to group cups.
Comment 18 commit-hook freebsd_committer freebsd_triage 2016-04-24 19:39:57 UTC
A commit references this bug:

Author: tijl
Date: Sun Apr 24 19:39:35 UTC 2016
New revision: 413957
URL: https://svnweb.freebsd.org/changeset/ports/413957

Log:
  Install plugins with +x because HPLIP thinks the installation is corrupt
  otherwise.

  PR:		208142
  Reported by:	coder@tuxfamily.org

Changes:
  head/print/hplip-plugin/Makefile
Comment 19 Tijl Coosemans freebsd_committer freebsd_triage 2016-05-10 16:52:50 UTC
I've just committed a change to print/hplip-plugin that fixed scanning for someone.  Can you update the port and see if it fixes your problem too?
Comment 20 Loïc Bartoletti freebsd_committer freebsd_triage 2016-05-11 02:51:32 UTC
Yes, it's ok.
Thanks!