From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 558B8A0096 for ; Wed, 8 May 2019 12:17:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4993B49E0; Wed, 8 May 2019 12:17:12 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DE5944C8D for ; Wed, 8 May 2019 12:17:10 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 468BB2D7EC; Wed, 8 May 2019 10:17:10 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-210.ams2.redhat.com [10.36.117.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13EAB410E; Wed, 8 May 2019 10:17:08 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Luca Boccassi , dpdk stable Date: Wed, 8 May 2019 11:15:34 +0100 Message-Id: <20190508101534.8984-52-ktraynor@redhat.com> In-Reply-To: <20190508101534.8984-1-ktraynor@redhat.com> References: <20190508101534.8984-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 08 May 2019 10:17:10 +0000 (UTC) Subject: [dpdk-stable] patch 'build: fix ninja install on FreeBSD' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/13/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/ac847cf0232b051bed999cb8c68b6cca3f7bcf72 Thanks. Kevin Traynor --- >From ac847cf0232b051bed999cb8c68b6cca3f7bcf72 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Thu, 2 May 2019 17:51:53 +0100 Subject: [PATCH] build: fix ninja install on FreeBSD [ upstream commit e09848337cac0f18833557034b181a48af517193 ] 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 Acked-by: Luca Boccassi --- 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 @@ -8,5 +8,6 @@ # 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 db32499b3..80d253828 100644 --- a/config/meson.build +++ b/config/meson.build @@ -2,4 +2,11 @@ # Copyright(c) 2017 Intel Corporation +# 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() diff --git a/meson.build b/meson.build index c48ecb8aa..9ab3f8ccc 100644 --- a/meson.build +++ b/meson.build @@ -70,11 +70,4 @@ configure_file(output: build_cfg, 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(), -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-05-08 11:05:08.380630700 +0100 +++ 0052-build-fix-ninja-install-on-FreeBSD.patch 2019-05-08 11:05:05.861932092 +0100 @@ -1 +1 @@ -From e09848337cac0f18833557034b181a48af517193 Mon Sep 17 00:00:00 2001 +From ac847cf0232b051bed999cb8c68b6cca3f7bcf72 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e09848337cac0f18833557034b181a48af517193 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -45 +46 @@ -index f8aded6ed..3678348de 100644 +index db32499b3..80d253828 100644 @@ -48,2 +49,2 @@ -@@ -43,4 +43,11 @@ driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt) - eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) +@@ -2,4 +2,11 @@ + # Copyright(c) 2017 Intel Corporation @@ -61 +62 @@ -index a96486597..d1e8e5239 100644 +index c48ecb8aa..9ab3f8ccc 100644 @@ -64 +65 @@ -@@ -64,11 +64,4 @@ configure_file(output: build_cfg, +@@ -70,11 +70,4 @@ configure_file(output: build_cfg,