Order of libs with (mis)configured Libs.private #51
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hi,
This is similar to #33 and #34, though it only happens with a seemingly misconfigured *.pc file. I've stripped down the offending files to:
and the resulting outputs are:
GraphicsMagick populates Libs.private instead of relying on the traversal of requirements and it's easy enough to fix there, but it would be good if pkgconf could handle this (from the previous issues, it sounds like this should work).
This happens on both current master branch and 0.9.2.
Can you provide output of
pkgconf --simulate GraphicsMagick
?Actually, this is not a bug in my opinion. Please submit evidence of a real-world build failure caused by this.
What is happening here is that pkgconf is deduplicating the extra flags provided by Libs.private. Beyond this, the ordering of the libs is the same in the pkg-config output, after binutils does a merge-back phase on the linker flags anyway.
pkgconf does a merge-back on the linker flags so that libraries are ordered by number of dependencies beginning from the root, outward. This ensures that all linker dependencies are resolved in proper order and prevents overlinking.
Oh, I see now.
--static
should disable merge-back.Great! Thanks for looking at this, that fixes the original issue, but I stripped the files down too much. A similar thing happens when a there are multiple dependencies on the same lib. Issue #52 demonstrates this in a repeatable way.