DPDK patches and discussions
 help / color / mirror / Atom feed
From: tom.barbette@uliege.be
To: dev@dpdk.org
Subject: [dpdk-dev] Linking with -ldpdk
Date: Mon, 19 Feb 2018 10:39:39 +0100 (CET)	[thread overview]
Message-ID: <328301853.77122566.1519033179263.JavaMail.zimbra@uliege.be> (raw)

Hi list,

I found out that to staticly compile against DPDK using the combined lib, I needed all these options :

-I${RTE_SDK}/${RTE_TARGET}/include -L${RTE_SDK}/${RTE_TARGET}/lib -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -lnuma -ldl -lpthread -lm -lmlx4 -lmlx5 -libverbs

The whole-archive makes sense, as we need to embed drivers that wouldn't be found at linking time (failing to include it prevents port discovery).
However it leads to missing inclusion. That's why I added all the libs at the end of the line. The mlx4 libs particularly leads me to think that there must be a more programmatic way, portable accross versions of DPDK to find out which libraries referenced in DPDK I should include, right? Morveover if the DPDK user didn't include mlx4, it will fail to compile...

What should I use? (the whole rte.extapp.mk DPDK build process is not an option as the build system is rather complex in this project)

Or maybe some of these libraries should be included in the dpdk static lib?

I use the last git version (but it's the same problem with previous ones).

Thanks,

Tom

             reply	other threads:[~2018-02-19  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19  9:39 tom.barbette [this message]
2018-02-19 10:14 ` Bruce Richardson
2018-02-19 14:04 ` Neil Horman

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=328301853.77122566.1519033179263.JavaMail.zimbra@uliege.be \
    --to=tom.barbette@uliege.be \
    --cc=dev@dpdk.org \
    /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).