Bug 1770160 - gs: symbol lookup error: /lib64/libgs.so.9: undefined symbol: jbig2_ctx_new
Summary: gs: symbol lookup error: /lib64/libgs.so.9: undefined symbol: jbig2_ctx_new
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: jbig2dec
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael J Gruber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-08 10:58 UTC by Nicolas Mailhot
Modified: 2019-12-14 22:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-14 22:04:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 940605 0 None None None 2019-11-09 12:05:41 UTC
Ghostscript 701888 0 None None None 2019-11-09 12:32:20 UTC

Description Nicolas Mailhot 2019-11-08 10:58:28 UTC
cups-2.2.12-3.fc32.x86_64
cups-client-2.2.12-3.fc32.x86_64
cups-filesystem-2.2.12-3.fc32.noarch
cups-filters-1.22.5-7.fc32.x86_64
cups-filters-libs-1.22.5-7.fc32.x86_64
cups-ipptool-2.2.12-3.fc32.x86_64
cups-libs-2.2.12-3.fc32.x86_64
cups-pk-helper-0.2.6-8.fc31.x86_64
freetype-2.10.0-3.fc31.x86_64
ghostscript-9.27-1.fc32.x86_64
ghostscript-core-9.27-1.fc32.x86_64
ghostscript-tools-fonts-9.27-1.fc32.x86_64
ghostscript-tools-printing-9.27-1.fc32.x86_64
ghostscript-x11-9.27-1.fc32.x86_64
jbig2dec-libs-0.17-1.fc32.x86_64

