From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A5B777F0D for ; Tue, 11 Nov 2014 15:09:11 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 11 Nov 2014 06:19:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,361,1413270000"; d="scan'208";a="630151700" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 11 Nov 2014 06:18:59 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sABEIwKl019409; Tue, 11 Nov 2014 14:18:58 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id sABEIwXE009177; Tue, 11 Nov 2014 14:18:58 GMT Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id sABEIwWG009173; Tue, 11 Nov 2014 14:18:58 GMT Date: Tue, 11 Nov 2014 14:18:58 +0000 From: Sergio Gonzalez Monroy To: Newman Poborsky Message-ID: <20141111141857.GA4807@sivswdev02.ir.intel.com> References: <91383E96CE459D47BCE92EFBF5CE73B004E9D503@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 14:09:12 -0000 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 >