From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 5B566C432 for ; Fri, 10 Jul 2015 23:11:12 +0200 (CEST) Received: by wiwl6 with SMTP id l6so56659513wiw.0 for ; Fri, 10 Jul 2015 14:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=xeiIJGQd0fw4A12G3LFp/Cd4h4bQnkHLlKc2h+7KdhY=; b=JsONFQGLxw5YpPilUbPW4F2AFX6tguHlVgMflclITlNWx96KcrLu89azQv5VRp9Tgu 6aFC8f8xeejqv25mV0O2ZIMGviezDYklE19nB3HqSFjG1nApzdIOCJ+OjESe+IjzhU5A n1TbmiQleY6UNIbO1KqQ5ji9ussAB49++3QXm25X6xcC8Q6VFrBmZzUQdTE6ms0pnvtJ J5J9JEmIXXgcDVQjOhriDq4HCuHRyT2QSO2nqXxI9bHWitkMRcAoGnMdiL/x3olMHJ8m vIihx4sB387B+hqGMF/G1hTH03u5/SL/N4UlJSx+7SNIxdxVMrxNU+9UwrWXYwofxKuE P7/w== X-Gm-Message-State: ALoCoQmV7Rhm5vNugHiKYoHMCZ8tGSnzbk5rI61OPFGTesWN+z+AuSW77KXfYQinLAPii9K/Tlc5 X-Received: by 10.180.105.98 with SMTP id gl2mr1425652wib.56.1436562672207; Fri, 10 Jul 2015 14:11:12 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id da5sm699770wib.6.2015.07.10.14.11.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 14:11:11 -0700 (PDT) From: Thomas Monjalon To: Stephen Hemminger Date: Fri, 10 Jul 2015 23:10:03 +0200 Message-ID: <27105937.PvZWGykTpm@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <20150710134431.3456762d@urahara> References: <1436484387-29273-1-git-send-email-stephen@networkplumber.org> <6809322.q4mZEddvC3@xps13> <20150710134431.3456762d@urahara> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org, Stephen Hemminger Subject: Re: [dpdk-dev] [PATCH v2 1/2] vfio: fix build if build envrionment is on old kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 21:11:12 -0000 2015-07-10 13:44, Stephen Hemminger: > On Fri, 10 Jul 2015 22:19:58 +0200 > Thomas Monjalon wrote: > > > 2015-07-10 10:29, Stephen Hemminger: > > > On Fri, 10 Jul 2015 01:43:17 +0200 > > > Thomas Monjalon wrote: > > > > > > > 2015-07-09 16:26, Stephen Hemminger: > > > > > From: Stephen Hemminger > > > > > > > > > > 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. > > > > That allows to see the error earlier and more clearly. > > > > > 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). > > > > The latter one seems to be the right one. There is a name for that technique: > > cross-compilation. If you want to build DPDK to run on another system with > > different kernel and libraries, you should adapt the toolchain and libraries > > headers. And guess what? include/linux/ is part of this toolchain. > > Problem solved. > > The toolchain Just-works for build igb_uio, kni, etc. Why doesn't it work > for VFIO. I would view that as a of the mk scripts. I mean you have to use a cross toolchain including the kernel headers matching the target kernel. A cross toolchain can be used thanks to the CROSS variable.