DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: fix ABI versioning compile error for combined shared library
Date: Fri,  6 Nov 2015 13:58:05 +0000	[thread overview]
Message-ID: <1446818285-20019-2-git-send-email-ferruh.yigit@intel.com> (raw)
In-Reply-To: <1446818285-20019-1-git-send-email-ferruh.yigit@intel.com>

Fixes following error:
  LD libdpdk.so
  /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found
  for symbol <function>@DPDK_x.y

Defines version symbols in a fixed path libdpdk.map file and this
value hardcoded into makefile

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/Makefile |  3 +++
 lib/Makefile         |  3 +++
 lib/libdpdk.map      | 12 ++++++++++++
 mk/rte.sdkbuild.mk   |  2 +-
 mk/rte.sharelib.mk   |  1 +
 5 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 lib/libdpdk.map

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 6da1ce2..d30018c 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -50,5 +50,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio
 DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt
 
+ifeq ($(COMBINED_BUILD),1)
 include $(RTE_SDK)/mk/rte.sharelib.mk
+endif
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/lib/Makefile b/lib/Makefile
index 9727b83..33d76a6 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -62,5 +62,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
 DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += librte_ivshmem
 endif
 
+ifeq ($(COMBINED_BUILD),1)
 include $(RTE_SDK)/mk/rte.sharelib.mk
+endif
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/lib/libdpdk.map b/lib/libdpdk.map
new file mode 100644
index 0000000..3988a3f
--- /dev/null
+++ b/lib/libdpdk.map
@@ -0,0 +1,12 @@
+DPDK_2.0 {
+
+};
+
+DPDK_2.1 {
+
+} DPDK_2.0;
+
+DPDK_2.2 {
+
+} DPDK_2.1;
+
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index 38ec7bd..d4e3abf 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -94,7 +94,7 @@ $(ROOTDIRS-y):
 	@echo "== Build $@"
 	$(Q)$(MAKE) S=$@ -f $(RTE_SRCDIR)/$@/Makefile -C $(BUILDDIR)/$@ all
 	@if [ $@ = drivers -a $(CONFIG_RTE_BUILD_COMBINE_LIBS) = y ]; then \
-		$(MAKE) -f $(RTE_SDK)/lib/Makefile sharelib; \
+		COMBINED_BUILD=1 $(MAKE) -f $(RTE_SDK)/lib/Makefile sharelib; \
 	fi
 
 %_clean:
diff --git a/mk/rte.sharelib.mk b/mk/rte.sharelib.mk
index 7bb7219..1f71fcb 100644
--- a/mk/rte.sharelib.mk
+++ b/mk/rte.sharelib.mk
@@ -40,6 +40,7 @@ LIB_ONE := lib$(RTE_LIBNAME).so
 else
 LIB_ONE := lib$(RTE_LIBNAME).a
 endif
+CPU_LDFLAGS += --version-script=$(SRCDIR)/lib/libdpdk.map
 endif
 
 .PHONY:sharelib
-- 
2.5.0

  reply	other threads:[~2015-11-06 13:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 15:36 [dpdk-dev] [PATCH v6 0/4] bonding corrections and additions Eric Kinzie
2015-10-19 15:36 ` [dpdk-dev] [PATCH v6 1/4] bond mode 4: copy entire config structure Eric Kinzie
2015-10-19 15:36 ` [dpdk-dev] [PATCH v6 2/4] bond mode 4: do not ignore multicast Eric Kinzie
2015-10-19 15:36 ` [dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine Eric Kinzie
2015-11-01 18:17   ` Thomas Monjalon
2015-11-01 23:17     ` [dpdk-dev] [PATCH] mk: fix ABI versioning compile error for combined shared library Ferruh Yigit
2015-11-01 23:24       ` Thomas Monjalon
2015-11-02  0:05         ` Ferruh Yigit
2015-11-02  7:10           ` Thomas Monjalon
2015-11-02 10:20             ` Ferruh Yigit
2015-11-02 15:23               ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2015-11-02 16:26                 ` Thomas Monjalon
2015-11-02 19:18                   ` Ferruh Yigit
2015-11-03  7:06                 ` Panu Matilainen
2015-11-03  9:20                   ` Ferruh Yigit
2015-11-03 10:41                     ` Panu Matilainen
2015-11-03 11:33                       ` Ferruh Yigit
2015-11-03 11:43                         ` Panu Matilainen
2015-11-06 13:58                 ` [dpdk-dev] [PATCH] " Ferruh Yigit
2015-11-06 13:58                   ` Ferruh Yigit [this message]
2015-11-02 10:23     ` [dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine Panu Matilainen
2015-11-02 16:42       ` Eric Kinzie
2015-11-03  6:48         ` Panu Matilainen
2015-11-03  8:16           ` Thomas Monjalon
2015-11-03  8:30             ` Panu Matilainen
2015-11-03  9:38               ` Thomas Monjalon
2015-11-03 17:12               ` Eric Kinzie
2015-11-03 11:02           ` Ferruh Yigit
2015-11-03 11:31             ` Panu Matilainen
2015-11-03 11:48               ` Ferruh Yigit
2015-11-20 19:46                 ` Eric Kinzie
2015-11-24 14:52                   ` Panu Matilainen
2015-10-19 15:36 ` [dpdk-dev] [PATCH v6 4/4] bond mode 4: tests for " Eric Kinzie
2015-10-19 16:27 ` [dpdk-dev] [PATCH v6 0/4] bonding corrections and additions Declan Doherty

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=1446818285-20019-2-git-send-email-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --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).