From: Luca Boccassi <luca.boccassi@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>, dev@dpdk.org
Cc: nhorman@tuxdriver.com, harry.van.haaren@intel.com,
Christian Ehrhardt <christian.ehrhardt@canonical.com>
Subject: Re: [dpdk-dev] [PATCH v2 16/17] build: add option to version libs using DPDK version
Date: Wed, 13 Sep 2017 12:32:24 +0100 [thread overview]
Message-ID: <1505302344.31233.3.camel@gmail.com> (raw)
In-Reply-To: <20170912103809.140473-17-bruce.richardson@intel.com>
On Tue, 2017-09-12 at 11:38 +0100, Bruce Richardson wrote:
> Normally, each library has it's own version number based on the ABI.
> Add an option to have all libs just use the DPDK version number as
> the
> .so version.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
> ---
> drivers/meson.build | 8 +++++++-
> lib/meson.build | 8 +++++++-
> meson_options.txt | 1 +
> 3 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index f19da16fb..0c251bd61 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -92,6 +92,12 @@ foreach class:driver_classes
> depends:
> [pmdinfogen, tmp_lib])
> endforeach
>
> + if get_option('per_library_versions')
> + so_version = '@0@.1'.format(version)
> + else
> + so_version = meson.project_version()
> + endif
> +
> # now build the driver itself, and add to
> the drivers list
> lib_name = driver_name_fmt.format(name)
> version_map = '@0@/@1@/@2@_version.map'.form
> at(
> @@ -105,7 +111,7 @@ foreach class:driver_classes
> c_args: cflags,
> link_args: '-Wl,--version-script=' +
> version_map,
> link_depends: version_map,
> - version: '@0@.1'.format(version),
> + version: so_version,
> install: true,
> install_dir: driver_install_path)
>
> diff --git a/lib/meson.build b/lib/meson.build
> index d814721de..36652cfe1 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -76,6 +76,12 @@ foreach l:libraries
> dep_objs += [get_variable('dep_rte_' + d)]
> endforeach
>
> + if get_option('per_library_versions')
> + so_version = '@0@.1'.format(version)
> + else
> + so_version = meson.project_version()
> + endif
> +
> version_map = '@0@/@1@/rte_@2@_version.map'.format(
> meson.current_source_dir(),
> dir_name, name)
> libname = 'rte_' + name
> @@ -87,7 +93,7 @@ foreach l:libraries
> include_directories:
> include_directories(dir_name),
> link_args: '-Wl,--version-script=' +
> version_map,
> link_depends: version_map,
> - version: '@0@.1'.format(version),
> + version: so_version,
> install: true)
> dep = declare_dependency(link_with: lib,
> include_directories:
> include_directories(dir_name),
> diff --git a/meson_options.txt b/meson_options.txt
> index 9c45b8159..636226ce8 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -6,3 +6,4 @@ option('allow_invalid_socket_id', type: 'boolean',
> value: false,
> description: 'allow out-of-range NUMA socket id\'s for
> platforms that don\'t report the value correctly')
> option('enable_kmods', type: 'boolean', value: true, description:
> 'build kernel modules')
> option('kernel_dir', type: 'string', value: '', description: 'path
> to the kernel for building kernel modules')
> +option('per_library_versions', type: 'boolean', value: true,
> description: 'true: each lib gets its own version number, false: DPDK
> version used for each lib')
Hi Bruce,
First of all thanks for implementing this option, and sorry for the
delay.
A couple of minor things:
1) The project version has 3 digits, but the ABI version should have 2
- eg: should be 17.08 but right now it's 17.08.0 - given point releases
will be ABI compatible so they must not change the ABI version. In the
packaging code we use cut to chop it off:
DPDK_ABI := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '.' -f1-2)
Not sure how to achieve the same in a Meson script though (can it shell
out? or are there string manipulation built-ins?), sorry - just
starting to look at it.
Right now the rte_config option allows the user to completely override
the version - I'm fine with having a single boolean provided this
change is applied, it simplifies packaging a bit, but if it's easier
for you to just accepted a version instead of a boolean it's fine as
well, as you prefer
2) When the option is true, it should not generate a symlink with the
ABI "revision", as the first digit is really not the revision, so it
does not make much sense. Worse, it will stop 2 versions being co-
installable (which was the whole point :-) ), as, eg, 17.02, 17.05 and
17.08 will all ship a libfoo.so.17 symlink. I can fix it in the
packaging, but I don't think it should be generated upstream at all
when this option is enabled.
IOW, the following is the current result:
$ ls -l debian/librte-ethdev17.08/usr/lib/x86_64-linux-gnu/
total 72
lrwxrwxrwx 1 lboccass lboccass 24 Sep 13 11:50 librte_ethdev.so.17 -> librte_ethdev.so.17.08.0
-rw-r--r-- 1 lboccass lboccass 71672 Sep 13 11:50 librte_ethdev.so.17.08.0
The expected result would be to create a single file "librte_ethdev.so.17.08" instead.
--
Kind regards,
Luca Boccassi
next prev parent reply other threads:[~2017-09-13 11:32 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 10:03 [dpdk-dev] [PATCH 00/17] build DPDK libs and some drivers with meson/ninja Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds Bruce Richardson
2017-09-04 13:36 ` Van Haaren, Harry
2017-09-04 13:51 ` Bruce Richardson
2017-09-06 16:18 ` Bruce Richardson
2017-09-07 13:52 ` Bruce Richardson
2017-09-07 16:21 ` [dpdk-dev] [dpdk-dev, " Neil Horman
2017-09-07 16:47 ` Wiles, Keith
2017-09-07 17:12 ` Neil Horman
2017-09-08 8:50 ` Bruce Richardson
2017-09-08 11:57 ` Neil Horman
2017-09-08 13:55 ` Bruce Richardson
2017-09-08 14:00 ` Bruce Richardson
2017-09-08 16:03 ` [dpdk-dev] [PATCH " Van Haaren, Harry
2017-09-08 16:13 ` Richardson, Bruce
2017-09-12 9:56 ` Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 02/17] eal: add eal library to meson build Bruce Richardson
2017-09-04 13:53 ` Van Haaren, Harry
2017-09-07 16:25 ` [dpdk-dev] [dpdk-dev, " Neil Horman
2017-09-08 8:51 ` Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 03/17] igb_uio: add igb_uio kmod " Bruce Richardson
2017-09-01 13:32 ` Luca Boccassi
2017-09-01 13:55 ` Bruce Richardson
2017-09-01 14:27 ` Luca Boccassi
2017-09-04 13:57 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 04/17] build: add DPDK libraries to build Bruce Richardson
2017-09-04 14:08 ` Van Haaren, Harry
2017-09-04 14:55 ` Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 05/17] build: add buildtools to meson build Bruce Richardson
2017-09-04 14:24 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 06/17] build: add infrastructure for building PMDs Bruce Richardson
2017-09-04 14:27 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 07/17] drivers/mempool: add SW mempool drivers to meson build Bruce Richardson
2017-09-04 14:28 ` Van Haaren, Harry
2017-09-04 14:29 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 08/17] drivers/crypto: add crypto drv class and null PMD to meson Bruce Richardson
2017-09-04 14:30 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 09/17] crypto/openssl: add driver to meson build Bruce Richardson
2017-09-04 14:30 ` Van Haaren, Harry
2017-09-04 14:31 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 10/17] crypto/qat: " Bruce Richardson
2017-09-04 14:32 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 11/17] drivers/net: add net driver support " Bruce Richardson
2017-09-04 14:32 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 12/17] drivers/net: add set of vdev PMDs to build Bruce Richardson
2017-09-04 14:34 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 13/17] drivers/net: add drivers for Intel NICs to meson build Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 14/17] app/test-pmd: add test-pmd " Bruce Richardson
2017-09-04 15:01 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 15/17] usertools: add usertools installation " Bruce Richardson
2017-09-04 15:00 ` Van Haaren, Harry
2017-09-01 10:04 ` [dpdk-dev] [PATCH 16/17] build: add option to version libs using DPDK version Bruce Richardson
2017-09-07 17:07 ` [dpdk-dev] [dpdk-dev, " Neil Horman
2017-09-08 8:58 ` Bruce Richardson
2017-09-01 10:04 ` [dpdk-dev] [PATCH 17/17] doc: add documentation on how to add new components to DPDK Bruce Richardson
2017-09-01 10:38 ` [dpdk-dev] [PATCH 00/17] build DPDK libs and some drivers with meson/ninja Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 " Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 01/17] build: add initial infrastructure for meson & ninja builds Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 02/17] eal: add eal library to meson build Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 03/17] igb_uio: add igb_uio kmod " Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 04/17] build: add DPDK libraries to build Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 05/17] build: add buildtools to meson build Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 06/17] build: add infrastructure for building PMDs Bruce Richardson
2017-09-12 10:37 ` [dpdk-dev] [PATCH v2 07/17] drivers/mempool: add SW mempool drivers to meson build Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 08/17] drivers/crypto: add crypto drv class and null PMD to meson Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 09/17] crypto/openssl: add driver to meson build Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 10/17] crypto/qat: " Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 11/17] drivers/net: add net driver support " Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 12/17] drivers/net: add set of vdev PMDs to build Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 13/17] drivers/net: add drivers for Intel NICs to meson build Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 14/17] app/test-pmd: add test-pmd " Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 15/17] usertools: add usertools installation " Bruce Richardson
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 16/17] build: add option to version libs using DPDK version Bruce Richardson
2017-09-13 11:32 ` Luca Boccassi [this message]
2017-09-13 13:11 ` Bruce Richardson
2017-09-13 17:02 ` Luca Boccassi
2017-09-12 10:38 ` [dpdk-dev] [PATCH v2 17/17] doc: add documentation on how to add new components to DPDK Bruce Richardson
2017-09-12 13:21 ` [dpdk-dev] [PATCH v2 00/17] build DPDK libs and some drivers with meson/ninja Wiles, Keith
2017-09-12 13:24 ` Bruce Richardson
2017-09-12 13:26 ` Wiles, Keith
2017-09-12 14:00 ` Wiles, Keith
2017-09-12 15:46 ` Bruce Richardson
2017-09-12 19:19 ` Neil Horman
2017-09-12 20:36 ` Wiles, Keith
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 01/17] build: add initial infrastructure for meson & ninja builds Bruce Richardson
2017-09-20 10:10 ` Timothy M. Redaelli
2017-09-20 10:24 ` Bruce Richardson
2017-09-20 10:33 ` Timothy M. Redaelli
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 02/17] eal: add eal library to meson build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 03/17] igb_uio: add igb_uio kmod " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 04/17] build: add DPDK libraries to build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 05/17] build: add buildtools to meson build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 06/17] build: add infrastructure for building PMDs Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 07/17] drivers/mempool: add SW mempool drivers to meson build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 08/17] drivers/crypto: add crypto drv class and null PMD to meson Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 09/17] crypto/openssl: add driver to meson build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 10/17] crypto/qat: " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 11/17] drivers/net: add net driver support " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 12/17] drivers/net: add set of vdev PMDs to build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 13/17] drivers/net: add drivers for Intel NICs to meson build Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 14/17] app/test-pmd: add test-pmd " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 15/17] usertools: add usertools installation " Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 16/17] build: add option to version libs using DPDK version Bruce Richardson
2017-09-13 14:12 ` [dpdk-dev] [PATCH v3 17/17] doc: add documentation on how to add new components to DPDK Bruce Richardson
2017-09-13 17:01 ` [dpdk-dev] [PATCH v3 00/17] build DPDK libs and some drivers with meson/ninja Luca Boccassi
2017-09-14 13:57 ` Bruce Richardson
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=1505302344.31233.3.camel@gmail.com \
--to=luca.boccassi@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=christian.ehrhardt@canonical.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=nhorman@tuxdriver.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).