Skip to content

Conversation

@computersforpeace
Copy link
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
Collaborator

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
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
Collaborator

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

@vapier
Copy link

vapier commented Mar 11, 2018

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

@michaelrsweet
Copy link
Collaborator

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
Collaborator

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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

investigating Investigating the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants