* [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu
@ 2017-09-15 17:36 luca.boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc luca.boccassi
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: luca.boccassi @ 2017-09-15 17:36 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
From: Luca Boccassi <bluca@debian.org>
A couple of small fixes are needed in order to make the meson build
compatible with Debian and Ubuntu, to avoid breaking backward
compatibility for applications that depend on the packages.
Debian and Ubuntu have been shipping a pkg-config file for more than
a year, but it is called libdpdk.pc rather than DPDK.pc. A few
downstream projects, like OVS and Collectd, have started using it in
with the former name.
To avoid breaking compatibility, rename it to libdpdk.pc.
Furthermore, in order to avoid breaking multiarch installability,
add an option to let users install arch-specific headers in another
subdirectory of the arch-independent ones. The reason is that some of
the arch specific ones have the same filename, so there is a clash.
The new option, include_subdir_arch, is disabled by default.
Finally a small fix to use the configure includedir rather than an
hard-coded path for exec-env and generic headers.
Luca Boccassi (3):
build: rename pkgconfig to libdpdk.pc
build: add optional arch-specific headers install path
build: don't hard-code generic/exec-env install path
config/meson.build | 2 +-
lib/librte_eal/bsdapp/eal/meson.build | 2 +-
lib/librte_eal/common/include/arch/x86/meson.build | 3 ++-
lib/librte_eal/common/include/meson.build | 2 +-
lib/librte_eal/linuxapp/eal/meson.build | 2 +-
meson.build | 4 +++-
meson_options.txt | 1 +
7 files changed, 10 insertions(+), 6 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc
2017-09-15 17:36 [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu luca.boccassi
@ 2017-09-15 17:36 ` luca.boccassi
2017-09-18 11:09 ` Bruce Richardson
2017-09-15 17:36 ` [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path luca.boccassi
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: luca.boccassi @ 2017-09-15 17:36 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, Luca Boccassi
From: Luca Boccassi <bluca@debian.org>
In Debian and Ubuntu we have been shipping a pkgconfig file for DPDK
for more than a year now, and the filename is libdpdk.pc.
A few downstream projects, like OVS and Collectd, have adopted the
use of libdpdk.pc in their build systems as well.
In order to maintain backward compatibility, rename the file from
DPDK.pc to libdpdk.pc.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index 6ad3e8053..f41fb4120 100644
--- a/meson.build
+++ b/meson.build
@@ -81,6 +81,7 @@ endif
pkg = import('pkgconfig')
pkg.generate(name: meson.project_name(),
+ filebase: 'lib' + meson.project_name().to_lower(),
version: meson.project_version(),
libraries: dpdk_libraries,
description: 'The Data Plane Development Kit (DPDK)',
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path
2017-09-15 17:36 [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu luca.boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc luca.boccassi
@ 2017-09-15 17:36 ` luca.boccassi
2017-09-18 11:27 ` Bruce Richardson
2017-09-15 17:36 ` [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env " luca.boccassi
2017-09-18 11:29 ` [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu Bruce Richardson
3 siblings, 1 reply; 9+ messages in thread
From: luca.boccassi @ 2017-09-15 17:36 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, Luca Boccassi
From: Luca Boccassi <bluca@debian.org>
A subset of the dpdk headers are arch-dependent, but have common names
and thus cause a clash in a multiarch installation.
For example, rte_config.h is different for each target.
Add a "include_subdir_arch" option to allow a user to specify a
subdirectory for arch independent headers to fix multiarch support.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
config/meson.build | 2 +-
lib/librte_eal/common/include/arch/x86/meson.build | 3 ++-
meson.build | 3 ++-
meson_options.txt | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index b57a7e64b..db68a08d4 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -69,4 +69,4 @@ dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
-install_headers('rte_config.h')
+install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build
index 80b5980c1..5e9c02687 100644
--- a/lib/librte_eal/common/include/arch/x86/meson.build
+++ b/lib/librte_eal/common/include/arch/x86/meson.build
@@ -45,4 +45,5 @@ install_headers(
'rte_rtm.h',
'rte_rwlock.h',
'rte_spinlock.h',
- 'rte_vect.h')
+ 'rte_vect.h',
+ subdir: get_option('include_subdir_arch'))
diff --git a/meson.build b/meson.build
index f41fb4120..134158dae 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,7 @@ subdir('app')
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,
configuration: dpdk_conf,
- install_dir: get_option('includedir'))
+ install_dir: get_option('includedir') + '/' + get_option('include_subdir_arch'))
# for static builds, include the drivers as libs, and also any
# other dependent libs that DPDK needs to link against
@@ -85,5 +85,6 @@ pkg.generate(name: meson.project_name(),
version: meson.project_version(),
libraries: dpdk_libraries,
description: 'The Data Plane Development Kit (DPDK)',
+ subdirs: [get_option('include_subdir_arch'), '.'],
extra_cflags: '-include "rte_config.h"'
)
diff --git a/meson_options.txt b/meson_options.txt
index 636226ce8..fb945db91 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,
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')
+option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers')
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env install path
2017-09-15 17:36 [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu luca.boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc luca.boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path luca.boccassi
@ 2017-09-15 17:36 ` luca.boccassi
2017-09-18 11:28 ` Bruce Richardson
2017-09-18 11:29 ` [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu Bruce Richardson
3 siblings, 1 reply; 9+ messages in thread
From: luca.boccassi @ 2017-09-15 17:36 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, Luca Boccassi
From: Luca Boccassi <bluca@debian.org>
Instead of hard-coding the install path of generic and exec-env headers
use the includedir option, so that it can be correctly overridden.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
lib/librte_eal/bsdapp/eal/meson.build | 2 +-
lib/librte_eal/common/include/meson.build | 2 +-
lib/librte_eal/linuxapp/eal/meson.build | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/meson.build b/lib/librte_eal/bsdapp/eal/meson.build
index f6c43fd44..5116f8dab 100644
--- a/lib/librte_eal/bsdapp/eal/meson.build
+++ b/lib/librte_eal/bsdapp/eal/meson.build
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
eal_inc += include_directories('include')
-install_subdir('include/exec-env', install_dir: 'include')
+install_subdir('include/exec-env', install_dir: get_option('includedir'))
sources = ['eal_alarm.c',
'eal_debug.c',
diff --git a/lib/librte_eal/common/include/meson.build b/lib/librte_eal/common/include/meson.build
index d106d1a46..bb9751065 100644
--- a/lib/librte_eal/common/include/meson.build
+++ b/lib/librte_eal/common/include/meson.build
@@ -66,6 +66,6 @@ common_headers = [
'rte_version.h']
install_headers(common_headers)
-install_subdir('generic', install_dir : 'include')
+install_subdir('generic', install_dir : get_option('includedir'))
subdir('arch')
diff --git a/lib/librte_eal/linuxapp/eal/meson.build b/lib/librte_eal/linuxapp/eal/meson.build
index bffbd7e66..46ae57649 100644
--- a/lib/librte_eal/linuxapp/eal/meson.build
+++ b/lib/librte_eal/linuxapp/eal/meson.build
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
eal_inc += include_directories('include')
-install_subdir('include/exec-env', install_dir: 'include')
+install_subdir('include/exec-env', install_dir: get_option('includedir'))
sources = ['eal_alarm.c',
'eal_debug.c',
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc
2017-09-15 17:36 ` [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc luca.boccassi
@ 2017-09-18 11:09 ` Bruce Richardson
2017-09-18 11:52 ` Luca Boccassi
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2017-09-18 11:09 UTC (permalink / raw)
To: luca.boccassi; +Cc: dev, Luca Boccassi
On Fri, Sep 15, 2017 at 06:36:10PM +0100, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> In Debian and Ubuntu we have been shipping a pkgconfig file for DPDK
> for more than a year now, and the filename is libdpdk.pc.
> A few downstream projects, like OVS and Collectd, have adopted the
> use of libdpdk.pc in their build systems as well.
> In order to maintain backward compatibility, rename the file from
> DPDK.pc to libdpdk.pc.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
I find the 'lib' bit strange, but if that is what is already out there,
then we should keep it for compatibility.
In future, we might create two pkgconfig files to transition over to a
new name, but to start with lets use what is being looked for by our
dependencies.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path
2017-09-15 17:36 ` [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path luca.boccassi
@ 2017-09-18 11:27 ` Bruce Richardson
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2017-09-18 11:27 UTC (permalink / raw)
To: luca.boccassi; +Cc: dev, Luca Boccassi
On Fri, Sep 15, 2017 at 06:36:11PM +0100, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> A subset of the dpdk headers are arch-dependent, but have common names
> and thus cause a clash in a multiarch installation.
> For example, rte_config.h is different for each target.
>
> Add a "include_subdir_arch" option to allow a user to specify a
> subdirectory for arch independent headers to fix multiarch support.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> config/meson.build | 2 +-
> lib/librte_eal/common/include/arch/x86/meson.build | 3 ++-
> meson.build | 3 ++-
> meson_options.txt | 1 +
> 4 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/config/meson.build b/config/meson.build
> index b57a7e64b..db68a08d4 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -69,4 +69,4 @@ dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
> dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
> dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
>
> -install_headers('rte_config.h')
> +install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
> diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build
> index 80b5980c1..5e9c02687 100644
> --- a/lib/librte_eal/common/include/arch/x86/meson.build
> +++ b/lib/librte_eal/common/include/arch/x86/meson.build
> @@ -45,4 +45,5 @@ install_headers(
> 'rte_rtm.h',
> 'rte_rwlock.h',
> 'rte_spinlock.h',
> - 'rte_vect.h')
> + 'rte_vect.h',
> + subdir: get_option('include_subdir_arch'))
> diff --git a/meson.build b/meson.build
> index f41fb4120..134158dae 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -70,7 +70,7 @@ subdir('app')
> build_cfg = 'rte_build_config.h'
> configure_file(output: build_cfg,
> configuration: dpdk_conf,
> - install_dir: get_option('includedir'))
> + install_dir: get_option('includedir') + '/' + get_option('include_subdir_arch'))
Minor nit: use "join_paths()" function. Will fix on apply.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env install path
2017-09-15 17:36 ` [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env " luca.boccassi
@ 2017-09-18 11:28 ` Bruce Richardson
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2017-09-18 11:28 UTC (permalink / raw)
To: luca.boccassi; +Cc: dev, Luca Boccassi
On Fri, Sep 15, 2017 at 06:36:12PM +0100, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> Instead of hard-coding the install path of generic and exec-env headers
> use the includedir option, so that it can be correctly overridden.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu
2017-09-15 17:36 [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu luca.boccassi
` (2 preceding siblings ...)
2017-09-15 17:36 ` [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env " luca.boccassi
@ 2017-09-18 11:29 ` Bruce Richardson
3 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2017-09-18 11:29 UTC (permalink / raw)
To: luca.boccassi; +Cc: dev
On Fri, Sep 15, 2017 at 06:36:09PM +0100, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> A couple of small fixes are needed in order to make the meson build
> compatible with Debian and Ubuntu, to avoid breaking backward
> compatibility for applications that depend on the packages.
>
> Debian and Ubuntu have been shipping a pkg-config file for more than
> a year, but it is called libdpdk.pc rather than DPDK.pc. A few
> downstream projects, like OVS and Collectd, have started using it in
> with the former name.
> To avoid breaking compatibility, rename it to libdpdk.pc.
>
> Furthermore, in order to avoid breaking multiarch installability,
> add an option to let users install arch-specific headers in another
> subdirectory of the arch-independent ones. The reason is that some of
> the arch specific ones have the same filename, so there is a clash.
> The new option, include_subdir_arch, is disabled by default.
>
> Finally a small fix to use the configure includedir rather than an
> hard-coded path for exec-env and generic headers.
>
> Luca Boccassi (3):
> build: rename pkgconfig to libdpdk.pc
> build: add optional arch-specific headers install path
> build: don't hard-code generic/exec-env install path
>
Series Applied to dpdk-next-build.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc
2017-09-18 11:09 ` Bruce Richardson
@ 2017-09-18 11:52 ` Luca Boccassi
0 siblings, 0 replies; 9+ messages in thread
From: Luca Boccassi @ 2017-09-18 11:52 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Mon, 2017-09-18 at 12:09 +0100, Bruce Richardson wrote:
> On Fri, Sep 15, 2017 at 06:36:10PM +0100, luca.boccassi@gmail.com
> wrote:
> > From: Luca Boccassi <bluca@debian.org>
> >
> > In Debian and Ubuntu we have been shipping a pkgconfig file for
> > DPDK
> > for more than a year now, and the filename is libdpdk.pc.
> > A few downstream projects, like OVS and Collectd, have adopted the
> > use of libdpdk.pc in their build systems as well.
> > In order to maintain backward compatibility, rename the file from
> > DPDK.pc to libdpdk.pc.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
>
> I find the 'lib' bit strange, but if that is what is already out
> there,
> then we should keep it for compatibility.
Not sure where the original name came from, it's been like that for a
few years - it might have been my fault :-)
In Debian/Ubuntu libraries development headers, unversioned shared
object symlinks and static archives always ship in packages named
libfoo[api-ver]-dev. This is strictly enforced by policy. We have
libdpdk-dev for example.
Then, usually, pkg-config files follow the same naming convention, so
that if you want to build against libfoo-dev you use pkg-config libfoo.
This makes it nice and predictable.
But IIRC it's not enforced, and not universally followed.
> In future, we might create two pkgconfig files to transition over to
> a
> new name, but to start with lets use what is being looked for by our
> dependencies.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Even just a symlink should work fine, at least it does with the pkg-
config I have on Debian. Should not cause issues on any implementation.
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-09-18 11:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 17:36 [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu luca.boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 1/3] build: rename pkgconfig to libdpdk.pc luca.boccassi
2017-09-18 11:09 ` Bruce Richardson
2017-09-18 11:52 ` Luca Boccassi
2017-09-15 17:36 ` [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path luca.boccassi
2017-09-18 11:27 ` Bruce Richardson
2017-09-15 17:36 ` [dpdk-dev] [PATCH 3/3] build: don't hard-code generic/exec-env " luca.boccassi
2017-09-18 11:28 ` Bruce Richardson
2017-09-18 11:29 ` [dpdk-dev] [PATCH 0/3] meson: compatibility with Debian/Ubuntu Bruce Richardson
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).