From: Luca Boccassi <bluca@debian.org> To: Bruce Richardson <bruce.richardson@intel.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 2/4] build: use dependency() instead of find_library() Date: Fri, 11 Jan 2019 18:16:23 +0000 Message-ID: <1547230583.4501.21.camel@debian.org> (raw) In-Reply-To: <20190111172118.GB16340@bricha3-MOBL.ger.corp.intel.com> On Fri, 2019-01-11 at 17:21 +0000, Bruce Richardson wrote: > On Fri, Jan 11, 2019 at 04:26:06PM +0000, Luca Boccassi wrote: > > Whenever possible (if the library ships a pkg-config file) use > > meson's > > dependency() function to look for it, as it will automatically add > > it > > to the Requires.private list if needed, to allow for static builds > > to > > succeed for reverse dependencies of DPDK. Otherwise the recursive > > dependencies are not parsed, and users doing static builds have to > > resolve them manually by themselves. > > When using this API avoid additional checks that are superfluos and > > Spelling: superfluous I _always_ get that one wrong :-) > > take extra time, and avoid adding the linker flag manually which > > causes > > it to be duplicated. > > > > Signed-off-by: Luca Boccassi <bluca@debian.org> > > --- > > v2: split libbsd change in a separate commit, remove CC to stable > > as a meson bump will be required > > > > drivers/crypto/ccp/meson.build | 1 - > > drivers/crypto/openssl/meson.build | 1 - > > drivers/crypto/qat/meson.build | 1 - > > drivers/meson.build | 2 +- > > drivers/net/bnx2x/meson.build | 2 +- > > drivers/net/mlx4/meson.build | 6 +++--- > > drivers/net/mlx5/meson.build | 6 +++--- > > drivers/net/pcap/meson.build | 5 ++--- > > lib/librte_bpf/meson.build | 4 ++-- > > lib/librte_telemetry/meson.build | 2 +- > > 10 files changed, 13 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/crypto/ccp/meson.build > > b/drivers/crypto/ccp/meson.build > > index e43b00591..915c4c854 100644 > > --- a/drivers/crypto/ccp/meson.build > > +++ b/drivers/crypto/ccp/meson.build > > @@ -18,4 +18,3 @@ sources = files('rte_ccp_pmd.c', > > 'ccp_pmd_ops.c') > > > > ext_deps += dep > > -pkgconfig_extra_libs += '-lcrypto' > > diff --git a/drivers/crypto/openssl/meson.build > > b/drivers/crypto/openssl/meson.build > > index c2a0dd8ba..80e5e8835 100644 > > --- a/drivers/crypto/openssl/meson.build > > +++ b/drivers/crypto/openssl/meson.build > > @@ -8,4 +8,3 @@ endif > > deps += 'bus_vdev' > > sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') > > ext_deps += dep > > -pkgconfig_extra_libs += '-lcrypto' > > diff --git a/drivers/crypto/qat/meson.build > > b/drivers/crypto/qat/meson.build > > index 9cc98d2c2..21f969735 100644 > > --- a/drivers/crypto/qat/meson.build > > +++ b/drivers/crypto/qat/meson.build > > @@ -13,6 +13,5 @@ if dep.found() > > 'qat_sym.c', > > 'qat_sym_session.c') > > qat_ext_deps += dep > > - pkgconfig_extra_libs += '-lcrypto' > > qat_cflags += '-DBUILD_QAT_SYM' > > endif > > diff --git a/drivers/meson.build b/drivers/meson.build > > index e37d4fe2b..d17ca76eb 100644 > > --- a/drivers/meson.build > > +++ b/drivers/meson.build > > @@ -46,7 +46,7 @@ foreach class:driver_classes > > # set up internal deps. Drivers can > > append/override as necessary > > deps = std_deps > > # ext_deps: Stores external library dependency got > > - # using dependency() or cc.find_library(). For > > most cases, we > > + # using dependency() (preferred) or > > find_library(). For most cases, we > > # probably also need to specify the "-l" flags in > > # pkgconfig_extra_libs variable too, so that it > > can be reflected > > # in the pkgconfig output for static builds > > The last part of this comment can now be deleted, right? If we use > dependency() we don't need to use pkgconfig_extra_libs. > > Is the pkgconfig_extra_libs variable still needed after these > changes? > > /Bruce Yes, as we can't use dependency() for everything unfortunately - only for those projects that ship a pkg-config file, a cmake file or that Meson has built-in knowledge of (like llvm or libpcap). I'll update that comment accordingly in v4. -- Kind regards, Luca Boccassi
next prev parent reply other threads:[~2019-01-11 18:16 UTC|newest] Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-03 17:57 [dpdk-dev] [PATCH 1/2] build: use static deps of libs for pkg-config libs.private Luca Boccassi 2019-01-03 17:57 ` [dpdk-dev] [PATCH 2/2] build: use dependency() instead of find_library() Luca Boccassi 2019-01-07 14:28 ` Bruce Richardson 2019-01-07 16:39 ` [dpdk-dev] [dpdk-stable] " Luca Boccassi 2019-01-07 16:55 ` Bruce Richardson 2019-01-07 17:03 ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon 2019-01-07 17:45 ` [dpdk-dev] [dpdk-stable] [dpdk-techboard] " Thomas Monjalon 2019-01-07 21:09 ` Luca Boccassi 2019-01-07 22:03 ` Luca Boccassi 2019-01-11 11:10 ` [dpdk-dev] [dpdk-stable] " Luca Boccassi 2019-01-11 11:52 ` Bruce Richardson 2019-01-11 12:39 ` Luca Boccassi 2019-01-11 14:24 ` Bruce Richardson 2019-01-11 14:56 ` Luca Boccassi 2019-01-11 15:49 ` Bruce Richardson 2019-01-11 16:27 ` Luca Boccassi 2019-01-11 12:38 ` [dpdk-dev] [PATCH v2 1/3] build: use static deps of libs for pkg-config libs.private Luca Boccassi 2019-01-11 12:38 ` [dpdk-dev] [PATCH v2 2/3] build: use dependency() instead of find_library() Luca Boccassi 2019-01-11 12:38 ` [dpdk-dev] [PATCH v2 3/3] build: bump minimum Meson to 0.47.1 and use dependency() for libbsd Luca Boccassi 2019-01-11 14:27 ` Bruce Richardson 2019-01-11 14:30 ` Bruce Richardson 2019-01-11 15:04 ` Luca Boccassi 2019-01-11 15:50 ` Bruce Richardson 2019-01-11 16:14 ` Luca Boccassi 2019-01-11 16:26 ` [dpdk-dev] [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi 2019-01-11 16:26 ` [dpdk-dev] [PATCH v3 2/4] build: use dependency() instead of find_library() Luca Boccassi 2019-01-11 17:21 ` Bruce Richardson 2019-01-11 18:16 ` Luca Boccassi [this message] 2019-01-11 21:49 ` Bruce Richardson 2019-01-11 16:26 ` [dpdk-dev] [PATCH v3 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi 2019-01-11 17:22 ` Bruce Richardson 2019-01-11 16:26 ` [dpdk-dev] [PATCH v3 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi 2019-01-11 17:24 ` Bruce Richardson 2019-01-11 17:17 ` [dpdk-dev] [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson 2019-01-11 18:22 ` [dpdk-dev] [PATCH v4 " Luca Boccassi 2019-01-11 18:22 ` [dpdk-dev] [PATCH v4 2/4] build: use dependency() instead of find_library() Luca Boccassi 2019-01-11 18:22 ` [dpdk-dev] [PATCH v4 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi 2019-01-11 18:22 ` [dpdk-dev] [PATCH v4 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi 2019-01-22 13:10 ` [dpdk-dev] [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi 2019-01-22 13:10 ` [dpdk-dev] [PATCH v5 2/4] build: use dependency() instead of find_library() Luca Boccassi 2019-01-22 13:46 ` Bruce Richardson 2019-01-22 14:09 ` Luca Boccassi 2019-01-22 14:24 ` Bruce Richardson 2019-01-22 14:25 ` Bruce Richardson 2019-01-22 13:10 ` [dpdk-dev] [PATCH v5 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi 2019-01-22 13:10 ` [dpdk-dev] [PATCH v5 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi 2019-01-22 13:42 ` [dpdk-dev] [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson 2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 1/5] " Luca Boccassi 2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 2/5] build: use dependency() instead of find_library() Luca Boccassi 2019-02-12 11:15 ` Thomas Monjalon 2019-02-12 11:31 ` Bruce Richardson 2019-02-12 11:36 ` Thomas Monjalon 2019-02-12 11:43 ` Bruce Richardson 2019-02-12 14:47 ` Thomas Monjalon 2019-02-12 15:03 ` Bruce Richardson 2019-02-12 16:21 ` Thomas Monjalon 2019-02-13 10:49 ` Luca Boccassi 2019-02-13 11:10 ` Thomas Monjalon 2019-02-13 13:45 ` Luca Boccassi 2019-02-13 11:48 ` Luca Boccassi 2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi 2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi 2019-02-06 17:08 ` [dpdk-dev] [PATCH v6 5/5] build: use integers for numerical options Luca Boccassi 2019-02-08 14:44 ` Bruce Richardson 2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 1/5] build: bump minimum Meson version to 0.47.1 Luca Boccassi 2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 2/5] build: use dependency() instead of find_library() Luca Boccassi 2019-02-13 15:35 ` Bruce Richardson 2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi 2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi 2019-02-13 11:54 ` [dpdk-dev] [PATCH v7 5/5] build: use integers for numerical options Luca Boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 luca.boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 2/6] build: use dependency() instead of find_library() luca.boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 3/6] build: reorder libraries and build eal before cmdline luca.boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 4/6] build: use dependency() for libbsd instead of manual append to ldflags luca.boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 5/6] build: use integers for numerical options luca.boccassi 2019-02-26 17:46 ` [dpdk-dev] [PATCH v8 6/6] build: use dependency for pcap and fallback to find_library luca.boccassi 2019-02-26 17:49 ` Luca Boccassi 2019-02-27 8:33 ` Thomas Monjalon 2019-02-27 9:47 ` Bruce Richardson 2019-02-27 10:50 ` Luca Boccassi 2019-02-27 10:56 ` Thomas Monjalon 2019-02-27 12:03 ` Luca Boccassi 2019-02-27 13:53 ` Bruce Richardson 2019-02-28 17:40 ` Bruce Richardson 2019-03-01 13:13 ` Thomas Monjalon 2019-03-01 15:13 ` Luca Boccassi 2019-03-01 13:22 ` Thomas Monjalon 2019-02-27 11:29 ` [dpdk-dev] [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 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=1547230583.4501.21.camel@debian.org \ --to=bluca@debian.org \ --cc=bruce.richardson@intel.com \ --cc=dev@dpdk.org \ /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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git