From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B3BB6A04F6;
	Fri, 20 Dec 2019 10:38:17 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 90C202C52;
	Fri, 20 Dec 2019 10:38:17 +0100 (CET)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
 by dpdk.org (Postfix) with ESMTP id DD7FD2C52
 for <dev@dpdk.org>; Fri, 20 Dec 2019 10:38:16 +0100 (CET)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5DE1F30E;
 Fri, 20 Dec 2019 01:38:16 -0800 (PST)
Received: from net-arm-thunderx2-02.shanghai.arm.com
 (net-arm-thunderx2-02.shanghai.arm.com [10.169.41.157])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 519773F718;
 Fri, 20 Dec 2019 01:38:08 -0800 (PST)
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: aconole@redhat.com, maicolgabriel@hotmail.com, thomas@monjalon.net,
 ferruh.yigit@intel.com, arybchenko@solarflare.com
Cc: dev@dpdk.org, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, nd@arm.com,
 Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 20 Dec 2019 17:37:09 +0800
Message-Id: <20191220093709.83992-3-ruifeng.wang@arm.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20191220093709.83992-1-ruifeng.wang@arm.com>
References: <20191218053902.193417-1-ruifeng.wang@arm.com>
 <20191220093709.83992-1-ruifeng.wang@arm.com>
Subject: [dpdk-dev] [PATCH v2 2/2] devtools: add path to additional shared
	object files
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Drivers librte_mempool_ring.so and librte_pmd_null.so are loaded by
librte_eal.so when running testpmd.
In Ubuntu Xenial, driver path is installed to RPATH on testpmd. This
allows librte_eal.so to find drivers by using the RPATH.
However, in Ubuntu Bionic, driver path is installed to RUNPATH instead.
The RUNPATH on testpmd is not available by librte_eal.so and therefore
lead to driver load failure:

EAL: Detected 32 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: librte_mempool_ring.so: cannot open shared object file:
					No such file or directory
EAL: FATAL: Cannot init plugins
EAL: Cannot init plugins

Add 'drivers' into LD_LIBRARY_PATH so that testpmd can find and make
use of these shared libraries.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 devtools/test-null.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index f39af2c06..548de8113 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -20,7 +20,7 @@ if [ ! -f "$testpmd" ] ; then
 fi
 
 if ldd $testpmd | grep -q librte_ ; then
-	export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
+	export LD_LIBRARY_PATH=$build/drivers:$build/lib:$LD_LIBRARY_PATH
 	libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
 else
 	libs=
-- 
2.17.1