CamFlow / camflow-install

Build script for CamFlow Linux Provenance.
http://camflow.org/
GNU General Public License v2.0
8 stars 11 forks source link

Try to disable CONFIG_DEBUG_INFO_BTF #5

Closed UnnameBao closed 4 years ago

UnnameBao commented 4 years ago

When I try to build camflow at fedora, I got this error. I tried to google it but I still confused how to disable CONFIG_DEBUG_INFO_BTF.

UnnameBao commented 4 years ago

MODINFO modules.builtin.modinfo BTF .tmp_vmlinux.btf: pahole (pahole) is not available Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF make[2]: [Makefile:1077:vmlinux] 错误 1 make[2]: 离开目录“/home/b0ring/camflow-install/build/camflow-patches/v0.6.4/build/linux-stable” make[1]: [Makefile:51:compile] 错误 2 make[1]: 离开目录“/home/b0ring/camflow-install/build/camflow-patches/v0.6.4” make: *** [Makefile:310:compile_lsm] 错误 2

UnnameBao commented 4 years ago

I slove this problem by :

sudo dnf install dwarves

But now I get a new error:

objcopy: --change-section-vma .BTF=0x0000000000000000 never used objcopy: --change-section-lma .BTF=0x0000000000000000 never used objcopy: error: the input file '.btf.vmlinux.bin' is empty Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF

tfjmp commented 4 years ago

I am working on a new release. This should get fixed at some point within the next 24h :). The issue relates to changing dependencies.

UnnameBao commented 4 years ago

I am working on a new release. This should get fixed at some point within the next 24h :). The issue relates to changing dependencies.

Thanks!

tfjmp commented 4 years ago

Everything is now building in my test environment.

Please, do let me know if you are still facing some issues.

Finally, thanks for reporting :).

UnnameBao commented 4 years ago

It's pleasure to know you build a new version to handle this issue. But I still facing some problem here:

  1. I use Fedora 31 to build this new version camflow and everything seems fine. But when I got reboot, I notice there don't have 5.5.11 version kernel. Then I run shell:

    [b0ring@localhost ~]$ rpm -qa kernel kernel-5.3.7-301.fc31.x86_64 [b0ring@localhost ~]$ rpm -qa|grep kernel kernel-headers-5.3.6-300.fc31.x86_64 kernel-devel-5.5.10-200.fc31.x86_64 kernel-modules-extra-5.3.7-301.fc31.x86_64 kernel-modules-5.3.7-301.fc31.x86_64 kernel-core-5.3.7-301.fc31.x86_64 abrt-addon-kerneloops-2.12.2-1.fc31.x86_64 kernel-5.3.7-301.fc31.x86_64 libreport-plugin-kerneloops-2.10.1-2.fc31.x86_64

I am not sure if there is missing some package to build whole kernel.

  1. I use Fedora 29 to install the builded version of camflow and everything seems ok. I can run camflow and capture provance but when I build CamQuery, there happened thousands of error. image

I am still confused how to handle one of these two problem.

UnnameBao commented 4 years ago

Is my gcc version was not right?

➜ libcamquery git:(master) gcc --version gcc (GCC) 8.2.1 20180801 (Red Hat 8.2.1-2) Copyright © 2018 Free Software Foundation, Inc.

tfjmp commented 4 years ago

1) did the option show up in the grub? (http://camflow.org/#reboot) Sometimes when building from source it does not get selected by default (if you install via the package manager it tends to not be an issue).

2) It seems to work on my end.

query-build

query-load

query-worked

I used the default exemplar query available here: https://github.com/CamFlow/libcamquery

What query are you trying to build?

3) I would tend to believe that as long as the gcc version is not too old, it is ok.

UnnameBao commented 4 years ago

I tried both build way and package install way but I still can't select new kernel: image

I tried run shell

grub2-mkconfig -o /boot/grub2/grub.cfg

to update grub but still not work.

tfjmp commented 4 years ago

This is very strange. The kernel should show up in there (even if not selected by default). If it has been installed it should show up there.

You can check if the kernel is there as follow:

su
cd /boot
ls

I think it is not installing/building for some reason. I never faced this problem before. Did you check if you are getting error messages about lack of space or something similar?

If you are using VMs, we provide vagrant files that should setup a working environment for you (basic-fedora or rpm are good choices).

UnnameBao commented 4 years ago

I work successfully using Vagrantfile. Thanks for your help.

tfjmp commented 4 years ago

No problem. I am closing the issue, please, do reopen if you have further problems.