Git Product home page Git Product logo

Comments (4)

therealbobo avatar therealbobo commented on July 16, 2024

Hey @lclin56! Could you please share the cake commands you used? 🙂

from sysdig.

lclin56 avatar lclin56 commented on July 16, 2024

Hey @therealbobo! My command is:

cd sysdig
mkdir build
cd build
cmake ..

from sysdig.

lclin56 avatar lclin56 commented on July 16, 2024

I can successfully compile in Ubuntu 20.04, but the compiled result cannot run on Ubuntu 18.04 and reports the following error:

/sysdig: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./sysdig)
./sysdig: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./sysdig)

I have checked your released binary files, and it seems that they were also compiled with g++-9, but your binaries can run on lower versions of Linux systems (I tested on Ubuntu 16.04). Can you share some information about the compilation environment? I found that the documentation's requirements for gcc and cmake may not be very accurate; at least in my experience, I need cmake version 3.12 or higher and g++-9 or higher to compile successfully.

I built the docker image named sysdig-builder under the docker/builder directory and used this image for compilation. My compilation steps are as follows:

docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder cmake
docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder sysdig

But I also encountered compilation issues:

[  3%] Built target zlib
[  6%] Built target openssl
[  8%] Built target c-ares
[ 10%] Built target re2
[ 14%] Built target libelf
[ 16%] Built target yaml-cpp
[ 18%] Built target njson
[ 19%] Built target scap_platform_util
[ 19%] Built target driver_event_schema
[ 20%] Built target scap_error
[ 21%] Built target scap_engine_noop
[ 23%] Built target scap_engine_util
[ 26%] Built target tbb
[ 28%] Built target jq
[ 31%] Built target curl
[ 34%] Built target jsoncpp
[ 36%] Built target valijson
[ 38%] Built target luajit
[ 40%] Built target tinydir
[ 43%] Built target protobuf
[ 46%] Built target libbpf
[ 46%] Built target scap_engine_nodriver
[ 47%] Built target scap_engine_savefile
[ 49%] Built target scap_event_schema
[ 50%] Built target scap_engine_source_plugin
[ 52%] Built target scap_engine_udig
[ 52%] Built target scap_platform
[ 54%] Built target grpc
[ 56%] Built target scap_engine_bpf
[ 56%] Building C object libpman/CMakeFiles/pman.dir/src/stats.c.o
[ 56%] Built target scap_engine_kmod
[ 56%] Building C object libpman/CMakeFiles/pman.dir/src/maps.c.o
Consolidate compiler generated dependencies of target cri_v1
Consolidate compiler generated dependencies of target cri_v1alpha2
[ 57%] Built target cri_v1alpha2
[ 58%] Built target cri_v1
[ 59%] Building C object libpman/CMakeFiles/pman.dir/src/lifecycle.c.o
[ 59%] Building C object libpman/CMakeFiles/pman.dir/src/programs.c.o
In file included from /build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/stats.c:18:
/build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/state.h:23:10: fatal error: bpf_probe.skel.h: No such file or directory
   23 | #include <bpf_probe.skel.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/maps.c:18:
/build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/state.h:23:10: fatal error: bpf_probe.skel.h: No such file or directory
   23 | #include <bpf_probe.skel.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [libpman/CMakeFiles/pman.dir/src/stats.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [libpman/CMakeFiles/pman.dir/src/maps.c.o] Error 1
In file included from /build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/programs.c:18:
/build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/state.h:23:10: fatal error: bpf_probe.skel.h: No such file or directory
   23 | #include <bpf_probe.skel.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [libpman/CMakeFiles/pman.dir/src/programs.c.o] Error 1
In file included from /build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/lifecycle.c:18:
/build/release/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libpman/src/state.h:23:10: fatal error: bpf_probe.skel.h: No such file or directory
   23 | #include <bpf_probe.skel.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [libpman/CMakeFiles/pman.dir/src/lifecycle.c.o] Error 1
make[2]: *** [libpman/CMakeFiles/pman.dir/all] Error 2
make[1]: *** [userspace/sysdig/CMakeFiles/sysdig.dir/rule] Error 2
make: *** [sysdig] Error 2

from sysdig.

therealbobo avatar therealbobo commented on July 16, 2024

The bpf_probe.skel.h is related to the modern probe (that doesn't support your kernel). You can just disable it doing cmake -DBUILD_SYSDIG_MODERN_BPF=OFF and you should be ok :)

from sysdig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.