Open tmukharj opened 2 years ago
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle rotten
Describe the bug
While compiling pdig on Alpine env it's failing with error
make[2]: [CMakeFiles/pdig.dir/build.make:230: CMakeFiles/pdig.dir/source/libs/driver/ppm_fillers.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/pdig.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
How to reproduce it
apk add --update \ git \ g++ \ gcc \ cmake \ make \ libtool \ elfutils-dev \ libelf-static \ linux-headers
git clone https://github.com/falcosecurity/pdig git clone https://github.com/falcosecurity/libs
cd pdig && mkdir build && cd build cmake -DMUSL_OPTIMIZED_BUILD=True .. make
Expected behaviour
You can now find the pdig binary in the source directory you created under pdig/build/pdig
Environment
NAME="Alpine Linux" ID=alpine VERSION_ID=3.12.1 PRETTY_NAME="Alpine Linux v3.12" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://bugs.alpinelinux.org/"
Additional context
bash-5.1# cmake -DMUSL_OPTIMIZED_BUILD=True .. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
~~ In file included from /source/pdig/pdig_compat.c:23: /source/pdig/udig_capture.h:25: warning: "F_CANCELLK" redefined 25~~~~ [ 18%] Building C object CMakeFiles/pdig.dir/pdig_ptrace.c.o [ 25%] Building CXX object CMakeFiles/pdig.dir/pdig_ptrace_amd64.cc.o [ 31%] Building CXX object CMakeFiles/pdig.dir/pdig_seccomp.cc.o [ 37%] Building CXX object CMakeFiles/pdig.dir/proc_tree.cc.o In file included from /source/pdig/proc_tree.cc:10: /usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to~~ [ 43%] Building C object CMakeFiles/pdig.dir/udig_procs.c.o In file included from /source/pdig/udig_procs.c:28: /source/pdig/udig_capture.h:25: warning: "F_CANCELLK" redefined 25~~~~ /source/pdig/udig_procs.c:496:2: note: 'snprintf' output between 4 and 259 bytes into a destination of size 252 496~~~~~~~~~~~~~~ /source/pdig/udig_procs.c:529:40: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 252 [-Wformat-truncation=] 529~~~~ /source/pdig/udig_procs.c:529:2: note: 'snprintf' output between 7 and 262 bytes into a destination of size 252 529~~~~~~~~~~~~~ /source/pdig/udig_procs.c:556:40: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 252 [-Wformat-truncation=] 556~~~~ /source/pdig/udig_procs.c:556:2: note: 'snprintf' output between 8 and 263 bytes into a destination of size 252 556~~~~~~~~~~~~~~ /source/pdig/udig_procs.c:579:46: warning: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 1024 [-Wformat-truncation=] 579~~~~~~~~~~~ /source/pdig/udig_procs.c:603:40: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 252 [-Wformat-truncation=] 603~~~~ /source/pdig/udig_procs.c:603:2: note: 'snprintf' output between 8 and 263 bytes into a destination of size 252 603~~~~~~~~~~~~~~ [ 50%] Building C object CMakeFiles/pdig.dir/source/libs/driver/dynamic_params_table.c.o [ 56%] Building C object CMakeFiles/pdig.dir/source/libs/driver/event_table.c.o [ 62%] Building C object CMakeFiles/pdig.dir/source/libs/driver/flags_table.c.o [ 68%] Building C object CMakeFiles/pdig.dir/source/libs/driver/ppm_events.c.o In file included from /source/libs/driver/ppm_events.c:77: /source/pdig/udig_capture.h:25: warning: "F_CANCELLK" redefined 25~~~ [ 75%] Building C object CMakeFiles/pdig.dir/source/libs/driver/ppm_fillers.c.o In file included from /source/libs/driver/ppm_fillers.c:78: /source/pdig/udig_capture.h:25: warning: "F_CANCELLK" redefined 25/source/libs/driver/ppm_fillers.c: In function 'f_sys_socketpair_x': /source/libs/driver/ppm_fillers.c:1595:15: warning: unused variable 'speer' [-Wunused-variable] 1595 | struct sock speer; | ^~~~~ /source/libs/driver/ppm_fillers.c:1594:20: warning: unused variable 'us' [-Wunused-variable] 1594 | struct unix_sock us; | ^~ /source/libs/driver/ppm_fillers.c:1593:17: warning: unused variable 'sock' [-Wunused-variable] 1593 | struct socket sock; | ^~~~ /source/libs/driver/ppm_fillers.c:1592:6: warning: unused variable 'err' [-Wunused-variable] 1592 | int err; | ^~~ /source/libs/driver/ppm_fillers.c:1591:6: warning: unused variable 'fds' [-Wunused-variable] 1591 | int fds[2]; | ^~~ /source/libs/driver/ppm_fillers.c:1590:16: warning: unused variable 'val' [-Wunused-variable] 1590 | unsigned long val; | ^~~ /source/libs/driver/ppm_fillers.c: In function 'f_sys_accept_x': /source/libs/driver/ppm_fillers.c:1973:17: warning: unused variable 'sock' [-Wunused-variable] 1973 | struct socket sock; | ^~~~ /source/libs/driver/ppm_fillers.c:1972:6: warning: unused variable 'err' [-Wunused-variable] 1972 | int err = 0; | ^~~ /source/libs/driver/ppm_fillers.c: In function 'f_sys_pipe_x': /source/libs/driver/ppm_fillers.c:2814:15: warning: unused variable 'file' [-Wunused-variable] 2814 | struct file file; | ^~~~ /source/libs/driver/ppm_fillers.c: In function 'f_sys_openat2_e': /source/libs/driver/ppm_fillers.c:4616:18: error: storage size of 'how' isn't known 4616 | struct open_how how; | ^~~ /source/libs/driver/ppm_fillers.c:4650:53: error: invalid application of 'sizeof' to incomplete type 'struct open_how' 4650 | res = ppm_copy_from_user(&how, (void )val, sizeof(struct open_how)); | ^
~/source/libs/driver/ppm_fillers.c:4616:18: warning: unused variable 'how' [-Wunused-variable] 4616 | struct open_how how; | ^~~ /source/libs/driver/ppm_fillers.c: In function 'f_sys_openat2_x': /source/libs/driver/ppm_fillers.c:4698:18: error: storage size of 'how' isn't known 4698 | struct open_how how; | ^~~ /source/libs/driver/ppm_fillers.c:4732:53: error: invalid application of 'sizeof' to incomplete type 'struct open_how' 4732 | res = ppm_copy_from_user(&how, (void *)val, sizeof(struct open_how)); | ^~/source/libs/driver/ppm_fillers.c:4698:18: warning: unused variable 'how' [-Wunused-variable] 4698 | struct open_how how; | ^~~ make[2]: [CMakeFiles/pdig.dir/build.make:230: CMakeFiles/pdig.dir/source/libs/driver/ppm_fillers.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/pdig.dir/all] Error 2 make: *** [Makefile:91: all] Error 2