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
Incorrect pkg-config file generated #5479
Comments
When default_library=static, it always puts everything in Regarding having full path to .a files, I guess it depends how those deps are found. Are you using find_library() ? |
nitpicking: |
Yes:
|
It seems meson is the only tool that puts full paths to |
We changed meson to use full file names for libraries to avoid library search path problems when mixing "-L" form many sources. I still believe that's the right thing to do. But libtool not groking these of course is a problem. Is this OS X specific or does this reproduce with other systems as well? |
I am not sure, I don't really have time to verify if this affects other systems too but it is definitely an issue on macOS. |
It's also raising issues with libtool on Linux Fedora 31, when trying to create a static convenience libtool library.
Expected pkgconfig:
expected
pkgconfig generated:
resulting ar command:
Leading to failures when trying to use the libtool library
|
Hi, For information, I'm not sure it will ever get into a release, but I've sent a fix for libtool there: https://lists.gnu.org/archive/html/libtool-patches/2021-04/msg00000.html |
I've encountered an issue with
.pc
file generation. Below is a snippet of how libplacebo uses the pkg-config file generator in meson:When I do a static build of the library this produces the following
.pc
file:For some reason it put a bunch of
.a
file paths into the Libs section, I would expect those inLibs.private
.Additionally hardcoding the
.a
paths causes problems with GNU libtool on macOS at least, illustrated by the example below:Would cause libtool to do he following:
It already helpfully says this is not portable, in fact, what it does on macOS in this case (
ar cru .libs/libfoo.a […]/lib/libglslang.a lib.o
) results in a unusable static library archive:The text was updated successfully, but these errors were encountered: