On Thu, Jan 12, 2017 at 10:26:08AM +0100, Thomas Monjalon wrote: > 2017-01-12 13:16, Jerin Jacob: > > +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > > _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe > > +endif > > _LDLIBS is an internal variable of rte.app.mk. > Please could you check that there is no issue when using LDLIBS instead > of _LDLIBS?
Tested it. Suggested change has issue in shared lib configuration. [dpdk-master] $ git diff diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 050663a..27cadd5 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -59,9 +59,7 @@ SRCS-y += csumonly.c SRCS-y += icmpecho.c SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) -_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe -endif +LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe CFLAGS_cmdline.o := -D_GNU_SOURCE [error] gcc -Wp,-MD,./.iofwd.o.d.tmp -m64 -pthread -fPIC -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_FSGSBASE -DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -I/export/dpdk-master/build/include -include /export/dpdk-master/build/include/rte_config.h -O3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Werror -o iofwd.o -c /export/dpdk-master/app/test-pmd/iofwd.c gcc -o testpmd -m64 -pthread -fPIC -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_FSGSBASE -DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -I/export/dpdk-master/build/include -include /export/dpdk-master/build/include/rte_config.h -O3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Werror testpmd.o parameters.o cmdline.o cmdline_flow.o config.o iofwd.o macfwd.o macswap.o flowgen.o rxonly.o txonly.o csumonly.o icmpecho.o -L/export/dpdk-master/build/lib -Wl,-lrte_kni -Wl,-lrte_pipeline -Wl,-lrte_table -Wl,-lrte_port -Wl,-lrte_pdump -Wl,-lrte_distributor -Wl,-lrte_reorder -Wl,-lrte_ip_frag -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lrte_lpm -Wl,--whole-archive -Wl,-lrte_acl -Wl,--no-whole-archive -Wl,-lrte_jobstats -Wl,-lrte_power -Wl,--whole-archive -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_vhost -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_net -Wl,-lrte_ethdev -Wl,-lrte_cryptodev -Wl,-lrte_eventdev -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-lrte_cmdline -Wl,-lrte_cfgfile -Wl,-lrte_pmd_bond -Wl,--no-whole-archive -Wl,-lgcc_s -Wl,-ldl -Wl,-export-dynamic -Wl,-export-dynamic -Wl,-export-dynamic -L/export/dpdk-master/build/lib -Wl,--as-needed -Wl,-rpath=/export/dpdk-master/build/lib -Wl,-Map=testpmd.map -Wl,--cref cmdline.o: In function `cmd_set_vf_vlan_anti_spoof_parsed': cmdline.c:(.text+0x4b3a): undefined reference to `rte_pmd_ixgbe_set_vf_vlan_anti_spoof' cmdline.o: In function `cmd_set_vf_mac_anti_spoof_parsed': cmdline.c:(.text+0x4c02): undefined reference to `rte_pmd_ixgbe_set_vf_mac_anti_spoof' cmdline.o: In function `cmd_set_vf_vlan_stripq_parsed': cmdline.c:(.text+0x4cd2): undefined reference to `rte_pmd_ixgbe_set_vf_vlan_stripq' cmdline.o: In function `cmd_set_vf_split_drop_en_parsed': cmdline.c:(.text+0x4da2): undefined reference to `rte_pmd_ixgbe_set_vf_split_drop_en' cmdline.o: In function `cmd_set_vf_vlan_insert_parsed': cmdline.c:(.text+0x5eda): undefined reference to `rte_pmd_ixgbe_set_vf_vlan_insert' cmdline.o: In function `cmd_set_tx_loopback_parsed': cmdline.c:(.text+0x5f8b): undefined reference to `rte_pmd_ixgbe_set_tx_loopback' cmdline.o: In function `cmd_set_all_queues_drop_en_parsed': cmdline.c:(.text+0x604b): undefined reference to `rte_pmd_ixgbe_set_all_queues_drop_en' cmdline.o: In function `cmd_set_vf_mac_addr_parsed': cmdline.c:(.text+0x60ea): undefined reference to `rte_pmd_ixgbe_set_vf_mac_addr' collect2: error: ld returned 1 exit status /export/dpdk-master/mk/rte.app.mk:236: recipe for target 'testpmd' failed make[3]: *** [testpmd] Error 1 /export/dpdk-master/mk/rte.subdir.mk:61: recipe for target 'test-pmd' failed make[2]: *** [test-pmd] Error 2 /export/dpdk-master/mk/rte.sdkbuild.mk:78: recipe for target 'app' failed make[1]: *** [app] Error 2 /export/dpdk-master/mk/rte.sdkroot.mk:130: recipe for target 'all' failed make: *** [all] Error 2