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
meson.build: fix static build with gcrypt #185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for a fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there is error
meson.build:244:1: ERROR: Unknown variable "gpg_error_dep".
I'll update the PR shortly to fix build failure |
I didn't test it when gcrypt was disabled :-/ |
gcrypt depends on gpg-error so save the result of dependency('gpg-error') in gpg_error_dep and use it when needed to fix static build Fixes: - http://autobuild.buildroot.net/results/fb698e3e903869978bd5e69d791ec362317b7981 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, Fabrice :).
I think first version was close what is needed, but without new variable. If I understood the issue correctly gcrypt, and gcrypt only, will require gpg-error. Linking with it in other cases would pull in unnecessary library reference when not needed. So how about changing crypto_dep variable to be array that can hold multiple dependencies, and requiring two when that's the case and one at rest of the time. See below how I think that could be done. BTW it would great to hear if that version will fix all known issues, so please give a try if possible. |
I tested your version, it fixes the buildroot's build failure and is indeed a better solution than my proposal. |
Great to hear @ffontaine, eabe211 is merged. |
gcrypt depends on gpg-error so save the result of
cc.find_library('gpg-error') in gpg_error_dep and use it when needed to
fix static build
Fixes:
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com