From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0C0945932 for ; Wed, 20 Aug 2014 11:39:26 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 20 Aug 2014 02:42:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,901,1400050800"; d="scan'208";a="561005171" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 20 Aug 2014 02:42:55 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s7K9gt51016621; Wed, 20 Aug 2014 10:42:55 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id s7K9gtlu027401; Wed, 20 Aug 2014 10:42:55 +0100 Received: (from pwodkowx@localhost) by sivswdev01.ir.intel.com with id s7K9gts8027392; Wed, 20 Aug 2014 10:42:55 +0100 From: Pawel Wodkowski To: dev@dpdk.org Date: Wed, 20 Aug 2014 10:42:53 +0100 Message-Id: <1408527773-26940-1-git-send-email-pawelx.wodkowski@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] compiling kni module on Ubunutu 12.04 failed 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: Wed, 20 Aug 2014 09:39:27 -0000 On Ubuntu 12.04.4 file '/proc/version_signature' contains 'Ubuntu 3.11.0-15.25~precise1-generic 3.11.10'. This introduce compilation error since '~precise1' will not be discarded. This patch discards everything after '~' inclusively. Signed-off-by: Pawel Wodkowski --- lib/librte_eal/linuxapp/kni/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index 2799191..e2902af 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -47,7 +47,7 @@ MODULE_CFLAGS += -Wall -Werror ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) UBUNTU_KERNEL_CODE := $(shell cut -d' ' -f2 /proc/version_signature | \ - cut -d- -f1,2 | tr .- $(comma)) + cut -d'~' -f1 | cut -d- -f1,2 | tr .- $(comma)) MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))" endif -- 1.7.9.5