From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3775BA04F0; Tue, 10 Dec 2019 19:00:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CCE091B13C; Tue, 10 Dec 2019 19:00:22 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9F0DC23D for ; Tue, 10 Dec 2019 19:00:20 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 10:00:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,300,1571727600"; d="scan'208";a="244933611" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga002.fm.intel.com with ESMTP; 10 Dec 2019 10:00:18 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Thomas Monjalon Date: Tue, 10 Dec 2019 18:00:12 +0000 Message-Id: <20191210180012.871114-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] build: fix soname info in make build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The soname for each stable ABI version should be just the ABI version major number without the minor number. Unfortunately both major and minor were used causing version 20.1 to be incompatible with 20.0. For make the fix is to separate out the soname passed to the linker from the final shared library name, and then add an additional symlink to properly ensure all expected .so.* files are present. Fixes: cba806e07d6f ("build: change ABI versioning to global") Signed-off-by: Thomas Monjalon Signed-off-by: Bruce Richardson --- mk/rte.lib.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 655a1b143..4b4267021 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -19,6 +19,8 @@ LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.') endif ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +SOVER := $(basename $(LIBABIVER)) +SONAME := $(patsubst %.a,%.so.$(SOVER),$(LIB)) LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB)) ifeq ($(EXTLIB_BUILD),n) CPU_LDFLAGS += --version-script=$(SRCDIR)/$(EXPORT_MAP) @@ -74,7 +76,7 @@ NO_UNDEFINED := -z defs endif O_TO_S = $(LD) -L$(RTE_SDK_BIN)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \ - -shared $(OBJS-y) $(NO_UNDEFINED) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB) + -shared $(OBJS-y) $(NO_UNDEFINED) $(LDLIBS) -Wl,-soname,$(SONAME) -o $(LIB) O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)") O_TO_S_DO = @set -e; \ @@ -133,6 +135,7 @@ $(RTE_OUTPUT)/lib/$(LIB): $(LIB) $(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) $(Q)ln -s -f $< $(shell echo $@ | sed 's/\.so.*/.so/') + $(Q)ln -s -f $< $(shell echo $@ | sed 's/\.so.*/.so.$(SOVER)/') endif # -- 2.23.0