[dpdk-dev] [PATCH] compiling kni module on Ubunutu 12.04 failed

Pawel Wodkowski pawelx.wodkowski at intel.com
Wed Aug 20 11:42:53 CEST 2014


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 <pawelx.wodkowski at intel.com>
---
 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



More information about the dev mailing list