[v1,3/3] meson: skip symlinks to PMDs script on no sub directory

Message ID 20240806134218.3619913-4-g.singh@nxp.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series meson options related changes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Gagandeep Singh Aug. 6, 2024, 1:42 p.m. UTC
if user gives option -Ddrivers_install_subdir= or
-Ddrivers_install_subdir=. to install all the PMDs in
parent directory, The post installation script
"symlink-drivers-solibs.sh" can create invalid library file
named 'librte_*.so*' or meson installation errors:

ln: './librte_*' and './librte_*' are the same file
FAILED: install script '/bin/sh /home/nxa12342/upstream/dpdk/config/.
/buildtools/symlink-drivers-solibs.sh lib/x86_64-linux-gnu .' exit code 1,
stopped
FAILED: meson-install

This patch removes this post-install script execution to symlink
the PMDs libraries when no sub directory is given.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 config/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
  

Comments

Bruce Richardson Aug. 6, 2024, 1:57 p.m. UTC | #1
On Tue, Aug 06, 2024 at 07:12:18PM +0530, Gagandeep Singh wrote:
> if user gives option -Ddrivers_install_subdir= or
> -Ddrivers_install_subdir=. to install all the PMDs in
> parent directory, The post installation script
> "symlink-drivers-solibs.sh" can create invalid library file
> named 'librte_*.so*' or meson installation errors:
> 
> ln: './librte_*' and './librte_*' are the same file
> FAILED: install script '/bin/sh /home/nxa12342/upstream/dpdk/config/.
> /buildtools/symlink-drivers-solibs.sh lib/x86_64-linux-gnu .' exit code 1,
> stopped
> FAILED: meson-install
> 
> This patch removes this post-install script execution to symlink
> the PMDs libraries when no sub directory is given.
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 8c8b019c25..4c1c6848ad 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -95,8 +95,11 @@  eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 # 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.
 if not is_windows
-    meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
-            get_option('libdir'), pmd_subdir_opt)
+    # skip symlink-drivers-solibs.sh execution on no sub directory
+    if pmd_subdir_opt != '' and pmd_subdir_opt != '.'
+	meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'), pmd_subdir_opt)
+    endif
 elif meson.version().version_compare('>=0.55.0')
     # 0.55.0 is required to use external program with add_install_script
     meson.add_install_script(py3,