-
Notifications
You must be signed in to change notification settings - Fork 93
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
libdnf: Add include directories and LDFLAGS from librepo #266
Conversation
It's not possible to build the project when the librepo is built in a non-standard prefix, especially when no other project is build with that custom prefix. Using the returned include directories and whole LDFLAGS fixes it.
Thanks for the patch! |
After rebasing to this PR local builds seem broken, at least for me... Lot of errors like this:
I have latest When switching back to |
I get a lot of missing symbols when I configure the project with:
It fixes itself when I configure the project with:
I reconfigure the project from scratch, meaning my If it won't work, then maybe try to add both variables: |
I tried adding both variables with the single |
That's odd. If |
For what it's worth, the Fedora's 5.0.6 build, which contains this change, works properly: Could you add the following line into
It says here this:
where You can check it as:
Also, what do you get when running:
I get:
|
@mcrha Thank you very much for the detailed answer. Now I guess the problem is that I am using the This is my output:
In the This is I think the first time this command with |
Ah, ordering of the link libraries ... that's a nightmare... From what you said, I suppose using: The question is: why does pkg-config find the system-installed librepo, instead of your private build? Do you have set also |
I've already tried the reordering before, not working... I've always removed the In the
|
There's something misbehaving on your machine for sure. If the librepo custom build installed files are in one of the PKG_CONFIG_PATH paths, then the pkg-config should find it before the system-installed version. I mean, having pkg-config finding the correct version you get from What if you move away |
Moving away the |
Let's focus on the pkg-config output - it cannot claim there is a system-installed librepo, when you drop the pkg-config file... How many |
I think this is the way how the |
I have only the system-installed
This is the default
AFAIK this is purely handled with environmental variables by
See here. |
So I guess I already see the issue there, that |
Right, you do configure the custom prefix, which matches the system prefix, then all the things are confused and break. A way to workaround it is to uninstall librepo-devel package. Then, when the linker links the libs together, it'll not find the one in the real I consider this a bug in your build environment ( The unfortunate thing is that this change fixes things "for me", but breaks them "for you". I do not know how to fix it "for both of us" in the DNF5 project. The pkg-config file for the librepo in your build environment obviously lies, but whether there can be done anything about it I do not know. |
Thanks again for you patience 🙂 The removal of |
It's not possible to build the project when the librepo is built in a non-standard prefix, especially when no other project is build with that custom prefix.
Using the returned include directories and whole LDFLAGS fixes it.