Summary: | Libraries are reported in search order, rather than request order | ||
---|---|---|---|
Product: | pkg-config | Reporter: | Diego Elio Pettenò <flameeyes> |
Component: | src | Assignee: | Tollef Fog Heen <tfheen> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Diego Elio Pettenò
2011-02-20 11:50:06 UTC
Looks like a missing requires in libavformat's .pc file to me. Uhm no. % pkg-config --libs 'libavformat >= 52.31.0 libavcodec >= 51' /home/flame/devel/repos/git/libav/yamato/libavformat/libavformat.a -pthread /home/flame/devel/repos/git/libav/yamato/libavcodec/libavcodec.a -ldl -lasound -lm -lbz2 -lz you see again libavformat.a being before libavcodec.a as I said. % fgrep Requires libavformat/libavformat-uninstalled.pc Requires: libavcodec = 52.114.0 so the Requires line is properly there. Diego, could you attach (or inline) the .pc files where you're hitting this issue? I have an idea what the problem is, but I'd like to make sure I'm seeing the same thing you are. Oh, I think I see the issue. pkg-config only treats -l as a library. /lib.a is just another argument in Libs. pkg-config is known to not handle these well. This is the same as people getting the ordering of their -Wl arguments hosed. You can see that pkg-config doesn't consider these libraries by running "pkg-config --libs-only-other". A workaround is to just use -L with the uninstalled path. The linker will still use the static archive if it's all that's there. Fixed (for this use case) in commit 6ecf318c. There was indeed a bug in ordering of non-l flags. I've now fixed that and added a test. However, there's still the issue that pkg-config breaks the ordering of -l and non-l flags. That's bug19950 and possibly bug16101. I have an idea to fix that but haven't pulled it together yet. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.