With this version I my printer is not showing up in http://127.0.0.1:631/printers . seems the cluprit is cups cannot printer definition file, due to: E [15/Oct/2019:19:00:35 +0200] PPD file for HP_Officejet_Pro_7740_All-in-One cannot be loaded. E [15/Oct/2019:19:00:35 +0200] Neplatná volba klíčového slova řetězce on line 171 of /etc/cups/ppd/HP_Officejet_Pro_7740_All-in-One.ppd. Here are few lines from the PPD file: 171 *PageSize Custom/Custom : "<</cupsInteger0 101/PageSize[612 1008]/ImagingBBox null>>setpagedevice" I deleted the line 171 and yet another error message popped up after cupsd restart: E [15/Oct/2019:20:12:29 +0200] Illegal option keyword string on line 234 of /etc/cups/ppd/HP_Officejet_Pro_7740_All-in-One.ppd. 234 *PageRegion Custom/Custom : "<</cupsInteger0 101/PageSize[612 1008]/ImagingBBox null>>setpagedevice" In both cases it is the "Custom" size format. I deleted additional lines containing "Custom" in the PPD file, but cupsd complains now with: E [15/Oct/2019:20:14:45 +0200] HP_Officejet_Pro_7740_All-in-One: File \"/usr/libexec/cups/filter/hpcups\" not available: No such file or directory Indeed, the file is missing: # ls -latr /usr/libexec/cups/filter/hpcups ls: cannot access '/usr/libexec/cups/filter/hpcups': No such file or directory # ls -latr /usr/libexec/cups/filter/ total 1860 -rwxr-xr-x 1 root root 422 Feb 20 2017 minolta drwxr-xr-x 10 root root 4096 Oct 7 20:29 .. -rwxr-xr-x 1 root root 37976 Oct 15 00:18 thnucups -rwxr-xr-x 1 root root 41992 Oct 15 18:57 commandtops -rwxr-xr-x 1 root root 28224 Oct 15 18:57 gziptoany -rwxr-xr-x 1 root root 175024 Oct 15 18:57 pstops -rwxr-xr-x 1 root root 80960 Oct 15 18:57 rastertoepson -rwxr-xr-x 1 root root 67200 Oct 15 18:57 rastertohp -rwxr-xr-x 1 root root 80576 Oct 15 18:57 rastertolabel -rwxr-xr-x 1 root root 57608 Oct 15 18:57 rastertopwg -rwxr-xr-x 1 root root 211336 Oct 15 18:57 pdftopdf -rwxr-xr-x 1 root root 17440 Oct 15 18:57 commandtoescpx -rwxr-xr-x 1 root root 17272 Oct 15 18:57 commandtopclx -rwxr-xr-x 1 root root 36984 Oct 15 18:57 sys5ippprinter -rwxr-xr-x 1 root root 26912 Oct 15 18:57 texttotext -rwxr-xr-x 1 root root 49664 Oct 15 18:57 pdftops -rwxr-xr-x 1 root root 41112 Oct 15 18:57 rastertoescpx lrwxrwxrwx 1 root root 11 Oct 15 18:57 xfigtopdf -> vectortopdf lrwxrwxrwx 1 root root 11 Oct 15 18:57 svgtopdf -> vectortopdf lrwxrwxrwx 1 root root 10 Oct 15 18:57 imagetoubrl -> imagetobrf lrwxrwxrwx 1 root root 11 Oct 15 18:57 wmftopdf -> vectortopdf lrwxrwxrwx 1 root root 11 Oct 15 18:57 emftopdf -> vectortopdf lrwxrwxrwx 1 root root 11 Oct 15 18:57 cmxtopdf -> vectortopdf lrwxrwxrwx 1 root root 11 Oct 15 18:57 cgmtopdf -> vectortopdf lrwxrwxrwx 1 root root 11 Oct 15 18:57 vectortoubrl -> vectortobrf lrwxrwxrwx 1 root root 16 Oct 15 18:57 textbrftoindexv4 -> textbrftoindexv3 -rwxr-xr-x 1 root root 45224 Oct 15 18:57 rastertopclx -rwxr-xr-x 1 root root 72056 Oct 15 18:57 texttopdf -rwxr-xr-x 1 root root 89664 Oct 15 18:57 rastertopdf -rwxr-xr-x 1 root root 75208 Oct 15 18:57 bannertopdf -rwxr-xr-x 1 root root 18280 Oct 15 18:57 rastertops -rwxr-xr-x 1 root root 63168 Oct 15 18:57 pdftoraster -rwxr-xr-x 1 root root 31648 Oct 15 18:57 gstoraster -rwxr-xr-x 1 root root 27272 Oct 15 18:57 mupdftoraster -rwxr-xr-x 1 root root 131312 Oct 15 18:57 foomatic-rip -rwxr-xr-x 1 root root 54816 Oct 15 18:57 imagetopdf -rwxr-xr-x 1 root root 67200 Oct 15 18:57 imagetoraster -rwxr-xr-x 1 root root 2588 Oct 15 18:57 vectortobrf -rwxr-xr-x 1 root root 1873 Oct 15 18:57 musicxmltobrf -rwxr-xr-x 1 root root 3476 Oct 15 18:57 brftopagedbrf -rwxr-xr-x 1 root root 2003 Oct 15 18:57 brftoembosser -rwxr-xr-x 1 root root 9289 Oct 15 18:57 texttobrf -rwxr-xr-x 1 root root 6652 Oct 15 18:57 imageubrltoindexv4 -rwxr-xr-x 1 root root 4911 Oct 15 18:57 textbrftoindexv3 -rwxr-xr-x 1 root root 982 Oct 15 18:57 texttops -rwxr-xr-x 1 root root 6580 Oct 15 18:57 imageubrltoindexv3 -rwxr-xr-x 1 root root 3759 Oct 15 18:57 imagetobrf -rwxr-xr-x 1 root root 988 Oct 15 18:57 imagetops -rwxr-xr-x 1 root root 555 Oct 15 18:57 gstopdf -rwxr-xr-x 1 root root 558 Oct 15 18:57 gstopxl -rwxr-xr-x 1 root root 563 Oct 15 18:57 rastertopclm -rwxr-xr-x 1 root root 2177 Oct 15 18:57 vectortopdf lrwxrwxrwx 1 root root 10 Oct 15 18:57 pstoraster -> gstoraster lrwxrwxrwx 1 root root 7 Oct 15 18:57 pstopxl -> gstopxl -rwxr-xr-x 1 root root 60576 Oct 15 18:59 rastertogutenprint.5.3 -rwxr-xr-x 1 root root 17296 Oct 15 18:59 commandtoepson -rwxr-xr-x 1 root root 17192 Oct 15 18:59 commandtocanon drwxr-xr-x 2 root root 4096 Oct 15 18:59 . # # emerge -pv net-print/gutenprint cups cups-filters [ebuild R ] net-print/cups-2.3.0::gentoo USE="X dbus pam ssl threads usb -acl -debug -kerberos -lprng-compat (-selinux) -static-libs -systemd -xinetd -zeroconf" 0 KiB [ebuild R ] net-print/cups-filters-1.25.11::gentoo USE="dbus foomatic jpeg pdf perl png postscript tiff -ipp_autosetup -ldap -pclm -static-libs -test -zeroconf" 0 KiB [ebuild R ] net-print/gutenprint-5.3.1::stefantalpalaru USE="cups gimp gtk nls ppds readline -static-libs" 0 KiB Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB # emerge --info Portage 2.3.76 (python 3.7.4-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.2.0, glibc-2.29-r5, 5.3.6 x86_64) ================================================================= System uname: Linux-5.3.6-x86_64-Intel-R-_Core-TM-_i7-7820HQ_CPU_@_2.90GHz-with-gentoo-2.6 KiB Mem: 32814556 total, 24132188 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Tue, 15 Oct 2019 16:00:01 +0000 Head commit of repository gentoo: ca98b48c22e0aced0459fe614e076360e7a271f3 sh bash 5.0_p11 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 5.0_p11::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.0::gentoo dev-lang/python: 2.7.16::gentoo, 3.5.7::gentoo, 3.6.9::gentoo, 3.7.4-r1::gentoo dev-util/cmake: 3.15.4::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 9.2.0-r1::gentoo sys-devel/gcc-config: 2.1::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r5::gentoo Repositories: gentoo location: /scratch/usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 x-portage location: /scratch/usr/local/portage masters: gentoo priority: 0 layman location: /scratch/var/lib/layman masters: gentoo priority: 1 haskell location: /var/lib/layman/haskell masters: gentoo priority: 50 science location: /var/lib/layman/science masters: gentoo priority: 50 stefantalpalaru location: /var/lib/layman/stefantalpalaru masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 Nero-EULA-US AdobeFlash-10.3 AdobeFlash-11.x OPERA-2014 RAR Intel-SDP intel-ucode Skype-TOS vmware linux-firmware fasta vienna-rna unafold GRL MSttfEULA hplip-plugin meme mRNAmarkup ApE ICS ipw3945 finchtv modeller gmap master-pdf-editor abyss swiss-prot Aladdin AVASYS truecrypt-3.0 pyvcf Non-profit-OSL-3.0 estscan bcca_2010 oncotator Adobe blat staden CeCILL-1.1 phrap STRIDE cctbx-2.0 bh-luxi ARIADNE unRAR all-rights-reserved trf annovar_personal_only stampy-academic BSD-BroadInstitute UPennState freedist free-noncomm blasr sun-jlfgr FLI-Jena PSTT netperf sun-jsr67 xv vim.org OSGi-Specification-2.0 colt mod_fastcgi googleearth ACE AFL churchill genscan no-source-code linux-fw-redistributable" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -ftree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer" CXXFLAGS="-O2 -pipe -march=native -ftree-vectorize" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=native -ftree-vectorize" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -ftree-vectorize" GENTOO_MIRRORS="http://gentoo.wheel.sk/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_US en_GB en cs" MAKEOPTS="-j5" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/scratch/var/tmp" USE="X acpi alsa amd64 amr apache apache2 asm avx avx2 berkdb bluetooth boost bzip2 cairo cgi cli coin consolekit cracklib crypt cryptlib cryptsetup cups cxx dbus device-mapper dhcp directfb drm dvd emboss encode fax fbcon ffmpeg flac fontconfig fortran gbm gcrypt gd gdbm geoip geolocation gimp glpk gmp gnutls gpm gps gtk hal hpijs hwdb iconv id3tag imaging innodb inotify java javafx javascript jce jpeg jpg js jscript keymap ladspa lapack laptop lcms libnotify libtirpc lm_sensors mad mariadb matroska mmx modemmanager ncurses nfs nls nptl nptlonly nscd nss ntfsprogs objc ocr ogg opengl openmp openssl pam parport pbs pcre pcre16 pdf perl php png policykit polkit ppds pppd python qt3support qt4 qt5 readline rendering resolvconf romio scanner sctp seccomp server session slideshow sndfile split-usr sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification suexec svg syslog tcl tcpd threads tiff tk truetype udev unicode usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xattr xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias authz_host auth_basic auth_digest cgi cgid deflate dir env filter include info mem_cache mime mime_magic negotiation remoteip setenvif status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="gpsclock navcom ntrip rtcm104v2 rtcm104v3 ublox nmea0183 nmea2000 aivdm passthrough" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en-US en-GB cs" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_RM="pbs" PHP_TARGETS="php5-4 php5-5" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="vesa vmware fbdev intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 592822 [details] HP_Officejet_Pro_7740_All-in-One.ppd.gz
The printers are missing in the CGI output because the applciation crashes internally on those "custom" fields. Here is the stacktrace: # gdb /usr/libexec/cups/cgi-bin/printers.cgi /var/dumps/core.printers.cgi.31750 Reading symbols from /usr/libexec/cups/cgi-bin/printers.cgi... [New LWP 31750] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/libexec/cups/cgi-bin/printers.cgi'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f2546710521 in __strlen_avx2 () from /lib64/libc.so.6 (gdb) where #0 0x00007f2546710521 in __strlen_avx2 () from /lib64/libc.so.6 #1 0x00007f2546630b5f in strdup () from /lib64/libc.so.6 #2 0x0000559e305a0eb5 in cgiGetArray (name=<optimized out>, element=<optimized out>) at var.c:173 #3 0x0000559e3059ff87 in cgi_copy (out=out@entry=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=1, term=term@entry=125 '}', indent=indent@entry=4) at template.c:378 #4 0x0000559e3059fec8 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=0x559e32217530, element=0, term=<optimized out>, indent=2) at template.c:344 #5 0x0000559e305a05d3 in cgi_copy (out=0x7f2546771760 <_IO_2_1_stdout_>, in=in@entry=0x559e32217530, element=element@entry=0, term=term@entry=0 '\000', indent=indent@entry=0) at template.c:598 #6 0x0000559e305a0a31 in cgiCopyTemplateLang (tmpl=0x559e305a21c1 "printers.tmpl") at template.c:144 #7 0x0000559e3059cb19 in show_all_printers (user=<optimized out>, http=0x559e3221aa70) at printers.c:425 #8 main () at printers.c:131 (gdb)
Created attachment 592824 [details] "gdb bt full" output
The File \"/usr/libexec/cups/filter/hpcups\" not available: No such file or directory error was related to me not having installing net-print/hplip-3.19.8, I installed it and this error is gone. What remains to be solved is the crash reported here which is caused by printer definitions being broken (and unaccessible to the CGI application doing the lookup) when the PPD files contain unsupported variables.
I can confirm this with my brother mfc465cn. After the update to "net-print/cups-2.2.12", "net-print/cups-filters-1.25.11" printing was not possible anymore. An error "filter failed" was shown in "/var/log/cups/error_log" including an segfault message, see below: D [10/Nov/2019:09:49:15 +0100] [Job 1061] PID 27132 (/usr/libexec/cups/filter/pdftopdf) exited with no errors. D [10/Nov/2019:09:49:15 +0100] [Job 1061] Printer make and model: D [10/Nov/2019:09:49:15 +0100] [Job 1061] Running command line for pstops: pstops 1061 g2t install1.txt 1 \'PageSize=A4 job-uuid=urn:uuid:cca959b3-450e-37df-65bb-e6494459b2a3 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1573375382 time-at-processing=1573375755\' D [10/Nov/2019:09:49:15 +0100] [Job 1061] PID 27133 (/usr/libexec/cups/filter/pdftops) crashed on signal 11. D [10/Nov/2019:09:49:16 +0100] [Job 1061] /usr/libexec/cups/filter/brlpdwrappermfc465cn: Zeile 122: 27150 Speicherzugriffsfehler /usr/local/Brother/Printer/mfc465cn/cupswrapper/brcupsconfpt1 MFC465CN $PPDC $LOGCLEVEL \"$CUPSOPTION\" \"mfc465cn\" >> $LOGFILE D [10/Nov/2019:09:49:16 +0100] [Client 1] GET /cups.css HTTP/1.1 I started by investigating "cups-filter" and found this information: https://github.com/OpenPrinting/cups-filters/issues/156 Than I opened my ppd file "vi /etc/cups/ppd/MFC465CN.ppd" and changed at line 229: *BRDocument custom/custom: "" --> to --> *BRDocument other/other: "" ... according to this information: https://bbs.archlinux.org/viewtopic.php?id=248631 After that the system prints well.
is this still happening with latest cups version?