nov. 08 11:51:09 cerebro.okg cupsd[947]: REQUEST localhost - - "POST /printers/Lexmark-CX510 HTTP/1.1" 200 1719117 Print-Job successful-ok
nov. 08 11:51:09 cerebro.okg cupsd[947]: Lexmark-CX510 nim 107 [08/Nov/2019:11:51:09 +0100] total 0 - localhost Memo_tri_verso_nov-2019.pdf - two-sided-long-edge
nov. 08 11:51:09 cerebro.okg cupsd[947]: Job stopped due to filter errors; please consult the syslog file for details.
nov. 08 11:51:09 cerebro.okg cupsd[947]: [Job 107] The following messages were recorded from 11:51:09 to 11:51:09
nov. 08 11:51:09 cerebro.okg cupsd[947]: Applying default options...
nov. 08 11:51:09 cerebro.okg cupsd[947]: Adding default sides=two-sided-long-edge
nov. 08 11:51:09 cerebro.okg cupsd[947]: Adding start banner page "none".
nov. 08 11:51:09 cerebro.okg cupsd[947]: Adding end banner page "none".
nov. 08 11:51:09 cerebro.okg cupsd[947]: File of type application/pdf queued by "nim".
nov. 08 11:51:09 cerebro.okg cupsd[947]: hold_until=0
nov. 08 11:51:09 cerebro.okg cupsd[947]: Queued on "Lexmark-CX510" by "nim".
nov. 08 11:51:09 cerebro.okg cupsd[947]: time-at-processing=1573210269
nov. 08 11:51:09 cerebro.okg cupsd[947]: 3 filters for job:
nov. 08 11:51:09 cerebro.okg cupsd[947]: pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
nov. 08 11:51:09 cerebro.okg cupsd[947]: pdftops (application/vnd.cups-pdf to application/vnd.cups-postscript, cost 100)
nov. 08 11:51:09 cerebro.okg cupsd[947]: /usr/lib/cups/filter/fax-pnh-filter (application/vnd.cups-postscript to printer/Lexmark-CX510, cost 0)
nov. 08 11:51:09 cerebro.okg cupsd[947]: job-sheets=none,none
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[0]="Lexmark-CX510"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[1]="107"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[2]="nim"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[3]="Memo_tri_verso_nov-2019.pdf"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[4]="1"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[5]="ColorSaver=FalseM TonerDarkness=4 LexBrightness=0 Halftone=TrueF noFaxNumber OutputBin=StandardBin BlackBalance=PrinterS PageSize=A4 MediaColor=PrinterS ManualRGBGraphics=PrinterS SepSource=PrinterS noCollate Duplex=None MagentaBalance=PrinterS LXResolution=604x600dpi SepPages=NoneF noLexMirror InputSlot=Tray1 MediaType=Plain ColorMode=FalseM LexSaturation=0 CyanBalance=PrinterS ManualRGBText=PrinterS YellowBalance=PrinterS noPnH ManualCMYK=PrinterS number-up=1 ManualRGBImage=PrinterS LexContrast=0 LexBlankPage=PrinterS job-uuid=urn:uuid:577690ea-cf3d-3e7d-4680-097e70e83272 sides=two-sided-long-edge job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1573210269 time-at-processing=1573210269"
nov. 08 11:51:09 cerebro.okg cupsd[947]: argv[6]="/var/spool/cups/d00107-001"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[0]="CUPS_CACHEDIR=/var/cache/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[1]="CUPS_DATADIR=/usr/share/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[2]="CUPS_DOCROOT=/usr/share/cups/www"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[6]="CUPS_SERVERROOT=/etc/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[7]="CUPS_STATEDIR=/var/run/cups"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[8]="HOME=/var/spool/cups/tmp"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[10]="SERVER_ADMIN=root"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[11]="SOFTWARE=CUPS/2.2.12"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[12]="TMPDIR=/var/spool/cups/tmp"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[13]="USER=root"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[14]="CUPS_MAX_MESSAGE=2047"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[15]="CUPS_SERVER=/var/run/cups/cups.sock"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[16]="CUPS_ENCRYPTION=IfRequested"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[17]="IPP_PORT=631"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[18]="CHARSET=utf-8"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[19]="LANG=fr_FR.UTF-8"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[20]="PPD=/etc/cups/ppd/Lexmark-CX510.ppd"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[21]="RIP_MAX_CACHE=128m"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[22]="CONTENT_TYPE=application/pdf"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[23]="DEVICE_URI=lpd://192.168.0.14/"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[24]="PRINTER_INFO=Lexmark CX510de 752702946H0GT LW63.GM7.P638"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[25]="PRINTER_LOCATION="
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[26]="PRINTER=Lexmark-CX510"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[27]="PRINTER_STATE_REASONS=none"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[28]="CUPS_FILETYPE=document"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
nov. 08 11:51:09 cerebro.okg cupsd[947]: envp[30]="AUTH_I****"
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started filter /usr/lib/cups/filter/pdftopdf (PID 54668)
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started filter /usr/lib/cups/filter/pdftops (PID 54669)
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started filter /usr/lib/cups/filter/fax-pnh-filter (PID 54670)
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started backend /usr/lib/cups/backend/lpd (PID 54671)
nov. 08 11:51:09 cerebro.okg cupsd[947]: pdftops - copying to temp print file \"/var/spool/cups/tmp/0d58d5dd0d208\"
nov. 08 11:51:09 cerebro.okg cupsd[947]: STATE: +connecting-to-device
nov. 08 11:51:09 cerebro.okg cupsd[947]: Looking up \"192.168.0.14\"...
nov. 08 11:51:09 cerebro.okg cupsd[947]: STATE: -connecting-to-device
nov. 08 11:51:09 cerebro.okg cupsd[947]: 192.168.0.14=192.168.0.14
nov. 08 11:51:09 cerebro.okg cupsd[947]: backendWaitLoop(snmp_fd=5, addr=0x55be6aa46328, side_cb=0x55be695d7cd0)
nov. 08 11:51:09 cerebro.okg cupsd[947]: pdftopdf: Last filter determined by the PPD: fax-pnh-filter; FINAL_CONTENT_TYPE: application/vnd.cups-postscript => pdftopdf will not log pages in page_log.
nov. 08 11:51:09 cerebro.okg cupsd[947]: PDF interactive form and annotation flattening done via QPDF
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54668 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
nov. 08 11:51:09 cerebro.okg cupsd[947]: Printer make and model: Lexmark Lexmark CX517de
nov. 08 11:51:09 cerebro.okg cupsd[947]: Running command line for pstops: pstops 107 nim Memo_tri_verso_nov-2019.pdf 1 \'ColorSaver=FalseM TonerDarkness=4 LexBrightness=0 Halftone=TrueF noFaxNumber OutputBin=StandardBin BlackBalance=PrinterS PageSize=A4 MediaColor=PrinterS ManualRGBGraphics=PrinterS SepSource=PrinterS Duplex=None MagentaBalance=PrinterS LXResolution=604x600dpi SepPages=NoneF noLexMirror InputSlot=Tray1 MediaType=Plain ColorMode=FalseM LexSaturation=0 CyanBalance=PrinterS ManualRGBText=PrinterS YellowBalance=PrinterS noPnH ManualCMYK=PrinterS ManualRGBImage=PrinterS LexContrast=0 LexBlankPage=PrinterS job-uuid=urn:uuid:577690ea-cf3d-3e7d-4680-097e70e83272 sides=two-sided-long-edge job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1573210269 time-at-processing=1573210269\'
nov. 08 11:51:09 cerebro.okg cupsd[947]: No resolution information found in the PPD file.
nov. 08 11:51:09 cerebro.okg cupsd[947]: Using image rendering resolution 300 dpi
nov. 08 11:51:09 cerebro.okg cupsd[947]: Running command line for gs: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -dLanguageLevel=3 -r300 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c \'save pop\' -f /var/spool/cups/tmp/0d58d5dd0d208
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started filter gs (PID 54678)
nov. 08 11:51:09 cerebro.okg cupsd[947]: Started filter pstops (PID 54679)
nov. 08 11:51:09 cerebro.okg cupsd[947]: gs: symbol lookup error: /lib64/libgs.so.9: undefined symbol: jbig2_ctx_new
nov. 08 11:51:09 cerebro.okg cupsd[947]: The print file is empty.
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54678 (gs) stopped with status 127!
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54679 (pstops) stopped with status 1!
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54669 (/usr/lib/cups/filter/pdftops) stopped with status 1.
nov. 08 11:51:09 cerebro.okg cupsd[947]: Hint: Try setting the LogLevel to "debug" to find out more.
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54670 (/usr/lib/cups/filter/fax-pnh-filter) exited with no errors.
nov. 08 11:51:09 cerebro.okg cupsd[947]: PID 54671 (/usr/lib/cups/backend/lpd) exited with no errors.
nov. 08 11:51:09 cerebro.okg cupsd[947]: [Job 107] End of messages
nov. 08 11:51:09 cerebro.okg cupsd[947]: [Job 107] printer-state=3(idle)
nov. 08 11:51:09 cerebro.okg cupsd[947]: [Job 107] printer-state-message="Filter failed"
nov. 08 11:51:09 cerebro.okg cupsd[947]: [Job 107] printer-state-reasons=none

