From: Luca Boccassi <bluca@debian.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, "thomas@monjalon.net" <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Date: Tue, 07 May 2019 16:53:00 +0100 [thread overview]
Message-ID: <d5e2db1e01d1587157975f6d5e7f646133f835b7.camel@debian.org> (raw)
In-Reply-To: <20190507151747.GA44@bricha3-MOBL.ger.corp.intel.com>
On Tue, 2019-05-07 at 16:17 +0100, Bruce Richardson wrote:
> On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote:
> > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote:
> > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote:
> > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote:
> > > > > For testing of DPDK, we want to override the prefix given by
> > > > > the
> > > > > pkg-config file, so that we can get correct paths for DPDK
> > > > > installed
> > > > > in an unusual location.
> > > > >
> > > > > Signed-off-by: Bruce Richardson <
> > > > > bruce.richardson@intel.com
> > > > >
> > > > >
> > > > >
> > > > > ---
> > > > > examples/bbdev_app/Makefile | 13 +++++++++----
> > > > > examples/bond/Makefile | 13 +++++++++----
> > > > > examples/cmdline/Makefile | 13 +++++++++----
> > > > > examples/distributor/Makefile | 13 +++++++++----
> > > > > examples/eventdev_pipeline/Makefile | 13 +++++++++----
> > > > > examples/exception_path/Makefile | 13 +++++++++----
> > > > > examples/fips_validation/Makefile | 13 +++++++++----
> > > > > examples/flow_classify/Makefile | 13 +++++++++----
> > > > > examples/flow_filtering/Makefile | 13 +++++++++----
> > > > > examples/helloworld/Makefile | 13 +++++++++----
> > > > > examples/ip_fragmentation/Makefile | 13 +++++++++----
> > > > > examples/ip_pipeline/Makefile | 13 +++++++++----
> > > > > examples/ip_reassembly/Makefile | 13 +++++++++----
> > > > > examples/ipsec-secgw/Makefile | 13 +++++++++----
> > > > > examples/ipv4_multicast/Makefile | 13 +++++++++----
> > > > > examples/kni/Makefile | 13 +++++++++----
> > > > > examples/l2fwd-cat/Makefile | 13 +++++++++----
> > > > > examples/l2fwd-crypto/Makefile | 13 +++++++++----
> > > > > examples/l2fwd-jobstats/Makefile | 13 +++++++++----
> > > > > examples/l2fwd-keepalive/Makefile | 13 +++++++++----
> > > > > examples/l2fwd/Makefile | 13 +++++++++----
> > > > > examples/l3fwd-acl/Makefile | 13 +++++++++----
> > > > > examples/l3fwd-power/Makefile | 13 +++++++++----
> > > > > examples/l3fwd-vf/Makefile | 13 +++++++++----
> > > > > examples/l3fwd/Makefile | 13 +++++++++----
> > > > > examples/link_status_interrupt/Makefile | 13 +++++++++----
> > > > > examples/load_balancer/Makefile | 13 +++++++++----
> > > > > examples/packet_ordering/Makefile | 13 +++++++++----
> > > > > examples/ptpclient/Makefile | 13 +++++++++----
> > > > > examples/qos_meter/Makefile | 13 +++++++++----
> > > > > examples/qos_sched/Makefile | 13 +++++++++----
> > > > > examples/rxtx_callbacks/Makefile | 13 +++++++++----
> > > > > examples/service_cores/Makefile | 13 +++++++++----
> > > > > examples/skeleton/Makefile | 13 +++++++++----
> > > > > examples/tep_termination/Makefile | 13 +++++++++----
> > > > > examples/timer/Makefile | 13 +++++++++----
> > > > > examples/vhost/Makefile | 13 +++++++++----
> > > > > examples/vhost_scsi/Makefile | 13 +++++++++----
> > > > > examples/vmdq/Makefile | 13 +++++++++----
> > > > > examples/vmdq_dcb/Makefile | 13 +++++++++----
> > > > > 40 files changed, 360 insertions(+), 160 deletions(-)
> > > > >
> > > > > diff --git a/examples/bbdev_app/Makefile
> > > > > b/examples/bbdev_app/Makefile
> > > > > index e8115b46a..603932ace 100644
> > > > > --- a/examples/bbdev_app/Makefile
> > > > > +++ b/examples/bbdev_app/Makefile
> > > > > @@ -18,10 +18,15 @@ shared: build/$(APP)-shared
> > > > > static: build/$(APP)-static
> > > > > ln -sf $(APP)-static build/$(APP)
> > > > >
> > > > > -PC_FILE := $(shell pkg-config --path libdpdk)
> > > > > -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
> > > > > -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
> > > > > -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --
> > > > > libs
> > > > > libdpdk)
> > > > > +PKGCONF=pkg-config
> > > > > +ifneq ($(DPDK_PC_PREFIX),)
> > > > > + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX)
> > > > > +endif
> > > > > +
> > > > > +PC_FILE := $(shell $(PKGCONF) --path libdpdk)
> > > > > +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
> > > > > +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
> > > > > +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --
> > > > > libs
> > > > > libdpdk)
> > > > >
> > > > > CFLAGS += -DALLOW_EXPERIMENTAL_API
> > > >
> > > > Hi,
> > > >
> > > > Would using "--define-prefix" allow to avoid the special-sauced
> > > > DPDK_PC_PREFIX variable?
> > > >
> > > > --
> > >
> > > Perhaps I'm missing something, but I'm not seeing how, since the
> > > code
> > > above
> > > is already using the --define-variable flag. Swapping one pkg-
> > > config
> > > flag
> > > for another isn't likely to change the flow. Whatever way things
> > > work, we
> > > need an environment variable to pull in the path change. Since
> > > one
> > > doesn't
> > > seem to be available for pkg-config directly, we need a DPDK
> > > special-
> > > sauced
> > > one.
> > >
> > > /Bruce
> >
> > I think PKG_CONFIG_PATH is a more common and more well-understood
> > flag
> > to use - using define-prefix should allow to use that instead
> >
>
> Yes, except pkg-config-path only gives the path to the pkg-config
> file, it
> doesn't affect the prefixes in the file itself, and it's the latter
> we need
> to modify.
Using --define-prefix will automatically adjust the prefixes based on
the path:
$ grep prefix /tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
prefix=/usr/local
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include
$ PKG_CONFIG_PATH=/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig
pkg-config --cflags --libs libdpdk
-include rte_config.h -march=native -I/usr/local/include
-I/usr/include/libnl3 -L/usr/local/lib/x86_64-linux-gnu -lrte_telemetry
-lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port
-lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched
-lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_member
-lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag
-lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor
-lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats
-lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci
-lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring
-lrte_cmdline -lrte_eal -lrte_kvargs
$ PKG_CONFIG_PATH=/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig
pkg-config --define-prefix --cflags --libs libdpdk
-include rte_config.h -march=native -I/tmp/test/usr/local/lib/include
-I/usr/lib/include -I/usr/lib/include/libnl3 -I/usr/lib/include
-L/tmp/test/usr/local/lib/lib/x86_64-linux-gnu -lrte_telemetry
-lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port
-lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched
-lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_member
-lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag
-lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor
-lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats
-lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci
-lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring
-lrte_cmdline -lrte_eal -lrte_kvargs
--
Kind regards,
Luca Boccassi
next prev parent reply other threads:[~2019-05-07 15:53 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-07 10:09 ` Luca Boccassi
2019-05-07 10:09 ` Luca Boccassi
2019-05-07 10:50 ` Bruce Richardson
2019-05-07 10:50 ` Bruce Richardson
2019-05-07 13:28 ` Luca Boccassi
2019-05-07 13:28 ` Luca Boccassi
2019-05-07 15:17 ` Bruce Richardson
2019-05-07 15:17 ` Bruce Richardson
2019-05-07 15:53 ` Luca Boccassi [this message]
2019-05-07 15:53 ` Luca Boccassi
2019-05-07 16:04 ` Bruce Richardson
2019-05-07 16:04 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson
2019-05-03 13:35 ` Bruce Richardson
2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson
2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 11:54 ` Bruce Richardson
2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson
2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson
2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson
2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson
2019-05-17 13:12 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi
2019-05-20 21:59 ` Thomas Monjalon
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-07-02 7:57 ` Thomas Monjalon
2019-07-02 14:35 ` Bruce Richardson
2019-07-02 15:00 ` Thomas Monjalon
2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: " Bruce Richardson
2019-05-17 13:14 ` [dpdk-dev] [PATCH v2 0/5] improve building examples Luca Boccassi
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson
2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: " Bruce Richardson
2019-07-02 16:12 ` [dpdk-dev] [PATCH v3 0/5] improve building examples Thomas Monjalon
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=d5e2db1e01d1587157975f6d5e7f646133f835b7.camel@debian.org \
--to=bluca@debian.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).