falcosecurity / falco

Cloud Native Runtime Security
https://falco.org
Apache License 2.0
7.23k stars 893 forks source link

fatal error: lua.h: No such file or directory #1762

Closed hkerma closed 2 years ago

hkerma commented 2 years ago

Describe the bug

Hi I'm trying to compile Falco from the sources. When running make sinsp, I run into an error:

[ 51%] Building CXX object libsinsp/CMakeFiles/sinsp.dir/__/chisel/chisel_api.cpp.o
/home/xxxxxx/falco/falco/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/chisel/chisel_api.cpp:47:10: fatal error: lua.h: No such file or directory
   47 | #include "lua.h"
      |          ^~~~~~~
compilation terminated.

How to reproduce it

I followed the instructions given on https://falco.org/docs/getting-started/source/#build-directly-on-host.

Screenshots

/

Environment

Additional context

I tried to manually install apt install luajit, liblua-dev, lua but it did not solve the issue.

Any help is appreciated !

FedeDP commented 2 years ago

Hi, thanks for opening this issue!
Once you installed luajit liblua-dev lua, did you run "cmake" again? Otherwise it won't include correct system path.
Moreover, note that you can let falco build all the deps it needs by following above "Build Falco from source" section (that is: use USE_BUNDLED_DEPS=ON cmake option).

hkerma commented 2 years ago

Hello, Thanks for answering Yes, I did run cmake .. again after installing these, I even deleted the build folder and started all over again. I also tried to use the bundled dependencies but I run into the same error. I am going to try on a fresh Ubuntu installation and let you know.

UPDATE: I tried to make falco from source on a fresh Ubuntu 21.04 install and I still have the same issues (no matter USE_BUNDLED_DEPS=ON or not). Can anyone confirm the issue ?

hkerma commented 2 years ago

Issue solved. Using USE_BUNDLED_DEPS=ON, I had to manually compile luajit by running make luajit before running any make sinsp or make falco. I guess this is a Makefile issue? I am not very familiar with Makefiles but I am sure someone will be able to fix the issue. Thanks for the help!

FedeDP commented 2 years ago

I had to manually compile luajit by running make luajit

That is indeed weird, never encountered that!
Let's see if anyone steps in and has any idea.

Thanks for the help!

You're welcome!

poiana commented 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

poiana commented 2 years ago

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

poiana commented 2 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana commented 2 years ago

@poiana: Closing this issue.

In response to [this](https://github.com/falcosecurity/falco/issues/1762#issuecomment-1080554366): >Rotten issues close after 30d of inactivity. > >Reopen the issue with `/reopen`. > >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Provide feedback via https://github.com/falcosecurity/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.