DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Timothy M. Redaelli" <tredaelli@redhat.com>
To: Remy Horton <remy.horton@intel.com>,
	Markos Chandras <mchandras@suse.de>,
	 dev@dpdk.org
Cc: Nirmoy Das <ndas@suse.de>
Subject: Re: [dpdk-dev] [PATCH] examples: ethtool: Link against librte_pmd_ixgbe if necessary
Date: Fri, 7 Apr 2017 15:15:09 +0200	[thread overview]
Message-ID: <f478217e-765c-2093-6fc2-770c34c40d78@redhat.com> (raw)
In-Reply-To: <122cf48a-70ed-9ccd-463c-f77acfd3d6a9@intel.com>

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 <tredaelli@redhat.com>


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

  parent reply	other threads:[~2017-04-07 13:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 16:17 Markos Chandras
2017-02-17 16:11 ` Remy Horton
2017-02-17 16:27   ` Markos Chandras
2017-02-20 14:06     ` Remy Horton
2017-04-07 13:15   ` Timothy M. Redaelli [this message]
2017-02-20 14:06 ` Remy Horton
2017-03-09 20:13 ` Thomas Monjalon
2017-04-04 10:15   ` Thomas Monjalon
2017-04-04 11:12     ` Remy Horton
2017-05-01 20:10 ` [dpdk-dev] [PATCH v2] examples/ethtool: fix link with ixgbe shared lib Thomas Monjalon
2017-05-01 20:12   ` 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=f478217e-765c-2093-6fc2-770c34c40d78@redhat.com \
    --to=tredaelli@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mchandras@suse.de \
    --cc=ndas@suse.de \
    --cc=remy.horton@intel.com \
    /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).