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

Check libseccomp is available at correct version on build #367

Merged
merged 4 commits into from
Oct 6, 2021

Conversation

tsturzl
Copy link
Collaborator

@tsturzl tsturzl commented Oct 6, 2021

This adds a simple build.rs to the seccomp sub-crate. This gives more information in the case of #366, but doesn't necessarily resolve the issue. What this does is it checks to see if libeseccomp is available at the correct version. On systems where libseccomp isn't available or is available in an older version the current output is a giant linker error that isn't very helpful. With this change the build will fail right away if the dependency isn't available at an appropriate version and provide much better output.

On my system where the libseccomp version is too old it produces this much nicer message:

--- stderr
  `"pkg-config" "--libs" "--cflags" "libseccomp" "libseccomp >= 2.5"` did not exit successfully: exit status: 1
  --- stderr
  Requested 'libseccomp >= 2.5' but version of libseccomp is 2.4.3
  You may find new versions of libseccomp at https://github.com/seccomp/libseccomp

@tsturzl tsturzl requested a review from yihuaf October 6, 2021 04:23
Copy link
Collaborator

@yihuaf yihuaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We will continue the nuances in the issue.

@yihuaf yihuaf merged commit 02b8f77 into youki-dev:main Oct 6, 2021
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.

2 participants