On Thu, 13 Dec 2018 16:53:55 -0800
David Christensen <[email protected]> wrote:

> Attempting to use DPDK 18.11 with Monday's OVS commit that supports DPDK 
> 18.11 (commit 03f3f9c0faf838a8506c3b5ce6199af401d13cb3).  When building 
> OVS with DPDK support I'm receiving a build error related to libmnl not 
> being found while compiling the Mellanox driver as follows:
> 
> ...
> gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -I ./include -I ./include -I ./lib 
> -I ./lib    -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare 
> -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum 
> -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
> -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64  -g -O2 -MT vswitchd/xenserver.o -MD -MP -MF 
> $depbase.Tpo -c -o vswitchd/xenserver.o vswitchd/xenserver.c &&\
> mv -f $depbase.Tpo $depbase.Po
> /bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99 
> -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith 
> -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter 
> -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
> -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64  -g -O2 
> -L/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib 
> -Wl,--whole-archive,-ldpdk,--no-whole-archive  -o vswitchd/ovs-vswitchd 
> vswitchd/bridge.o vswitchd/ovs-vswitchd.o vswitchd/system-stats.o 
> vswitchd/xenserver.o ofproto/libofproto.la lib/libsflow.la 
> lib/libopenvswitch.la -ldpdk -ldl -lnuma -latomic -lpthread -lrt -lm  -lnuma
> libtool: link: gcc -std=gnu99 -Wstrict-prototypes -Wall -Wextra 
> -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
> -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
> -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
> -Wmissing-field-initializers -fno-strict-aliasing -Wshadow 
> -I/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/include 
> -D_FILE_OFFSET_BITS=64 -g -O2 -Wl,--whole-archive -Wl,-ldpdk 
> -Wl,--no-whole-archive -o vswitchd/ovs-vswitchd vswitchd/bridge.o 
> vswitchd/ovs-vswitchd.o vswitchd/system-stats.o vswitchd/xenserver.o 
> -L/home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib 
> ofproto/.libs/libofproto.a 
> /home/davec/src/p9-dpdk-perf/ovs/lib/.libs/libsflow.a 
> lib/.libs/libsflow.a lib/.libs/libopenvswitch.a -ldpdk -ldl -latomic 
> -lpthread -lrt -lm -lnuma
> /home/davec/src/p9-dpdk-perf/dpdk/ppc_64-power8-linuxapp-gcc/lib/librte_pmd_mlx5.a(mlx5_flow_tcf.o):
>  
> In function `flow_tcf_nl_ack':
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3753: 
> undefined reference to `mnl_socket_get_portid'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3765: 
> undefined reference to `mnl_socket_sendto'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3777: 
> undefined reference to `mnl_socket_recvfrom'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3790: 
> undefined reference to `mnl_cb_run'
> /home/davec/src/p9-dpdk-perf/dpdk/drivers/net/mlx5/mlx5_flow_tcf.c:3777: 
> undefined reference to `mnl_socket_recvfrom'
> ...
> 
> Both the OVS and DPDK builds work individually but I receive the error 
> after running "./configure --with-dpdk=<DPDK target path>; make" to 
> build OVS with DPDK.  I ran across this post on the DPDK list regarding 
> libmnl, indicating there is a dependency issue:
> 
> http://mails.dpdk.org/archives/dev/2018-July/108573.html
> 
> But DPDK builds successfully by itself.  Any suggestions where the build 
> is breaking down?

Hi,
I sent a patch for this problem
(https://patchwork.ozlabs.org/patch/1013466/).

Can you try (and maybe ack) it?

NOTE: This problem is only present if you link with DPDK as static
library, since with shared library the linker doesn't need to know the
full list of indirect dependencies.

Thank you

> Dave
> 
> _______________________________________________
> discuss mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to