[dpdk-dev] Proposal to add a new toolchain for dpdk: g++

Victor Huertas vhuertas at gmail.com
Tue Feb 18 15:06:51 CET 2020


Thanks Neil for your answer,
I think I will try the first option you posted without touching the
makefiles from the dpdk-stable and I will tell how it goes.
So, as a conclusion, it seems that all the modifications I have done are
not necessary in order to build your DPDK application using g++.

Regards,

El mar., 18 feb. 2020 a las 14:13, Neil Horman (<nhorman at tuxdriver.com>)
escribió:

> On Mon, Feb 17, 2020 at 02:39:58PM +0000, Bruce Richardson wrote:
> > On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > > Hi all,
> > >
> > > I am using DPDK development environment to develop an application from
> > > which I have to access C++ code.
> > > I managed to modify some internal mk files in the dpdk-stable
> repository to
> > > allow g++ compiler to be supported.
> > >
> > > I have all the modified files well identified and I wonder if the
> support
> > > team is interested to add this toolchain in future DPDK releases.
> > >
> > Rather than trying to build DPDK with g++, or to use the DPDK makefiles
> > with your C++ application, can I recommend instead that you treat DPDK as
> > any third-party library and build it independently of your application.
> >
> > If you compile and install DPDK using meson and ninja - or install the
> > DPDK package from your linux distro - you will have a 'libdpdk.pc' file
> > installed for use by pkg-config. Then for building your application, put
> in
> > the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
> > 'pkg-config --libs libdpdk', into your app makefile and work from there.
> >
> yes, exactly this.  The proscribed method of handling issues like this is
> to
> either:
>
> 1) Build dpdk separately (or just install it from whatever distribution
> you are
> using, if thats an option), and just link against it (either statically or
> dynamically) when you build your application.
>
> 2)  If you embed dpdk source in your
> environment, and build it at the same time as your application, you should
> interface to its build system, by just calling ninja/meson or make from a
> build
> target in your application - the dpdk build file should properly select gcc
> instead of g++, which you should already have if you have g++ installed.
>
> Neil
>
> > Note too, that all DPDK header files should already be safe for inclusion
> > in C++ code - if not, please log a bug.
> >
> > Regards,
> > /Bruce
> >
>


-- 
Victor


More information about the dev mailing list