[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#856474: stap: include runtime_defines.h not found



On Sat, 2017-03-04 at 01:39 +0000, Ben Hutchings wrote:
[...]
> I investigated this and found that it occurs when the kernel source and
> object trees are separate (an "out-of-tree" build, not to be confused
> with out-of-tree modules).  We separate them in Debian kernel header
> packages to avoid duplicating source files for each flavour.
> 
> When this is the case, the compiler is called in the root of the
> object tree, and the kernel build system adjusts -I options in the
> compiler flags to refer to subdirectories of the source tree if
> necessary.  Any directory name beginning with /, ./ or ../ is excluded
> from this adjustment.
> 
> systemtap uses -I"/usr/share/systemtap/runtime", which ought to be
> excluded... but make has no understanding of shell quoting, so it is
> wrongly adjusted to something like
> -I/usr/src/linux-headers-4.9.0-2-common/"/usr/share/systemtap/runtime"
> and runtime_defines.h cannot be found.

By the way, kbuild has been doing this ever since it started supporting
out-of-tree builds (around Linux 2.6.0).  However, both the adjusted
and original -I options were used.  Since Linux 4.8 only the adjusted
option is used.

Ben.

-- 
Ben Hutchings
All the simple programs have been written, and all the good names
taken.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: