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

2.3b6 libcups2 has symbols from libcupsimage2 #5457

Closed
OdyX opened this Issue Dec 10, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@OdyX
Copy link
Contributor

OdyX commented Dec 10, 2018

While packaging v2.3b6, I got weird errors from Debian's linter that I cannot really find a good solution for:

E: libcupsimage2: library-not-linked-against-libc usr/lib/x86_64-linux-gnu/libcupsimage.so.2
N: 
N:    The package installs a library which is not dynamically linked against
N:    libc.
N:    
N:    It is theoretically possible to have a library which doesn't use any
N:    symbols from libc, but it is far more likely that this is a violation of
N:    the requirement that "shared libraries must be linked against all
N:    libraries that they use symbols from in the same way that binaries are".
N:    
N:    Refer to Debian Policy Manual section 10.2 (Libraries) and
N:    https://bugs.debian.org/698720 for details.

Also, I had to add symbols to libcups2 as it apparently "inherited" symbols from libcupsimage2:

@@ -154,6 +154,18 @@ libcups.so.2 libcups2 #MINVER#
  cupsPrintFiles@Base 1.4.0
  cupsPutFd@Base 1.4.0
  cupsPutFile@Base 1.4.0
+ cupsRasterClose@Base 2.3~b6
+ cupsRasterErrorString@Base 2.3~b6
+ cupsRasterInitPWGHeader@Base 2.3~b6
+ cupsRasterInterpretPPD@Base 2.3~b6
+ cupsRasterOpen@Base 2.3~b6
+ cupsRasterOpenIO@Base 2.3~b6
+ cupsRasterReadHeader2@Base 2.3~b6
+ cupsRasterReadHeader@Base 2.3~b6
+ cupsRasterReadPixels@Base 2.3~b6
+ cupsRasterWriteHeader2@Base 2.3~b6
+ cupsRasterWriteHeader@Base 2.3~b6
+ cupsRasterWritePixels@Base 2.3~b6
  cupsReadResponseData@Base 1.4.0
  cupsRemoveDest@Base 1.4.0
  cupsRemoveOption@Base 1.4.0

All these were originally shipped in libcupsimage2, and indeed, from a build directory:

$ readelf --dyn-syms cups/libcups.so.2 | grep cupsRasterClose
   770: 000000000004a860     5 FUNC    GLOBAL DEFAULT   12 cupsRasterClose
$ readelf --dyn-syms cups/libcupsimage.so.2 | grep cupsRasterClose
    26: 0000000000001250     5 FUNC    GLOBAL DEFAULT   12 cupsRasterClose

There seems to be something fishy here around the linking of both libcups2 and libcupsimage2 that I don't get.

(For the record, this is the patched tree on top of v2.3b6 that I'm using to build on Debian sid: v2.3b6...OdyX:3b2c80920d609226e0963b8b1eb957f7b4580e5d )

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

michaelrsweet commented Dec 10, 2018

@OdyX CUPS 2.3 includes the CUPS raster functions in libcups. Common stubs are linked into both libraries with the actual implementation living in libcups. The goal is to do away with the need for a separate CUPS imaging library, but we still need to provide backwards-compatibility...

I'll look at what is going on for libcupsimage, but it basically uses the same link commands as libcups so I'm not sure why anything has changed in that respect...

@michaelrsweet michaelrsweet self-assigned this Dec 10, 2018

@michaelrsweet michaelrsweet added this to the CUPS 2.3.x milestone Dec 10, 2018

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

michaelrsweet commented Dec 13, 2018

OK, so I tried a build from source (default configure options) on Ubuntu 18.04 and ldd reports the following for libcupsimage.so.2:

ldd libcupsimage.so.2
	linux-vdso.so.1 (0x00007ffc84ffe000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa8fda4000)
	libcups.so.2 => /usr/lib/x86_64-linux-gnu/libcups.so.2 (0x00007faa8fb18000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa8f727000)
	/lib64/ld-linux-x86-64.so.2 (0x00007faa901c6000)
	libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007faa8f4dc000)
	libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007faa8f177000)
	libavahi-common.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007faa8ef6b000)
	libavahi-client.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007faa8ed5a000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007faa8eb3d000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa8e79f000)
	libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007faa8e4c9000)
	libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007faa8e297000)
	libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007faa8e093000)
	libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007faa8de88000)
	libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007faa8db59000)
	libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007faa8d93c000)
	libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007faa8d5be000)
	libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007faa8d3ab000)
	libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007faa8d175000)
	libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007faa8cf41000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007faa8ccc0000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007faa8ca73000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa8c86f000)
	libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007faa8c66b000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007faa8c450000)
	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007faa8c248000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007faa8bfc4000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007faa8bdbc000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007faa8bb96000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007faa8b97a000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007faa8b65f000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007faa8b44a000)

Sure seems like libc is in the list...

@michaelrsweet michaelrsweet removed this from the CUPS 2.3.x milestone Dec 28, 2018

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

michaelrsweet commented Dec 28, 2018

@OdyX Pulled this out of the 2.3 milestone for now until we get a better handle on what is going wrong...

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

michaelrsweet commented Jan 7, 2019

@OdyX Any updates?

@OdyX

This comment has been minimized.

Copy link
Contributor

OdyX commented Jan 7, 2019

Sorry, haven't had time. I'll try to take a look this week

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

michaelrsweet commented Jan 21, 2019

@OdyX Please let me know if this is still an issue in the CUPS sources. Closing for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment