-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
pkg-config dep.get_variable() returns value with unexpected prefix #14058
Comments
Please attach the log from meson-logs/meson-log.txt |
Here are the relevant logs: |
I have double-checked that the To verify this, I edited the
I added
New meson-log.txt file |
Why do you need the directory without the sysroot prefix? You should be able to reproduce Meson's output by setting |
For instance, when building Is there a way to set the |
I removed However, I’m wondering if this is the correct approach or if there’s a better way to handle this. Specifically, I now have to manually update |
Probably get_variable should have an extra keyword argument
Can you explain this better? I don't understand how it's related to the sysroot. |
I was using To address this, I introduced the After reading related issues, I tried to set c_args, c_link_args, cpp_args, and cpp_link_args in my cross file. Now, the file looks like this:
Now This results in the following error: I have verified that the The object file compiles successfully. According to the GCC documentation about
After replacing every I believe that What do you think about this proposal? |
No, I think there's no one good way to do get_variable when a sysroot is involved. Typically you want the "naked" directory, but not always. So the solution to your problem passes through extending get_variable. |
To proceed with my project, I will continue using the Thank you for your time. Please feel free to inform me of any updates on this matter. I would greatly appreciate it. |
Describe the bug
When attempting to retrieve a variable from the
dbus-1.pc
file using thedep.get_variable()
function, the result includes an unexpected prefix. For example:/usr/share
/workdir/build/rootfs/usr/share
In contrast, running the equivalent command directly with pkg-config produces the correct value:
/usr/bin/pkg-config --variable=datadir dbus-1
Output:
/usr/share
To Reproduce
meson.build:
cross-compile.txt:
/workdir/build/rootfs/usr/lib/pkgconfig/dbus-1.pc:
command:
meson setup --cross-file=/workdir/src/meson-setups/cross-compile.txt build/
system parameters
The text was updated successfully, but these errors were encountered: