DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Cc: Samuel Gauthier <samuel.gauthier@6wind.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: fix libs installation when installing sdk
Date: Thu, 14 Dec 2017 15:24:11 +0100	[thread overview]
Message-ID: <20171214142411.25375-1-olivier.matz@6wind.com> (raw)

From: Samuel Gauthier <samuel.gauthier@6wind.com>

The 'install-sdk' target creates an invalid symlink in the install
directory:

  # make install-sdk DESTDIR=/tmp/toto V=1
  [...]
  ln -snf $(/root/dpdk.org/buildtools/relpath.sh /tmp/toto/usr/local/lib \
            /tmp/toto/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/) \
       /tmp/toto/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib
  [...]
  # ls -l /tmp/toto/usr/local/share/dpdk/x86_64-native-linuxapp-gcc
  drwxr-xr-x 2 root root 4096 Dec 11 11:49 app
  lrwxrwxrwx 1 root root   21 Dec 11 11:49 include -> ../../../include/dpdk
  lrwxrwxrwx 1 root root   12 Dec 11 11:49 lib -> ../../../lib  # BAD LINK

This happens because the directory is not created. Moreover, it makes
sense for install-sdk to install the libs, which could be necessary to
build something against dpdk. After the patch, the link is correct and
the *.a libs are properly installed:

  # ls -l /tmp/toto/usr/local/share/dpdk/x86_64-native-linuxapp-gcc
  drwxr-xr-x 2 root root 4096 Dec 11 11:53 app
  lrwxrwxrwx 1 root root   21 Dec 11 11:53 include -> ../../../include/dpdk
  lrwxrwxrwx 1 root root   12 Dec 11 11:53 lib -> ../../../lib
  # ls -l /tmp/toto/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib/
  -rw-r--r-- 1 root root   1378 Dec  8 14:08 libdpdk.a
  -rw-r--r-- 1 root root 123380 Dec  8 14:02 librte_acl.a
  -rw-r--r-- 1 root root   3406 Dec  8 14:02 librte_bitratestats.a
  [...]

Fixes: 6efca1e9f873 ("mk: split install rule")
Cc: stable@dpdk.org

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 mk/rte.sdkinstall.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 4e97feff9..338fb4971 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -157,6 +157,8 @@ install-sdk:
 	$(Q)cp -a               $O/.config               $(DESTDIR)$(targetdir)
 	$(Q)cp -a               $O/app/dpdk-pmdinfogen   $(DESTDIR)$(targetdir)/app
 	$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
+	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(libdir))
+	$(Q)cp -a               $O/lib/*                 $(DESTDIR)$(libdir)
 	$(Q)$(call rte_symlink, $(DESTDIR)$(libdir),     $(DESTDIR)$(targetdir)/lib)
 
 install-doc:
-- 
2.11.0

             reply	other threads:[~2017-12-14 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 14:24 Olivier Matz [this message]
2017-12-15 10:19 ` Thomas Monjalon
2017-12-15 10:25   ` Olivier MATZ
2017-12-15 10:32     ` Thomas Monjalon
2017-12-15 10:45       ` Olivier MATZ
2017-12-15 11:00         ` Thomas Monjalon
2018-01-23 16:30           ` Olivier Matz
2018-06-25 14:46             ` Olivier Matz

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=20171214142411.25375-1-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=samuel.gauthier@6wind.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).