draios / sysdig

Linux system exploration and troubleshooting tool with first class support for containers
http://www.sysdig.com/
Other
7.78k stars 727 forks source link

Does not compile on BeagleBone Black #1598

Closed nmingotti closed 4 years ago

nmingotti commented 4 years ago

Hi,

I am trying to compile sysdig on the BeagleBone Black since the Debian package is quite far from working.

My system is:

$> uname -a
Linux beaglebone 4.14.108-ti-r113 #1 SMP PREEMPT Wed Jul 31 00:01:10 UTC 2019 armv7l GNU/Linux

The error message I see I few hours after make starts is this:

[ 88%] Building CXX object userspace/libsinsp/CMakeFiles/sinsp.dir/runc.cpp.o
[ 89%] Building CXX object userspace/libsinsp/CMakeFiles/sinsp.dir/cgroup_limits.cpp.o
/mnt/sdcard/sysdig/userspace/libsinsp/cgroup_limits.cpp:12:50: warning: left shift count >= width of type [-Wshift-count-overflow]
 constexpr const int64_t CGROUP_VAL_MAX = (1UL << 42u) - 1;
                                                  ^~~
/mnt/sdcard/sysdig/userspace/libsinsp/cgroup_limits.cpp:12:47: error: right operand of shift expression ‘(1ul << 42u)’ is >= than the precision of the left operand [-fpermissive]
 constexpr const int64_t CGROUP_VAL_MAX = (1UL << 42u) - 1;
                                          ~~~~~^~~~~~~
userspace/libsinsp/CMakeFiles/sinsp.dir/build.make:2092: recipe for target 'userspace/libsinsp/CMakeFiles/sinsp.dir/cgroup_limits.cpp.o' failed
make[2]: *** [userspace/libsinsp/CMakeFiles/sinsp.dir/cgroup_limits.cpp.o] Error 1
CMakeFiles/Makefile2:1134: recipe for target 'userspace/libsinsp/CMakeFiles/sinsp.dir/all' failed
make[1]: *** [userspace/libsinsp/CMakeFiles/sinsp.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Can you tell me how to fix it ? I would really like to try sysdig.

bye

nathan-b commented 4 years ago

Hi @nmingotti. There's no formal ARM support, and I don't know if or when that will ever change. However, you're welcome to submit patches yourself so that it builds! We have recently begun building for ppc64 and s390x, so the dream of a cross-platform sysdig may not be as farfetched as it seems.

mhansen commented 4 years ago

Duplicate of https://github.com/draios/sysdig/issues/1617, which has a solution.

nathan-b commented 4 years ago

@nmingotti can you validate that the latest source will build on your system?

nathan-b commented 4 years ago

Closing as this bug was addressed by @kris-nova in https://github.com/draios/sysdig/pull/1622

krisnova commented 4 years ago

This should fix the issue mentioned above. Like I said in the issue I tested on a few of the cortex raspberry pi boards.

Please do share your findings on the beaglebone as I am starting to document a lot of sysdig on arm as an unofficial resource for the community.

Thanks all!

mhansen commented 4 years ago

Thank you Kris!