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 option to change kernel build search paths #430
Conversation
Some linux distributions structure the /lib/modules directories differently, causing complexities. Add cmake overrides to be able to compile different behavior. If your distro sets up `/lib/modules/$(uname -r)/{source,build}` with header files split between the two (debian does this), then add -DBCC_KERNEL_HAS_SOURCE_DIR=1 to the cmake command line. If your distro just has something other than build/, but things are still in one subdirectory, then add -DBCC_KERNEL_MODULES_SUFFIX=foo to the cmake command line. Also, fix one implicit declaration warning introduced by the new bpf_get_stackid() helper. Fixes: #397 Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Include all of the paths in the build/ directory when kernel headers are split. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
@@ -58,6 +58,19 @@ int KBuildHelper::get_flags(const char *uname_machine, vector<string> *cflags) { | |||
cflags->push_back("-nostdinc"); | |||
cflags->push_back("-isystem"); | |||
cflags->push_back("/virtual/lib/clang/include"); | |||
|
|||
// some module build directories split headers between source/ and build/ | |||
if (KERNEL_HAS_SOURCE_DIR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should work. thx
Add option to change kernel build search paths
was this included in the nightly deb builds @ http://52.8.15.63/apt/nightly ? I see the packages are dates april 4th, but I still experience the error messages on debian jessie like described in issue 397 |
Yes it should be included there. The buildbot was broken for about the last 10 days, but the last good build still includes these changes. |
The nightly service is working again. What does the latest build look like? |
packages are updated but error persists.
libbcc:amd64/trusty 0.1.8-147.git.d604f35 uptodate
|
See also: iovisor/bcc#430 Thanks: George Kargiotakis Closes: #849747
Some linux distributions structure the /lib/modules directories
differently, causing complexities. Add cmake overrides to be able to
compile different behavior.
If your distro sets up
/lib/modules/$(uname -r)/{source,build}
withheader files split between the two (debian does this), then add
-DBCC_KERNEL_HAS_SOURCE_DIR=1 to the cmake command line.
If your distro just has something other than build/, but things are
still in one subdirectory, then add -DBCC_KERNEL_MODULES_SUFFIX=foo to
the cmake command line.
Also, fix one implicit declaration warning introduced by the new
bpf_get_stackid() helper.
Fixes: #397
Signed-off-by: Brenden Blanco bblanco@plumgrid.com