From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by dpdk.org (Postfix) with ESMTP id 881407F0D for ; Tue, 11 Nov 2014 16:06:40 +0100 (CET) Received: by mail-lb0-f174.google.com with SMTP id p9so4623176lbv.33 for ; Tue, 11 Nov 2014 07:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AKfG8c5ofdfg90vNmwHphI3XJqWjytVmPCZEcte+Ry4=; b=g/cdz6gI2nXlm13W1uruv3ilJwF96u184eFOI+F8Rak83i5wzcRcwc4YWrs5uKxJ1v GNdIuCjSJdgUhu2n8mnJ9H/8Y4z/2fqXGngysCR7SVyo/enbfYPkgR3iRDdiKbnDz3gN Cx9yJAEHZJM4KZnOD9a205x1S+eJ4T5H9EXXdw4NO3BOHtBSBzmIJ6vPmLGdnbYmnPYn 01xpHkXT2YQYmTncSZL6Bz/ROnHvRM4pwRY5ZeCnbuqYeGdU1W7LbByNvu95wcW9aXBb TXRXhh81hXsNAMhwhukb/NrnbV3gUEEivTpGcLg9ybKjjs2g6bQkfdCY8QyxQp4xxuq4 f6fw== MIME-Version: 1.0 X-Received: by 10.112.225.225 with SMTP id rn1mr2526435lbc.98.1415718990526; Tue, 11 Nov 2014 07:16:30 -0800 (PST) Received: by 10.25.216.158 with HTTP; Tue, 11 Nov 2014 07:16:30 -0800 (PST) In-Reply-To: References: <91383E96CE459D47BCE92EFBF5CE73B004E9D503@IRSMSX108.ger.corp.intel.com> <20141111141857.GA4807@sivswdev02.ir.intel.com> Date: Tue, 11 Nov 2014 16:16:30 +0100 Message-ID: From: Newman Poborsky To: Sergio Gonzalez Monroy Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] building shared library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 15:06:40 -0000 Hi, after building DPDK libs as shared libraries and linking it, I'm back to my first problem: rte_eal_driver_register() never gest called and my app crashes since there are no drivers registered. As previously mentioned, in regular DPDK user app this functions is called for every driver before main(). How? BR, Newman On Tue, Nov 11, 2014 at 3:44 PM, Newman Poborsky wrote: > Hi Sergio, > > no, that sounds good, thank you. Since I'm not that familiar with DPDK > build system, where should this option be set? In 'lib' folder's Makefile? > > Thank you once again! > > BR, > Newman > > On Tue, Nov 11, 2014 at 3:18 PM, Sergio Gonzalez Monroy < > sergio.gonzalez.monroy@intel.com> wrote: > >> On Tue, Nov 11, 2014 at 01:10:29PM +0100, Newman Poborsky wrote: >> > Hi, >> > >> > I want to build one .so file with my app (it contains API that I want to >> > call through JNI) and all DPDK libs that I use in my app. >> > >> > As I've already mentioned, when I build and start my dpdk app as a >> > standalone application, I can see that before main() is called, there >> is a >> > call to 'rte_eal_driver_register()' function for every driver. When I >> build >> > .so file, this does not happen and no driver is registered so everyting >> > after rte_eal_init() fails. >> > >> Hi Newman, >> >> AFAIK the current build system does not support that. >> >> You can build DPDK as shared libs by setting the following config option: >> CONFIG_RTE_BUILD_SHARED_LIB=y >> >> Then build your app as an .so that links against DPDK libs, so you have >> explicit dependencies (such dependencies should show with ldd). >> >> Is there any reason why you want everything to be a single .so ? >> >> I don't know much about how Java loads DSOs but I reckon that it must >> resolve >> explicit dependencies such as libc. >> >> Thanks, >> Sergio >> >> >> > >> > BR, >> > Newman >> > >> > >