Comment 1 Michael J Gruber 2019-11-08 13:34:23 UTC
jbig2dec-libs-0.17 is supposed to be abi-compatible with 0.16. Does the problem go away if you downgrade jbig2dec-libs?

If yes then we need to coordinate the updates for gs and jbig2dec - I'm sorry for jumping ahead with jbig2dec. While I'm to blame for that, technically this bug will be resolved by resolving bug #1761792 (gs update), so I'll set dependencies accordingly. But we (I) need to coordinate this for future updates. Suggestions welcome.

Comment 3 Nicolas Mailhot 2019-11-09 09:56:05 UTC
dnf downgrade jbig2dec-libs-0.16-1.fc32.x86_64.rpm works

Comment 4 Michael J Gruber 2019-11-09 12:04:09 UTC
Thanks for the pointer. Scratch build in progress. The local build contains the mssing symbol after the patch.

Comment 5 Michael J Gruber 2019-11-09 12:22:09 UTC
Please test with  jbig2dec-0.17-2.fc32.

Comment 6 Richard W.M. Jones 2019-12-09 12:14:58 UTC
ghostscript-9.27-2.fc32.x86_64
libgs-9.27-2.fc32.x86_64
jbig2dec-0.17-2.fc32.x86_64

$ gs --help
gs: symbol lookup error: /lib64/libgs.so.9: undefined symbol: jbig2_ctx_new_imp

Is there any further suggestion to fix this?

