From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E38F4C004C9 for ; Tue, 7 May 2019 15:53:05 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 80462205ED for ; Tue, 7 May 2019 15:53:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80462205ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27D05343C; Tue, 7 May 2019 17:53:04 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id EBF26293B for ; Tue, 7 May 2019 17:53:01 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id y5so20787666wma.2 for ; Tue, 07 May 2019 08:53:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=3u8orUp4Si/oRjMdtbTS6sUqlaPENcNC12oTeYqF3bI=; b=pgcIRT3FPBwwseRPWneHRQy0IrkMPNBkJQbPq+iRA+MmVxQPGGcZJsA7ZoSC+OGNlu Nvno0UkZl67YrWehX+bcWmYW6m0aahGdEt83mBn9CGKHWLG5qZ0z6EMDmwpoHEn9bJCM qHgzdJyuEY2xDzizlhJZsjtWn52LlViEIj0GmS3NjQcbf/ioPavIgDuiMKaxOyfYUuPW tPhMvffJmGSvKqnH3917vxHqsfTj4pqA/aE8z+rfju+JOF02C9es0X5+YX7TNcTyFqgt 7DZLqyTku+lXrB03GrgxhZrr2peu6P2gX2yPUUm12VfxHKF6O6r5AWg7Wl+d13zbEFWj nCUg== X-Gm-Message-State: APjAAAV4CVCwvpu5MfT2q/XeBlhv2OR+dsQRbD5t0lL2P4ullgYxLsJG LcUH6ucKjGI1GaftAajXG/w= X-Google-Smtp-Source: APXvYqxGrQ8sVBSLy9wt5yernQJjYrZcRhr6IFBPLFWu7gOwYi4DKJ03Jm9lIlXMVCsh83fdtbdg3A== X-Received: by 2002:a7b:c552:: with SMTP id j18mr9287024wmk.83.1557244381382; Tue, 07 May 2019 08:53:01 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v12sm12049987wrw.23.2019.05.07.08.53.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 08:53:01 -0700 (PDT) Message-ID: From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org, "thomas@monjalon.net" Date: Tue, 07 May 2019 16:53:00 +0100 In-Reply-To: <20190507151747.GA44@bricha3-MOBL.ger.corp.intel.com> References: <20190503133537.58712-1-bruce.richardson@intel.com> <20190503133537.58712-3-bruce.richardson@intel.com> <23fe250a768fc5031a7c9018c3d730764dc9e2c8.camel@debian.org> <20190507105016.GA38@bricha3-MOBL.ger.corp.intel.com> <20190507151747.GA44@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > > > > >=20 > > > > > Signed-off-by: Bruce Richardson < > > > > > bruce.richardson@intel.com > > > > >=20 > > > > >=20 > > > > >=20 > > > > > --- > > > > > 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(-) > > > > >=20 > > > > > 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) > > > > > =20 > > > > > -PC_FILE :=3D $(shell pkg-config --path libdpdk) > > > > > -CFLAGS +=3D -O3 $(shell pkg-config --cflags libdpdk) > > > > > -LDFLAGS_SHARED =3D $(shell pkg-config --libs libdpdk) > > > > > -LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell pkg-config --static -- > > > > > libs > > > > > libdpdk) > > > > > +PKGCONF=3Dpkg-config > > > > > +ifneq ($(DPDK_PC_PREFIX),) > > > > > + PKGCONF +=3D --define-variable=3Dprefix=3D$(DPDK_PC_PREFI= X) > > > > > +endif > > > > > + > > > > > +PC_FILE :=3D $(shell $(PKGCONF) --path libdpdk) > > > > > +CFLAGS +=3D -O3 $(shell $(PKGCONF) --cflags libdpdk) > > > > > +LDFLAGS_SHARED =3D $(shell $(PKGCONF) --libs libdpdk) > > > > > +LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell $(PKGCONF) --static -- > > > > > libs > > > > > libdpdk) > > > > > =20 > > > > > CFLAGS +=3D -DALLOW_EXPERIMENTAL_API > > > >=20 > > > > Hi, > > > >=20 > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > > DPDK_PC_PREFIX variable? > > > >=20 > > > > --=20 > > >=20 > > > 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. > > >=20 > > > /Bruce > >=20 > > 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 > >=20 >=20 > 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= =20 prefix=3D/usr/local libdir=3D${prefix}/lib/x86_64-linux-gnu includedir=3D${prefix}/include $ PKG_CONFIG_PATH=3D/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig pkg-config --cflags --libs libdpdk -include rte_config.h -march=3Dnative -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=3D/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig pkg-config --define-prefix --cflags --libs libdpdk -include rte_config.h -march=3Dnative -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 --=20 Kind regards, Luca Boccassi