From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: Pcap question Date: Mon, 03 Mar 2014 22:31:38 +0100 Message-ID: <5314F4BA.7020507@6wind.com> References: <5313905E.7000603@6wind.com> <5314E6F4.2090709@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Meir Tseitlin Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Meir, On 03/03/2014 10:09 PM, Meir Tseitlin wrote: > -Wl,-lrte_pmd_pcap -Wl,-L/usr/local/lib -Wl,-Wl,-rpath,/usr/local/lib > -Wl,-lpcap The problem is related to the lines above. They are generated in rte.app.mk: ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs) $(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined)) LDLIBS += $(LIBPCAP_LDFLAGS) endif The output of "pcap-config --libs" on your computer is probably: -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpcap The problem is that the DPDK makefile add the "-Wl," to convert the linker arguments into gcc arguments. You may want to replace the code above by: ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) LDLIBS += -lrte_pmd_pcap repl := -Wl,% LIBPCAP_LDFLAGS ?= $(patsubst -Wl$(comma),%,$(shell pcap-config --libs)) $(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined)) LDLIBS += $(LIBPCAP_LDFLAGS) endif I don't know if it's the proper way to fix this. Maybe rte.app.mk should take care of not adding "-Wl," if it's already there. Regards, Olivier