From patchwork Wed Oct 17 13:46:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bing Zhao X-Patchwork-Id: 46988 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1786C5F28; Wed, 17 Oct 2018 15:49:08 +0200 (CEST) Received: from m50-134.163.com (m50-134.163.com [123.125.50.134]) by dpdk.org (Postfix) with ESMTP id CDFCA5F27 for ; Wed, 17 Oct 2018 15:49:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=79a+NoWaFT3Yfq6TQ6 dCLwvniJ4dQhLXXdSO+1xJWHk=; b=mVBNJXB4XKk12VYKt4prh/ZY35jeRG/tky E8lgsj+CZzC3baMBOtfd2cBifMTkn8hgv1dvHfb11Y89L+O9N2U8NE14aRKHdQzL TUM8WR0N0+JMPOkQ62LlboNe8ktbskFiebEP14VklM8SyUEjbUgNDyTSD28QCveN GG8FJyRsk= Received: from SHL0405.hxtcorp.net (unknown [180.173.110.177]) by smtp4 (Coremail) with SMTP id DtGowAC3vja3PcdbAEwoAA--.37S2; Wed, 17 Oct 2018 21:48:40 +0800 (CST) From: Bing Zhao To: keith.wiles@intel.com, dev@dpdk.org Cc: bing.zhao@hxt-semitech.com, Bing Zhao Date: Wed, 17 Oct 2018 21:46:25 +0800 Message-Id: <20181017134625.100100-1-ilovethull@163.com> X-Mailer: git-send-email 2.11.0.windows.1 X-CM-TRANSID: DtGowAC3vja3PcdbAEwoAA--.37S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJr1kGw45Kr1UGw43Jr1rtFb_yoW8GFyxpa na9FyUGr4kJFy8C3ykAas7Xw1ak3s3KayYgF9Fg34UGFn8t3s7KrZ8trW29r17Grs7Aa1Y qrWfKFyay3yUAw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UK1v-UUUUU= X-Originating-IP: [180.173.110.177] X-CM-SenderInfo: xlor4vhwkxzzi6rwjhhfrp/xtbBDxjit1PABmccngAAsy Subject: [dpdk-dev] [PATCH] [pktgen] Fix the compiling with Lua from source X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In some other distributions excpet Ubuntu, the Lua verison is quite old and some interfaces show incompatible. If manually building Lua version 5.3 from source code. By default, only the static library is generated for using. Then due to the fact that there is some dependence between library files and the order of them in the command line should be take into consideration. "liblua.a" must be after "pktgen_lua.a" if no group feature is used. Then we can split the pkg-config infomation into two parts to fix the building in CentOS. P.S. the name convention of Lua .pc file was discussed serveral years ago, but it seemed that there is no agreement and each distribution will use their own name style. When using CentOS, I need to make the .pc file by myself. Signed-off-by: Bing Zhao --- app/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Makefile b/app/Makefile index 3949e51..a78ea7d 100644 --- a/app/Makefile +++ b/app/Makefile @@ -89,8 +89,8 @@ endif ifeq ($(CONFIG_RTE_LIBRTE_LUA),y) else -MYLIBS += -lpktgen_lua -MYLIB_PATH += -L$(LUA_LIB) $(shell pkg-config --libs lua5.3) +MYLIBS += -lpktgen_lua $(shell pkg-config --libs-only-l lua5.3) +MYLIB_PATH += -L$(LUA_LIB) $(shell pkg-config --libs-only-L lua5.3) CFLAGS += -I/usr/include/lua5.3 CFLAGS += -I$(RTE_SRCDIR)/../lib/lua/