Comment 7 Michael J Gruber 2019-12-09 12:46:14 UTC
(In reply to Richard W.M. Jones from comment #6)
> ghostscript-9.27-2.fc32.x86_64
> libgs-9.27-2.fc32.x86_64
> jbig2dec-0.17-2.fc32.x86_64
> 
> $ gs --help
> gs: symbol lookup error: /lib64/libgs.so.9: undefined symbol:
> jbig2_ctx_new_imp
> 
> Is there any further suggestion to fix this?

Well, this is the first answer to my request for testing. That is why jbig2dec-0.17-2.fc32.x86_64
is in rawhide only so far and ON_QA.

Second, this is weird:
With jbig2dec-0.16-1.fc31 on F31:
nm -DC /usr/lib64/libjbig2dec.so.0.0.0|grep jbig2_ctx
0000000000005230 T jbig2_ctx_free
0000000000005050 T jbig2_ctx_new

ghostscript-9.27-2.fc31.x86_64 is perfectly happy with that.

With jbig2dec-0.17-2.fc32 built on F31:

nm -DC jbig2dec-0.17/.libs/libjbig2dec.so.0.0.0 |grep jbig2_ctx
0000000000005310 T jbig2_ctx_free
00000000000052f0 T jbig2_ctx_new
0000000000005070 T jbig2_ctx_new_imp

So, jbig2_ctx_new_imp never was there in jbig2dec-0.16 to begin with, and while upstream dumped jbig2_ctx_new in 0.17, -2 of my package restores it and _imp (using the debian fix). What symbols does your installed libjbig2dec define?

Comment 8 Richard W.M. Jones 2019-12-09 16:12:04 UTC
Aha ..

$ rpm -qa | grep jbig2
jbig2dec-libs-0.14-6.fc31.x86_64
jbig2dec-0.17-2.fc32.x86_64

It looks like you are missing this from your libs subpackage:

Requires:      %{name}%{?_isa} = %{version}-%{release}

Note this is generally advised by Fedora packaging guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package

Once I manually installed jbig2dec-libs-0.17-2.fc32.x86_64 it does actually work.

Comment 9 Michael J Gruber 2019-12-10 09:09:29 UTC
(In reply to Richard W.M. Jones from comment #8)
> Aha ..
> 
> $ rpm -qa | grep jbig2
> jbig2dec-libs-0.14-6.fc31.x86_64
> jbig2dec-0.17-2.fc32.x86_64

That explains it, thanks. So this rawhide installation was not fully up-to-date - or is this F31 with some F32 packages?

> It looks like you are missing this from your libs subpackage:
> 
> Requires:      %{name}%{?_isa} = %{version}-%{release}
> 
> Note this is generally advised by Fedora packaging guidelines:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_requiring_base_package

It also says that -libs does not need that unless -libs depends on functionality of the base package.

Note that it is perfectly okay to use -libs without the base package. In fact, that is what all programs linking against libjbig2dec will depend on. So, adding that requires only means that these programs will pull in the jbig2dec binary for no intrinsic reason. It would not have helped your case - you apparantly installed jbig2dec-0.17-2.fc32.x86_64 without updates enabled, and the dependency of jbig2dec on jbig2dec-libs was formally satisfied by jbig2dec-libs-0.14-6.fc31.x86_64. This would not have changed (for your existing install, with a newer jbig2dec with your requested requires).

So, if anything, then jbig2dec (and all other programs linking against libjbig2dec) should depend on the exact jbig2dec-libs. Well, they do depend on the .so version, and the upstream ABI change is what brought us here.

In conclusion, this bug seems to be fixed in rawhide "proper", and I intend to mark it as such and push to F31. But I'll wait a few days for replies just in case I overlooked something in my analysis above.

Comment 10 Nicolas Mailhot 2019-12-10 09:55:09 UTC
Hi, I had to reinstall the system that had the problem due to the glibc/firefox breakage. So, I can no longer test in the exact same configuration. On the new rawhide system, printing works (with a new printer setup, no idea if it’s the very same as before)

Comment 11 Richard W.M. Jones 2019-12-11 09:40:36 UTC
I'd suggest making jbig2dec depend on the exact -libs package.  Is there any
situation where you'd want them to be at a different version?  It sounds like
trouble.

Comment 12 Michael J Gruber 2019-12-11 09:50:32 UTC
(In reply to Richard W.M. Jones from comment #11)
> I'd suggest making jbig2dec depend on the exact -libs package.  Is there any
> situation where you'd want them to be at a different version?  It sounds like
> trouble.

No, it's just that usually dependencies on libs are picked up automatically and this works unless ABI breaks or someone breaks the update process...

So, you are suggesting

Requires:      %{name}-libs%{?_isa} = %{version}-%{release}

for package jbig2dec, right?

Comment 13 Richard W.M. Jones 2019-12-11 10:16:07 UTC
(In reply to Michael J Gruber from comment #12)
> (In reply to Richard W.M. Jones from comment #11)
> > I'd suggest making jbig2dec depend on the exact -libs package.  Is there any
> > situation where you'd want them to be at a different version?  It sounds like
> > trouble.
> 
> No, it's just that usually dependencies on libs are picked up automatically
> and this works unless ABI breaks or someone breaks the update process...

Dependencies on libs only work correctly if the library does symbol
versioning (and does it properly).  jbig2dec-libs doesn't do it properly
as you can see if you run:

$ nm -D --with-symbol-versions /usr/lib64/libjbig2dec.so.0.0.0 | less

Compare it to a library I wrote which does symbol versioning:

$ nm -D --with-symbol-versions /usr/lib64/libnbd.so.0.0.0 | less

Without proper symbol versioning RPM only adds a basic dependency:

libjbig2dec.so.0()(64bit)

which of course causes problems as we've seen here.  With symbol versioning
you get dependencies like:

libnbd.so.0()(64bit)
libnbd.so.0(LIBNBD_1.0)(64bit)
libnbd.so.0(LIBNBD_1.2)(64bit)

that ensure the updated library is pulled in when symbols are added or changed.

> So, you are suggesting
> 
> Requires:      %{name}-libs%{?_isa} = %{version}-%{release}
> 
> for package jbig2dec, right?

Yes.


Note You need to log in before you can comment on or make changes to this bug.