From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id 4B3182BA5 for ; Fri, 18 Mar 2016 22:56:03 +0100 (CET) Received: by mail.mhcomputing.net (Postfix, from userid 1000) id C361926C; Fri, 18 Mar 2016 14:56:02 -0700 (PDT) Date: Fri, 18 Mar 2016 14:56:02 -0700 From: Matthew Hall To: Cliff Burdick Cc: users@dpdk.org Message-ID: <20160318215602.GC23135@mhcomputing.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-users] Difficulty With rte_eal_init() X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 21:56:03 -0000 On Fri, Mar 18, 2016 at 02:45:10PM -0700, Cliff Burdick wrote: > Hi, I've been trying to create a standalone application linked against > DPDK, and I'm having some issues getting the program to run properly. The > main problem is that in my standalone app compared to the example code, > rte_eal_init() from the example code seems to probe the PCI bus, whereas > mine doesn't. [SNIP] > However, when I then tried compiling the dpdk part of my app into a library > and linking against it from my main program, the PCI scanning goes away and > no devices are found. This hoses up every new app developer. Especially me, as I used DPDK before the PCI probe behavior was changed between versions and got totally lost when it broke. You need the following: Build Configuration: CONFIG_RTE_BUILD_COMBINE_LIBS=y Linker Flags (LDFLAGS): -Wl,--whole-archive -Wl,--start-group -ldpdk -Wl,--end-group -Wl,--no-whole-archive Sincerely. Matthew.