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

Missing target to build bundled libcares.so when using shared library build #2249

Open
Apteryks opened this issue Jan 22, 2025 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Apteryks
Copy link

Describe the bug

When building with the CMake flags: -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$PWD/install "-DBUILD_DRIVER=OFF" "-DENABLE_DKMS=OFF" "-DBUILD_LIBSCAP_MODERN_BPF=ON"

The build fails with:

[ 97%] Built target grpcpp_channelz
make  -f CMakeFiles/check_epollexclusive.dir/build.make CMakeFiles/check_epollexclusive.dir/depend
make[5]: Entering directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
cd /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc && /gnu/store/adkg318pw76pfqrgxmdrswp4j050jh7r-cmake-3.30.3/bin/cmake -E cmake_depends "Unix Makefiles" /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc /home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc/CMakeFiles/check_epollexclusive.dir/DependInfo.cmake "--color="
make[5]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
make  -f CMakeFiles/check_epollexclusive.dir/build.make CMakeFiles/check_epollexclusive.dir/build
make[5]: Entering directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
make[5]: *** No rule to make target '/home/maxim/src/falcosecurity-libs/newbuild/c-ares-prefix/src/c-ares/lib/libcares.so', needed by 'check_epollexclusive'.  Stop.
make[5]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
make[4]: *** [CMakeFiles/Makefile2:1473: CMakeFiles/check_epollexclusive.dir/all] Error 2
make[4]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
make[3]: *** [Makefile:136: all] Error 2
make[3]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild/grpc-prefix/src/grpc'
make[2]: *** [libsinsp/CMakeFiles/grpc.dir/build.make:86: grpc-prefix/src/grpc-stamp/grpc-build] Error 2
make[2]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild'
make[1]: *** [CMakeFiles/Makefile2:1664: libsinsp/CMakeFiles/grpc.dir/all] Error 2
make[1]: Leaving directory '/home/maxim/src/falcosecurity-libs/newbuild'
make: *** [Makefile:136: all] Error 2

How to reproduce it

  1. Checkout version 0.19.0 (later versions fail to build due to modern BPF driver build fails: BPF stack limit of 512 bytes is exceeded in sendmmsg.bpf.c:113:14 #2248)
  2. mkdir build && cd build
  3. cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$PWD/install "-DBUILD_DRIVER=OFF" "-DENABLE_DKMS=OFF" "-DBUILD_LIBSCAP_MODERN_BPF=ON" ..
  4. CC=gcc make VERBOSE=1

Expected behaviour
Build should succeed.

Environment

  • Falco version: 0.19.0
  • System info: x86_64
  • OS: Guix System
  • Kernel: GNU/Linux 6.12.10
  • Installation method: from source
@Apteryks Apteryks added the kind/bug Something isn't working label Jan 22, 2025
@Apteryks
Copy link
Author

One workaround is to provide c-ares from the system and configure with -DUSE_BUNDLED_CARES=OFF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant