[pktgen] Fix the compiling with Lua from source

Message ID 20181017134625.100100-1-ilovethull@163.com (mailing list archive)
State Not Applicable, archived
Headers
Series [pktgen] Fix the compiling with Lua from source |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Bing Zhao Oct. 17, 2018, 1:46 p.m. UTC
  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 <ilovethull@163.com>
---
 app/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

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/