Skip to content
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

Closed
wants to merge 1 commit into from
Closed

meson.build: fix static build with gcrypt #185

wants to merge 1 commit into from

Conversation

ffontaine
Copy link
Contributor

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

Copy link
Contributor

@pevik pevik left a 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!

Copy link
Contributor

@pevik pevik left a 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".

@ffontaine
Copy link
Contributor Author

I'll update the PR shortly to fix build failure

@ffontaine
Copy link
Contributor Author

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>
Copy link
Contributor

@pevik pevik left a 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 :).

@kerolasa
Copy link
Collaborator

kerolasa commented Jun 9, 2019

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.

kerolasa@eabe211

@ffontaine
Copy link
Contributor Author

I tested your version, it fixes the buildroot's build failure and is indeed a better solution than my proposal.

@kerolasa
Copy link
Collaborator

kerolasa commented Jun 9, 2019

Great to hear @ffontaine, eabe211 is merged.

@kerolasa kerolasa closed this Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants