From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Timothy M. Redaelli" Subject: Re: [PATCH] examples: ethtool: Link against librte_pmd_ixgbe if necessary Date: Fri, 7 Apr 2017 15:15:09 +0200 Message-ID: References: <20170216161731.4590-1-mchandras@suse.de> <122cf48a-70ed-9ccd-463c-f77acfd3d6a9@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Nirmoy Das To: Remy Horton , Markos Chandras , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5EFA32C35 for ; Fri, 7 Apr 2017 15:15:12 +0200 (CEST) In-Reply-To: <122cf48a-70ed-9ccd-463c-f77acfd3d6a9@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 02/17/2017 05:11 PM, remy.horton at intel.com (Remy Horton) wrote: > > On 16/02/2017 16:17, Markos Chandras wrote: >> The librte_ethtool library depends on librte_pmd_ixgbe if that >> pmd driver is enabled so we need to link against it when we compile >> the ethtool application. It fixes the following build problem: > > For some reason this is not an issue with my Fedora box, so I'm guessing > SUSE is stricter with sub-depenencies of libraries. Does this affect any > of the OpenSUSE Linux distributions? Hi, I found that the issue is only present if you compile *without* .git directory present. If you have .git directoy RTE_DEVEL_BUILD is set to y (see mk/rte.var.mk) and this adds -rpath=$(RTE_SDK_BIN)/lib (see mk/rte.app.mk) that "hides" the problem, since the linker finds "librte_pmd_ixgbe.so" inside the $(RTE_SDK_BIN)/lib directory. So if you want to replicate it, you can delete the .git directory, use a snapshot (for example http://dpdk.org/browse/dpdk/snapshot/master.tar.xz or http://dpdk.org/browse/dpdk/snapshot/dpdk-17.05-rc1.tar.xz) or export RTE_DEVEL_BUILD=n. I confirm that this commit fixes the problem. Obliviously the problem is *only* present while using shared libraries. Acked-by: Timothy Redaelli You may use the following commands to replicate the problem: --8<--------------------------cut here-------------------------->8-- unset RTE_SDK RTE_INCLUDE RTE_TARGET export RTE_DEVEL_BUILD=n rm -rf x86_64-native-linuxapp-gcc make O=x86_64-native-linuxapp-gcc T=x86_64-native-linuxapp-gcc -j$(nproc) config sed -i 's/CONFIG_RTE_BUILD_SHARED_LIB=n/CONFIG_RTE_BUILD_SHARED_LIB=y/' x86_64-native-linuxapp-gcc/.config make O=x86_64-native-linuxapp-gcc -j$(nproc) make O=x86_64-native-linuxapp-gcc/examples T=x86_64-native-linuxapp-gcc examples