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

Add support for nixos #477

Merged
merged 2 commits into from
Apr 6, 2016
Merged

Add support for nixos #477

merged 2 commits into from
Apr 6, 2016

Conversation

ragnard
Copy link
Contributor

@ragnard ragnard commented Apr 5, 2016

Two changes that enables bcc to build and work nicely on nixos:

  • add -I/build/include/generated when calculating cflags. This is where autoconf.h with #define CONFIG_BPF_SYSCALL 1 lives so it is critical. This appears to be true not only for nixos, but I checked Ubuntu 14.04.3 LTS too and the location was the same.

  • bcc quite reasonably assumes that the kernel modules dir is /lib/modules/, encoded using #define KERNEL_MODULES_DIR "/lib/modules". This is not true for nixos however. The proposed patch:

    • introduces a BCC_KERNEL_MODULES_DIR cmake flag
    • defaults that flag to /lib/modules, so no breaking change
    • sets KERNEL_MODULES_DIR based on that flag.

    This allows us to override KERNEL_MODULES_DIR when building bcc for nixos.

Add support for systems using a non-default ("/lib/modules") kernel lib
directory.
@4ast
Copy link
Member

4ast commented Apr 6, 2016

lgtm

@drzaeus77 drzaeus77 merged commit 5cb8de7 into iovisor:master Apr 6, 2016
@drzaeus77
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants