DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Murali Krishna <murali.krishna@broadcom.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] error while compiling pktgen-dpdk on RHEL/Centos 7.5
Date: Wed, 5 Dec 2018 20:49:33 +0000	[thread overview]
Message-ID: <A97537FE-D124-4E68-A706-6FA93E4F4B97@intel.com> (raw)
In-Reply-To: <49d562786a8c14cdd5a81813b85bb219@mail.gmail.com>



> On Dec 5, 2018, at 12:57 PM, Murali Krishna <murali.krishna@broadcom.com> 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 <keith.wiles@intel.com> wrote:
>> 
>> 
>> 
>>> On Dec 5, 2018, at 2:23 AM, Murali Krishna <murali.krishna@broadcom.com>
>>> 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


  reply	other threads:[~2018-12-05 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 10:23 Murali Krishna
2018-12-05 15:56 ` Wiles, Keith
2018-12-05 15:59   ` Wiles, Keith
2018-12-05 19:57     ` Murali Krishna
2018-12-05 20:49       ` Wiles, Keith [this message]
2018-12-06  3:46         ` Murali Krishna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A97537FE-D124-4E68-A706-6FA93E4F4B97@intel.com \
    --to=keith.wiles@intel.com \
    --cc=murali.krishna@broadcom.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).