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

Trying to compile libinsp on Alpine 3.19 results in error: 'int64_t' has not been declared #1741

Closed
Quarky9 opened this issue Mar 11, 2024 · 3 comments · Fixed by #1742
Closed
Labels
kind/bug Something isn't working

Comments

@Quarky9
Copy link
Contributor

Quarky9 commented Mar 11, 2024

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 Quarky9 added the kind/bug Something isn't working label Mar 11, 2024
@Quarky9
Copy link
Contributor Author

Quarky9 commented Mar 11, 2024

Quick update ... after monkey patching userspace/libsinsp/procfs_utils.h with the compiler suggested "include" the build finishes just fine ...

@FedeDP
Copy link
Contributor

FedeDP commented Mar 11, 2024

Hi! Thanks for spotting this issue! Do you mind to open a PR to fix it?

@Quarky9
Copy link
Contributor Author

Quarky9 commented Mar 11, 2024

Done see #1742

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

Successfully merging a pull request may close this issue.

2 participants