Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

cups-config: only CUPS libraries go in non-static cups-config --libs#5261

Closed
computersforpeace wants to merge 1 commit into
apple:masterfrom
computersforpeace:cups-config
Closed

cups-config: only CUPS libraries go in non-static cups-config --libs#5261
computersforpeace wants to merge 1 commit into
apple:masterfrom
computersforpeace:cups-config

Conversation

@computersforpeace

Copy link
Copy Markdown
Contributor

We're including compression and crypto libraries in the linker flags
output, even when we're built as a shared library. This doesn't make
sense, because callers of cups-config are only looking for their direct
dependencies. If they plan to make any SSL or zlib calls of their own,
they should be managing those flags on their own.

This resolves problems seen in package management, where libcups users
end up inadvertently linking against (e.g.) gnutls directly, without the
package manager being aware. (And thus, it doesn't know to rebuild on
library upgrades.)

We're including compression and crypto libraries in the linker flags
output, even when we're built as a shared library. This doesn't make
sense, because callers of cups-config are only looking for their direct
dependencies. If they plan to make any SSL or zlib calls of their own,
they should be managing those flags on their own.

This resolves problems seen in package management, where libcups users
end up inadvertently linking against (e.g.) gnutls directly, without the
package manager being aware. (And thus, it doesn't know to rebuild on
library upgrades.)
@michaelrsweet

Copy link
Copy Markdown
Contributor

We've had problems with this in the past; will re-investigate but I know on some platforms doing this doesn't actually work... :/

@michaelrsweet michaelrsweet added this to the Future milestone Mar 8, 2018
@michaelrsweet michaelrsweet self-assigned this Mar 8, 2018
@michaelrsweet michaelrsweet added the investigating Investigating the issue label Mar 8, 2018
@computersforpeace

Copy link
Copy Markdown
Contributor Author

Any tips on what platform(s)? I don't believe any other *-config tool (e.g., pkg-config) works the way cups-config currently does.

@michaelrsweet

Copy link
Copy Markdown
Contributor

AIX, HP-UX, IRIX, macOS and some versions of Solaris for sure.

@vapier

vapier commented Mar 11, 2018

Copy link
Copy Markdown

do those include static linking ? i can understand on static-only systems needing the extra linkage.

@michaelrsweet

Copy link
Copy Markdown
Contributor

No, those are all operating systems that support shared libraries. They just don't always support recursive linkage (i.e. just the symbols referenced in the shared library get bound) so the application linking to libcups that also needs one or more additional functions from a dependent library must also link to the dependent library.

Like I said, I'll re-investigate to see if we can move away from that, or at least make it conditional on a per-platform basis...

michaelrsweet added a commit that referenced this pull request May 15, 2019
@michaelrsweet

Copy link
Copy Markdown
Contributor

Required quite a bit more than the simple change you suggested, but I believe master now has what you wanted... :)

[master 3e391a8] Update build system and cups-config script to not add extra libraries to the "--libs" output (Issue #5261)

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

Labels

investigating Investigating the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants