Trying to compile `libinsp` on Alpine 3.19 results in error: 'int64_t' has not been declared
Quarky9 opened this issue · 3 comments
Quarky9 commented
Describe the bug
Trying to build falco from source on latest Alpine 3.19 fails in libinsp with
/home/alpine/kubezero/falco/src/falco-0.37.1/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libsinsp/procfs_utils.h:37:28: error: 'int64_t' has not been declared
37 | bool in_own_ns_mnt(int64_t pid) const;
| ^~~~~~~
/home/alpine/kubezero/falco/src/falco-0.37.1/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libsinsp/procfs_utils.h:39:34: error: 'int64_t' has not been declared
39 | std::string get_pid_root(int64_t pid) const
| ^~~~~~~
/home/alpine/kubezero/falco/src/falco-0.37.1/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libsinsp/procfs_utils.h:47:9: error: 'int64_t' does not name a type
47 | int64_t m_host_init_root_inode{-1};
| ^~~~~~~
/home/alpine/kubezero/falco/src/falco-0.37.1/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libsinsp/procfs_utils.h:4:1: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
3 | #include <istream>
+++ |+#include <cstdint>
4 | #include <string>```
**How to reproduce it**
MINIMAL_BUILD=On
**Expected behaviour**
Build process finishes ;-)
**Environment**
Alpine 3.19
Falco 0.37.1
** Hint **
Looking at the compiler hint of missing `#include <cstdint>` and confirming that it is already included in various other places makes me believe that might be the root cause here ?
Quarky9 commented
Quick update ... after monkey patching userspace/libsinsp/procfs_utils.h
with the compiler suggested "include" the build finishes just fine ...
FedeDP commented
Hi! Thanks for spotting this issue! Do you mind to open a PR to fix it?