DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, bluca@debian.org,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD
Date: Thu,  2 May 2019 17:51:53 +0100	[thread overview]
Message-ID: <20190502165154.21746-4-bruce.richardson@intel.com> (raw)
Message-ID: <20190502165153.K-7C7GqT9g3NZTU0azUM2LRqqmkR0r3ER9aPiTbiYAI@z> (raw)
In-Reply-To: <20190502165154.21746-1-bruce.richardson@intel.com>

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -7,6 +7,7 @@
 # others, e.g. PCI device PMDs depending on the PCI bus driver.
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index f8aded6ed..3678348de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
 	machine = host_machine.cpu()
diff --git a/meson.build b/meson.build
index a96486597..d1e8e5239 100644
--- a/meson.build
+++ b/meson.build
@@ -63,13 +63,6 @@ configure_file(output: build_cfg,
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
 	filebase: 'lib' + meson.project_name().to_lower(),
-- 
2.20.1


  parent reply	other threads:[~2019-05-02 16:52 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 22:06 [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Bruce Richardson
2019-04-23 22:06 ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 1/4] examples: install examples as part of ninja install Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all examples Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 3/4] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-24  9:22   ` Luca Boccassi
2019-04-24  9:22     ` Luca Boccassi
2019-04-24 10:41     ` Bruce Richardson
2019-04-24 10:41       ` Bruce Richardson
2019-04-24 11:02       ` Luca Boccassi
2019-04-24 11:02         ` Luca Boccassi
2019-04-24 12:31         ` Bruce Richardson
2019-04-24 12:31           ` Bruce Richardson
2019-04-24 13:37           ` Luca Boccassi
2019-04-24 13:37             ` Luca Boccassi
2019-04-26 14:56             ` Bruce Richardson
2019-04-26 14:56               ` Bruce Richardson
2019-04-26 16:10               ` Luca Boccassi
2019-04-26 16:10                 ` Luca Boccassi
2019-05-02 13:11               ` Thomas Monjalon
2019-05-02 13:11                 ` Thomas Monjalon
2019-05-02 13:17                 ` Bruce Richardson
2019-05-02 13:17                   ` Bruce Richardson
2019-05-02 14:08                   ` Luca Boccassi
2019-05-02 14:08                     ` Luca Boccassi
2019-05-02 15:11                     ` Thomas Monjalon
2019-05-02 15:11                       ` Thomas Monjalon
2019-05-02 15:30                       ` Bruce Richardson
2019-05-02 15:30                         ` Bruce Richardson
2019-05-02 15:38                         ` Thomas Monjalon
2019-05-02 15:38                           ` Thomas Monjalon
2019-05-02 15:41                           ` Bruce Richardson
2019-05-02 15:41                             ` Bruce Richardson
2019-04-23 22:06 ` [dpdk-dev] [PATCH 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-23 22:06   ` Bruce Richardson
2019-04-23 23:04 ` [dpdk-dev] [PATCH 0/4] add testing of libdpdk pkg-config file Stephen Hemminger
2019-04-23 23:04   ` Stephen Hemminger
2019-04-24  8:54   ` Bruce Richardson
2019-04-24  8:54     ` Bruce Richardson
2019-04-24  9:00     ` Bruce Richardson
2019-04-24  9:00       ` Bruce Richardson
2019-04-26 16:11 ` Luca Boccassi
2019-04-26 16:11   ` Luca Boccassi
2019-04-26 16:20   ` Bruce Richardson
2019-04-26 16:20     ` Bruce Richardson
2019-04-26 16:50 ` [dpdk-dev] [PATCH v2 0/6] " Bruce Richardson
2019-04-26 16:50   ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 1/6] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 2/6] examples: install examples as part of ninja install Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 3/6] build: fix ninja install on FreeBSD Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-02 12:38     ` Thomas Monjalon
2019-05-02 12:38       ` Thomas Monjalon
2019-05-02 12:54       ` Luca Boccassi
2019-05-02 12:54         ` Luca Boccassi
2019-05-02 13:21       ` Bruce Richardson
2019-05-02 13:21         ` Bruce Richardson
2019-05-02 13:57         ` Thomas Monjalon
2019-05-02 13:57           ` Thomas Monjalon
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 5/6] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-04-26 16:50   ` [dpdk-dev] [PATCH v2 6/6] examples: remove auto-generation of examples list Bruce Richardson
2019-04-26 16:50     ` Bruce Richardson
2019-05-01 10:10     ` Luca Boccassi
2019-05-01 10:10       ` Luca Boccassi
2019-05-02 16:51   ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Bruce Richardson
2019-05-02 16:51     ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 1/4] examples/l3fwd: fix compile on FreeBSD Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja install Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 16:51     ` Bruce Richardson [this message]
2019-05-02 16:51       ` [dpdk-dev] [PATCH v4 3/4] build: fix ninja install on FreeBSD Bruce Richardson
2019-05-02 16:51     ` [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled Bruce Richardson
2019-05-02 16:51       ` Bruce Richardson
2019-05-02 21:09     ` [dpdk-dev] [PATCH v4 0/4] file meson compilation and install issues Thomas Monjalon
2019-05-02 21:09       ` 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=20190502165154.21746-4-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --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).