[dpdk-dev] [PATCH v2 1/2] vfio: fix build if build envrionment is on old kernel

Stephen Hemminger stephen at networkplumber.org
Fri Jul 10 19:29:14 CEST 2015


On Fri, 10 Jul 2015 01:43:17 +0200
Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:

> 2015-07-09 16:26, Stephen Hemminger:
> > From: Stephen Hemminger <shemming at brocade.com>
> > 
> > The build of DPDK may be done on a system where Linux headers
> > in /usr/include (and therefore kernel version macro) are much
> > older than the target runtime system.
> 
> It seems strange wanting to build a feature not present in the kernel
> headers. Why not upgrading the build system kernel?

The build machine is running Debian with stock headers and kernel.
I can see many people having build environments controlled by other
parts of organization where you are not allowed to update packages.

> > In order to work around this, one solution is to put in simplified
> > kernel header (this is what the compat stuff is already doing).
> 
> The other solution (as already suggested by Anatoly) is to have a configure
> script (not an autotool one). It would make clear that VFIO support is not
> built.
> Ref: http://dpdk.org/ml/archives/dev/2015-April/016772.html

That won't solve the issue.

The other possiblities are:
 1. Fail the build if VFIO is configured but headers files are missing.
    This is better than surprising user at runtime.
 2. Don't use /usr/include/linux as path as expected path of kernel headers
    instead use build path (this is what modules do).


More information about the dev mailing list