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

dont ignore the CFLAGS from pkg-config check for libseccomp. #10744

Closed
darix opened this issue May 20, 2024 · 4 comments
Closed

dont ignore the CFLAGS from pkg-config check for libseccomp. #10744

darix opened this issue May 20, 2024 · 4 comments
Labels
bug build-problem Nix fails to compile or test; also improvements to build process

Comments

@darix
Copy link
Contributor

darix commented May 20, 2024

If the header files for libseccomp are not in the default include dir the following check for fchmodat2 fails. This patch would fix the issue.

diff --git a/configure.ac b/configure.ac
index b2a5794b5..19918b9ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,7 +313,7 @@ case "$host_os" in
                                 ]))
     if test "x$enable_seccomp_sandboxing" != "xno"; then
       PKG_CHECK_MODULES([LIBSECCOMP], [libseccomp],
-                        [CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
+                        [CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS" CFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
       have_seccomp=1
       AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
       AC_COMPILE_IFELSE([

@darix darix added the bug label May 20, 2024
@roberth roberth added the build-problem Nix fails to compile or test; also improvements to build process label May 20, 2024
@roberth
Copy link
Member

roberth commented May 20, 2024

CFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"

This use of $CXXFLAGS doesn't look right. Is it intentional?
Would you like to open a pull request for this?

@darix
Copy link
Contributor Author

darix commented May 20, 2024

well I am honest i was just lazy and i copied the CXXFLAGS part for testing. but you are right i should probably use CFLAGS in the CFLAGS part.

@darix
Copy link
Contributor Author

darix commented May 20, 2024

There you go.

@darix
Copy link
Contributor Author

darix commented May 21, 2024

PR is merged

@darix darix closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build-problem Nix fails to compile or test; also improvements to build process
Projects
None yet
Development

No branches or pull requests

2 participants