> On Dec 5, 2018, at 12:57 PM, Murali Krishna <[email protected]> > wrote: > > Hi Keith, > > Thanks for the pointing to docs and .pc file example. I tried to build lua > package manually using below steps: > > Step 1. updated kernel > > Step 2. removed existing lua-devel package > > Step 3. downloaded lua-5.3.2.tar.gz and made the below changes: > In /usr/local/src/lua-5.3.2/Makefile, changed "TO_LIB= liblua.a" to "TO_LIB= > liblua.a liblua.so" > > In /usr/local/src/lua-5.3.2/src/Makefile > Changed "CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) > $(MYCFLAGS)" to " CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) > $(MYCFLAGS) -fPIC" > Added: > LUA_A= liblua.a > LUA_SO= liblua.so > Changed "ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)" to "ALL_T= $(LUA_A) $(LUA_T) > $(LUAC_T) $(LUA_SO)" > Added: > $(LUA_T): $(LUA_O) $(LUA_A) > $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) > $(LUAC_T): $(LUAC_O) $(LUA_A) > $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) > $(LUA_SO): $(CORE_O) $(LIB_O) > $(CC) -o $@ -shared $? > > > Step 4: exported C_INCLUDE_PATH variable > export C_INCLUDE_PATH=/usr/local/src/lua-5.3.2/src > > Step 5: manually added below package configuration file. > # cat /usr/lib64/pkgconfig/lua-5.3.pc > V= 5.3 > R= 5.3.2 > prefix= /usr > exec_prefix=${prefix} > libdir= /usr/lib64 > includedir=${prefix}/include > > Name: Lua > Description: An Extensible Extension Language > Version: ${R} > Requires: > Libs: -llua-${V} -lm -ldl > Cflags: -I${includedir}/lua-${V} > > Step 6: added below configuration file > # cat /usr/lib64/pkgconfig/lua5.3.pc > V=5.3 > R=5.3.2 > > prefix=/usr > INSTALL_BIN=${prefix}/bin > INSTALL_INC=${prefix}/include > INSTALL_LIB=${prefix}/lib > INSTALL_MAN=${prefix}/share/man/man1 > INSTALL_LMOD=${prefix}/share/lua/${V} > INSTALL_CMOD=${prefix}/lib/lua/${V} > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: Lua > Description: An Extensible Extension Language > Version: ${R} > Requires: > Libs: -L${libdir} -llua -lm -ldl > Cflags: -I${includedir} > > > Step 7: Moved to the lua-5.3.2/src directory and ran `make linux`Step > 8: copied newly built libraries to lib64 folder > # cp /usr/local/src/lua-5.3.2/src/liblua.so /usr/lib64/liblua-5.3.so > # cp /usr/local/src/lua-5.3.2/src/liblua.a /usr/lib64/liblua-5.3.a > > Now when I try to build latest pktgen-dpdk-3.5.9 or pktgen-dpdk from dev > branch, I get the below error. > # make -j40 > == lib > == common > CC copyright_info.o > CC port_config.o > CC core_info.o > CC cmdline_parse_args.o > CC lscpu.o > CC utils.o > CC coremap.o > CC _pcap.o > CC cksum.o > CC l2p.o > AR libcommon.a > INSTALL-LIB libcommon.a > == utils > CC rte_strings.o > CC rte_link.o > CC parson_json.o > CC rte_atoip.o > CC rte_portlist.o > CC inet_pton.o > CC rte_heap.o > AR libutils.a > INSTALL-LIB libutils.a > == vec > CC rte_vec.o > AR libvec.a > INSTALL-LIB libvec.a > == lua > CC rte_lua.o > CC rte_lua_stdio.o > CC rte_lua_utils.o > CC rte_lua_socket.o > CC rte_lua_dpdk.o > CC rte_lua_pktmbuf.o > CC rte_lua_vec.o > CC rte_lua_dapi.o > AR libpktgen_lua.a > INSTALL-LIB libpktgen_lua.a > == cli > CC cli.o > CC cli_input.o > CC cli_cmds.o > CC cli_map.o > CC cli_gapbuf.o > CC cli_file.o > CC cli_env.o > CC cli_auto_complete.o > CC cli_help.o > CC cli_history.o > CC cli_search.o > CC cli_cmap.o > CC cli_vt100.o > CC cli_scrn.o > AR libcli.a > INSTALL-LIB libcli.a > == app > CC cli-functions.o > CC lpktgenlib.o > CC pktgen-cmds.o > CC pktgen.o > CC pktgen-cfg.o > CC pktgen-main.o > CC pktgen-pcap.o > CC pktgen-range.o > CC pktgen-cpu.o > CC pktgen-seq.o > CC pktgen-dump.o > CC pktgen-capture.o > CC pktgen-stats.o > CC pktgen-port-cfg.o > CC pktgen-ipv6.o > CC pktgen-ipv4.o > CC pktgen-arp.o > CC pktgen-gre.o > CC pktgen-ether.o > CC pktgen-tcp.o > CC pktgen-udp.o > CC pktgen-vlan.o > CC pktgen-random.o > CC pktgen-display.o > CC pktgen-log.o > CC pktgen-gtpu.o > CC pktgen-latency.o > LD pktgen > /usr/bin/ld: cannot find -lpktgen_lua > collect2: error: ld returned 1 exit status > make[2]: *** [pktgen] Error 1 > make[1]: *** [all] Error 2 > make: *** [app] Error 2
I did not see it build the common/lua directory as that is where the library comes from. I am out of town and it will be hard for me to debug this one remotely. It may take a few days sorry. > > > Thanks, > Murali > >> On Dec 5, 2018, at 7:56 AM, Wiles, Keith <[email protected]> wrote: >> >> >> >>> On Dec 5, 2018, at 2:23 AM, Murali Krishna <[email protected]> >>> wrote: >>> >>> Hi, >>> >>> >>> >>> I am trying to compile pktgen-3.5.8 on RHEL/Centos 7.5 kernel. I see >>> below >>> error while compiling it from source. >>> >>> >>> >>> # cd pktgen-3.5.8/ >>> >>> # make >>> >>> == lib >>> >>> == common >>> >>> == utils >>> >>> == vec >>> >>> == lua >>> >>> Package lua5.3 was not found in the pkg-config search path. >>> >>> Perhaps you should add the directory containing `lua5.3.pc' >>> >>> to the PKG_CONFIG_PATH environment variable >>> >>> No package 'lua5.3' found >>> >>> Package lua5.3 was not found in the pkg-config search path. >>> >>> Perhaps you should add the directory containing `lua5.3.pc' >>> >>> to the PKG_CONFIG_PATH environment variable >>> >>> No package 'lua5.3' found >>> >>> CC rte_lua.o >>> >>> In file included from /root/pkt/pktgen-3.5.8/lib/lua/rte_lua.c:27:0: >>> >>> /root/pkt/pktgen-3.5.8/lib/lua/rte_lua.h:25:17: fatal error: lua.h: No >>> such >>> file or directory >>> >>> #include <lua.h> >>> >>> ^ >>> >>> compilation terminated. >>> >>> make[3]: *** [rte_lua.o] Error 1 >>> >>> make[2]: *** [all] Error 2 >>> >>> make[1]: *** [lua] Error 2 >>> >>> make: *** [lib] Error 2 >>> >>> >>> >>> i see same error even after installing lua53 packages. >>> >>> >>> >>> # rpm -qa | grep lua5 >>> >>> lua53u-libs-5.3.4-1.ius.centos7.x86_64 >>> >>> lua53u-5.3.4-1.ius.centos7.x86_64 >>> >>> lua53u-devel-5.3.4-1.ius.centos7.x86_64 >>> >>> >>> >>> Is there any workaround for this error? >> >> In the dev branch of Pktgen is an example pkg_config file to use and more >> docs on how to get lua/Pktgen running on these distro’s that do not supply >> a .pc file. >> >>> >> >> https://git.dpdk.org/apps/pktgen-dpdk/?h=dev > > Also just updating to the latest Pktgen 3.5.9 will have the updated docs and > .pc file example. >> >> >>> >>> >>> >>> Thanks, >>> >>> Murali >> >> Regards, >> Keith > > Regards, > Keith Regards, Keith
