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

Flex missing when building ebpf module on amazon linux2 #1558

Closed
schans opened this issue Feb 19, 2021 · 2 comments · Fixed by #1562
Closed

Flex missing when building ebpf module on amazon linux2 #1558

schans opened this issue Feb 19, 2021 · 2 comments · Fixed by #1562
Labels

Comments

@schans
Copy link
Contributor

schans commented Feb 19, 2021

Describe the bug

The build fails on the latest amazon linux.

falco-crdpc falco * Setting up /usr/src links from host
falco-crdpc falco * Running falco-driver-loader with: driver=bpf, compile=yes, download=yes
falco-crdpc falco * Mounting debugfs
falco-crdpc falco * Found kernel config at /host/boot/config-5.4.91-41.139.amzn2.x86_64
falco-crdpc falco * Using downloaded kernel sources for kernel version 5.4.91...
falco-crdpc falco * Downloading http://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.91.tar.gz
falco-crdpc falco * Extracting kernel sources
falco-crdpc falco * Configuring kernel
falco-crdpc falco /bin/sh: 1: flex: not found
falco-crdpc falco make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
falco-crdpc falco make: *** [Makefile:590: olddefconfig] Error 2
falco-crdpc falco /bin/sh: 1: flex: not found
falco-crdpc falco make[2]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
falco-crdpc falco make[1]: *** [Makefile:590: syncconfig] Error 2
falco-crdpc falco Makefile:678: include/config/auto.conf.cmd: No such file or directory
falco-crdpc falco make: *** [Makefile:696: include/config/auto.conf.cmd] Error 2

How to reproduce it

Build the ebpf module from source.

Expected behaviour

The module should build successfully

Screenshots

Amazon Linux 2 / EKS 1.19

  • Falco version:

Falco version 0.26.2 and 0.27.0

  • System info:

5.4.91-41.139.amzn2.x86_64

  • Cloud provider or hardware configuration:
  • OS:

Amazon Linux2

  • Kernel:

5.4.91-41.139.amzn2.x86_64

  • Installation method:

Chart with building module from source

Additional context

@schans
Copy link
Contributor Author

schans commented Feb 19, 2021

Is there an option to install the flex package with some workaround before the kernel gets build?

@schans
Copy link
Contributor Author

schans commented Feb 19, 2021

I just realized: this issue might be better suited in the charts repo perhaps. Let me know if so and I'll move it over.

Or.. we might need to add flex here:

https://github.com/falcosecurity/falco/blob/master/docker/falco/Dockerfile

schans added a commit to schans/falco that referenced this issue Feb 21, 2021
Flex is needed for building bpf module on recent amazon linux images.

falcosecurity#1558
schans added a commit to schans/falco that referenced this issue Feb 21, 2021
Flex is needed for building bpf module on recent amazon linux images.

falcosecurity#1558
Signed-off-by: Bart van der Schans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant