From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Newman Poborsky <newman555p@gmail.com>,
"Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] building shared library
Date: Tue, 11 Nov 2014 15:26:04 +0000 [thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D89726835BFB@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <CAHW=9PsQ2-hhV9O=0vnP9db0cz3C2vCq-_gF8nz7M1wtfy1Ptw@mail.gmail.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Newman Poborsky
> Sent: Tuesday, November 11, 2014 3:17 PM
> To: Gonzalez Monroy, Sergio
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] building shared library
>
> 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?
If I am not wrong here, you have to use the -d option to specify the driver you want to use.
Btw, the option you were looking for can be found in config/common_linuxapp or config/common_bsdapp.
Pablo
>
> BR,
> Newman
>
> On Tue, Nov 11, 2014 at 3:44 PM, Newman Poborsky
> <newman555p@gmail.com>
> 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
> >> >
> >>
> >
> >
next prev parent reply other threads:[~2014-11-11 15:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 14:22 Newman Poborsky
2014-11-11 1:01 ` Matthew Hall
2014-11-11 3:28 ` Chi, Xiaobo (NSN - CN/Hangzhou)
2014-11-11 7:29 ` Newman Poborsky
2014-11-11 10:37 ` Gonzalez Monroy, Sergio
2014-11-11 12:10 ` Newman Poborsky
2014-11-11 14:18 ` Sergio Gonzalez Monroy
2014-11-11 14:44 ` Newman Poborsky
2014-11-11 15:16 ` Newman Poborsky
2014-11-11 15:26 ` De Lara Guarch, Pablo [this message]
2014-11-11 15:54 ` Neil Horman
2014-11-11 16:24 ` Newman Poborsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E115CCD9D858EF4F90C690B0DCB4D89726835BFB@IRSMSX108.ger.corp.intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=dev@dpdk.org \
--cc=newman555p@gmail.com \
--cc=sergio.gonzalez.monroy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).