DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
@ 2019-12-11 10:26 Bruce Richardson
  2019-12-11 11:04 ` Luca Boccassi
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-11 10:26 UTC (permalink / raw)
  To: dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca, Bruce Richardson

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.

This patch fixes the issue by switching from 2-part to 3-part ABI version
numbers so that we can keep 20.0 as soname and using the final digits to
identify the 20.x releases which are ABI compatible. This requires changes
to both make and meson builds to handle the three-digit version and shrink
it to 2-digit for soname.

Fixes: cba806e07d6f ("build: change ABI versioning to global")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

This patch contains an alternative fix to that implied by the previous patches:
http://patches.dpdk.org/patch/63726/
http://patches.dpdk.org/patch/63728/

---
 ABI_VERSION         | 2 +-
 drivers/meson.build | 4 ++--
 lib/meson.build     | 4 ++--
 mk/rte.lib.mk       | 5 ++++-
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ABI_VERSION b/ABI_VERSION
index 2e73f8d2a..fcc01369a 100644
--- a/ABI_VERSION
+++ b/ABI_VERSION
@@ -1 +1 @@
-20.1
+20.0.1
diff --git a/drivers/meson.build b/drivers/meson.build
index 72eec4608..5f1d72071 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -132,11 +132,11 @@ foreach class:dpdk_driver_classes
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
 			endif
+			so_version = lib_version.split('.')
+			so_version = so_version[0] + '.' + so_version[1]
 
 			# now build the static driver
 			static_lib = static_library(lib_name,
diff --git a/lib/meson.build b/lib/meson.build
index 6ceb5e756..3b7dad348 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -113,11 +113,11 @@ foreach l:libraries
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
 			endif
+			so_version = lib_version.split('.')
+			so_version = so_version[0] + '.' + so_version[1]
 
 			# first build static lib
 			static_lib = static_library(libname,
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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 10:26 [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity Bruce Richardson
@ 2019-12-11 11:04 ` Luca Boccassi
  2019-12-11 11:08   ` Thomas Monjalon
  2019-12-11 11:11   ` Bruce Richardson
  2019-12-11 11:15 ` Ferruh Yigit
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 31+ messages in thread
From: Luca Boccassi @ 2019-12-11 11:04 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, ferruh.yigit

On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI
> version
> numbers so that we can keep 20.0 as soname and using the final digits
> to
> identify the 20.x releases which are ABI compatible. This requires
> changes
> to both make and meson builds to handle the three-digit version and
> shrink
> it to 2-digit for soname.
> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
> 
> This patch contains an alternative fix to that implied by the
> previous patches:
> http://patches.dpdk.org/patch/63726/
> 
> http://patches.dpdk.org/patch/63728/
> 
> 
> ---
>  ABI_VERSION         | 2 +-
>  drivers/meson.build | 4 ++--
>  lib/meson.build     | 4 ++--
>  mk/rte.lib.mk       | 5 ++++-
>  4 files changed, 9 insertions(+), 6 deletions(-)

Acked-by: Luca Boccassi <bluca@debian.org>

Thank you! I've set a reminder in my calendar for September to revert
it :-)

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:04 ` Luca Boccassi
@ 2019-12-11 11:08   ` Thomas Monjalon
  2019-12-11 11:14     ` Bruce Richardson
  2019-12-11 11:11   ` Bruce Richardson
  1 sibling, 1 reply; 31+ messages in thread
From: Thomas Monjalon @ 2019-12-11 11:08 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Bruce Richardson, dev, ray.kinsella, ferruh.yigit

11/12/2019 12:04, Luca Boccassi:
> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> > 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.
> > 
> > This patch fixes the issue by switching from 2-part to 3-part ABI
> > version
> > numbers so that we can keep 20.0 as soname and using the final digits
> > to
> > identify the 20.x releases which are ABI compatible. This requires
> > changes
> > to both make and meson builds to handle the three-digit version and
> > shrink
> > it to 2-digit for soname.
> > 
> > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > 
> > Signed-off-by: Thomas Monjalon <
> > thomas@monjalon.net
> > >
> > Signed-off-by: Bruce Richardson <
> > bruce.richardson@intel.com
> > >
> > ---
> > 
> > This patch contains an alternative fix to that implied by the
> > previous patches:
> > http://patches.dpdk.org/patch/63726/
> > 
> > http://patches.dpdk.org/patch/63728/
> > 
> > 
> > ---
> >  ABI_VERSION         | 2 +-
> >  drivers/meson.build | 4 ++--
> >  lib/meson.build     | 4 ++--
> >  mk/rte.lib.mk       | 5 ++++-
> >  4 files changed, 9 insertions(+), 6 deletions(-)
> 
> Acked-by: Luca Boccassi <bluca@debian.org>
> 
> Thank you! I've set a reminder in my calendar for September to revert
> it :-)

I don't think we need to revert it.
The ABI version will have only 2 numbers (21.0).
In makefile there is no change.
What needs to be changed in meson?



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:04 ` Luca Boccassi
  2019-12-11 11:08   ` Thomas Monjalon
@ 2019-12-11 11:11   ` Bruce Richardson
  2019-12-11 11:25     ` Ferruh Yigit
  2019-12-12 11:14     ` Ray Kinsella
  1 sibling, 2 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-11 11:11 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dev, thomas, ray.kinsella, ferruh.yigit

On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> > 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.
> > 
> > This patch fixes the issue by switching from 2-part to 3-part ABI
> > version
> > numbers so that we can keep 20.0 as soname and using the final digits
> > to
> > identify the 20.x releases which are ABI compatible. This requires
> > changes
> > to both make and meson builds to handle the three-digit version and
> > shrink
> > it to 2-digit for soname.
> > 
> > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > 
> > Signed-off-by: Thomas Monjalon <
> > thomas@monjalon.net
> > >
> > Signed-off-by: Bruce Richardson <
> > bruce.richardson@intel.com
> > >
> > ---
> > 
> > This patch contains an alternative fix to that implied by the
> > previous patches:
> > http://patches.dpdk.org/patch/63726/
> > 
> > http://patches.dpdk.org/patch/63728/
> > 
> > 
> > ---
> >  ABI_VERSION         | 2 +-
> >  drivers/meson.build | 4 ++--
> >  lib/meson.build     | 4 ++--
> >  mk/rte.lib.mk       | 5 ++++-
> >  4 files changed, 9 insertions(+), 6 deletions(-)
> 
> Acked-by: Luca Boccassi <bluca@debian.org>
> 
> Thank you! I've set a reminder in my calendar for September to revert
> it :-)
> 
Lol, don't forget to put another reminder to fix things properly then too.
:-)

We also still need consensus in the community as to whether to take this
approach or to do a re-spin of 19.11. At this point, I'm swayed by your
arguments and think we should keep compatibility at the cost of a little
pain and weirdness in our .so filenames.

/Bruce

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:08   ` Thomas Monjalon
@ 2019-12-11 11:14     ` Bruce Richardson
  2019-12-11 11:19       ` Ferruh Yigit
  0 siblings, 1 reply; 31+ messages in thread
From: Bruce Richardson @ 2019-12-11 11:14 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dev, ray.kinsella, ferruh.yigit

On Wed, Dec 11, 2019 at 12:08:25PM +0100, Thomas Monjalon wrote:
> 11/12/2019 12:04, Luca Boccassi:
> > On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> > > 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.
> > > 
> > > This patch fixes the issue by switching from 2-part to 3-part ABI
> > > version
> > > numbers so that we can keep 20.0 as soname and using the final digits
> > > to
> > > identify the 20.x releases which are ABI compatible. This requires
> > > changes
> > > to both make and meson builds to handle the three-digit version and
> > > shrink
> > > it to 2-digit for soname.
> > > 
> > > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > > 
> > > Signed-off-by: Thomas Monjalon <
> > > thomas@monjalon.net
> > > >
> > > Signed-off-by: Bruce Richardson <
> > > bruce.richardson@intel.com
> > > >
> > > ---
> > > 
> > > This patch contains an alternative fix to that implied by the
> > > previous patches:
> > > http://patches.dpdk.org/patch/63726/
> > > 
> > > http://patches.dpdk.org/patch/63728/
> > > 
> > > 
> > > ---
> > >  ABI_VERSION         | 2 +-
> > >  drivers/meson.build | 4 ++--
> > >  lib/meson.build     | 4 ++--
> > >  mk/rte.lib.mk       | 5 ++++-
> > >  4 files changed, 9 insertions(+), 6 deletions(-)
> > 
> > Acked-by: Luca Boccassi <bluca@debian.org>
> > 
> > Thank you! I've set a reminder in my calendar for September to revert
> > it :-)
> 
> I don't think we need to revert it.
> The ABI version will have only 2 numbers (21.0).
> In makefile there is no change.
> What needs to be changed in meson?
> 
We need to remove the explicit use of so_version, and let meson just do the
right thing with the lib version. That being said, I can see about having
meson behave as make so that it will work even if we forget (i.e. even with
changed behaviour we should still remove the explicit soversion usage when
it's no longer needed).

/Bruce

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 10:26 [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity Bruce Richardson
  2019-12-11 11:04 ` Luca Boccassi
@ 2019-12-11 11:15 ` Ferruh Yigit
  2019-12-11 13:14   ` Bruce Richardson
  2019-12-11 15:16 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
  3 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-12-11 11:15 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, bluca

On 12/11/2019 10:26 AM, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.

What about following, does it makes file names better?

DPDK_20.02 (ABI_20.1):
 SONAME: .so.20.0
 library name: .so.20.1
 .so.20.0 --> .so.20.1
 .so --> .so.20.1


DPDK_20.05 (ABI_20.2):
 SONAME: .so.20.0
 library name: .so.20.2
 .so.20.0 --> .so.20.2
 .so --> .so.20.2


> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> 
> This patch contains an alternative fix to that implied by the previous patches:
> http://patches.dpdk.org/patch/63726/
> http://patches.dpdk.org/patch/63728/
> 
> ---
>  ABI_VERSION         | 2 +-
>  drivers/meson.build | 4 ++--
>  lib/meson.build     | 4 ++--
>  mk/rte.lib.mk       | 5 ++++-
>  4 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/ABI_VERSION b/ABI_VERSION
> index 2e73f8d2a..fcc01369a 100644
> --- a/ABI_VERSION
> +++ b/ABI_VERSION
> @@ -1 +1 @@
> -20.1
> +20.0.1
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 72eec4608..5f1d72071 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -132,11 +132,11 @@ foreach class:dpdk_driver_classes
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
>  			endif
> +			so_version = lib_version.split('.')
> +			so_version = so_version[0] + '.' + so_version[1]
>  
>  			# now build the static driver
>  			static_lib = static_library(lib_name,
> diff --git a/lib/meson.build b/lib/meson.build
> index 6ceb5e756..3b7dad348 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -113,11 +113,11 @@ foreach l:libraries
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
>  			endif
> +			so_version = lib_version.split('.')
> +			so_version = so_version[0] + '.' + so_version[1]
>  
>  			# first build static lib
>  			static_lib = static_library(libname,
> 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
>  
>  #
> 


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:14     ` Bruce Richardson
@ 2019-12-11 11:19       ` Ferruh Yigit
  2019-12-12 11:07         ` Ray Kinsella
  0 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-12-11 11:19 UTC (permalink / raw)
  To: Bruce Richardson, Thomas Monjalon; +Cc: Luca Boccassi, dev, ray.kinsella

On 12/11/2019 11:14 AM, Bruce Richardson wrote:
> On Wed, Dec 11, 2019 at 12:08:25PM +0100, Thomas Monjalon wrote:
>> 11/12/2019 12:04, Luca Boccassi:
>>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
>>>> 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.
>>>>
>>>> This patch fixes the issue by switching from 2-part to 3-part ABI
>>>> version
>>>> numbers so that we can keep 20.0 as soname and using the final digits
>>>> to
>>>> identify the 20.x releases which are ABI compatible. This requires
>>>> changes
>>>> to both make and meson builds to handle the three-digit version and
>>>> shrink
>>>> it to 2-digit for soname.
>>>>
>>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>>
>>>> Signed-off-by: Thomas Monjalon <
>>>> thomas@monjalon.net
>>>>>
>>>> Signed-off-by: Bruce Richardson <
>>>> bruce.richardson@intel.com
>>>>>
>>>> ---
>>>>
>>>> This patch contains an alternative fix to that implied by the
>>>> previous patches:
>>>> http://patches.dpdk.org/patch/63726/
>>>>
>>>> http://patches.dpdk.org/patch/63728/
>>>>
>>>>
>>>> ---
>>>>  ABI_VERSION         | 2 +-
>>>>  drivers/meson.build | 4 ++--
>>>>  lib/meson.build     | 4 ++--
>>>>  mk/rte.lib.mk       | 5 ++++-
>>>>  4 files changed, 9 insertions(+), 6 deletions(-)
>>>
>>> Acked-by: Luca Boccassi <bluca@debian.org>
>>>
>>> Thank you! I've set a reminder in my calendar for September to revert
>>> it :-)
>>
>> I don't think we need to revert it.
>> The ABI version will have only 2 numbers (21.0).
>> In makefile there is no change.
>> What needs to be changed in meson?
>>
> We need to remove the explicit use of so_version, and let meson just do the
> right thing with the lib version. That being said, I can see about having
> meson behave as make so that it will work even if we forget (i.e. even with
> changed behaviour we should still remove the explicit soversion usage when
> it's no longer needed).
> 

Current major become two digits, "20.0", I think we fix it to single digit,
"21", again in 20.11.

I suggest adding this to deprecation notice document, with 20.11 target, so it
can stay there and remind us the change.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:11   ` Bruce Richardson
@ 2019-12-11 11:25     ` Ferruh Yigit
  2019-12-12 11:14     ` Ray Kinsella
  1 sibling, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-12-11 11:25 UTC (permalink / raw)
  To: Bruce Richardson, Luca Boccassi; +Cc: dev, thomas, ray.kinsella

On 12/11/2019 11:11 AM, Bruce Richardson wrote:
> On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
>>> 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.
>>>
>>> This patch fixes the issue by switching from 2-part to 3-part ABI
>>> version
>>> numbers so that we can keep 20.0 as soname and using the final digits
>>> to
>>> identify the 20.x releases which are ABI compatible. This requires
>>> changes
>>> to both make and meson builds to handle the three-digit version and
>>> shrink
>>> it to 2-digit for soname.
>>>
>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>
>>> Signed-off-by: Thomas Monjalon <
>>> thomas@monjalon.net
>>>>
>>> Signed-off-by: Bruce Richardson <
>>> bruce.richardson@intel.com
>>>>
>>> ---
>>>
>>> This patch contains an alternative fix to that implied by the
>>> previous patches:
>>> http://patches.dpdk.org/patch/63726/
>>>
>>> http://patches.dpdk.org/patch/63728/
>>>
>>>
>>> ---
>>>  ABI_VERSION         | 2 +-
>>>  drivers/meson.build | 4 ++--
>>>  lib/meson.build     | 4 ++--
>>>  mk/rte.lib.mk       | 5 ++++-
>>>  4 files changed, 9 insertions(+), 6 deletions(-)
>>
>> Acked-by: Luca Boccassi <bluca@debian.org>
>>
>> Thank you! I've set a reminder in my calendar for September to revert
>> it :-)
>>
> Lol, don't forget to put another reminder to fix things properly then too.
> :-)
> 
> We also still need consensus in the community as to whether to take this
> approach or to do a re-spin of 19.11. At this point, I'm swayed by your
> arguments and think we should keep compatibility at the cost of a little
> pain and weirdness in our .so filenames.
> 

I was leaning towards 19.11.1 but Luca was convincing :) and I agree he has a
point, so no objection to this change from me.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:15 ` Ferruh Yigit
@ 2019-12-11 13:14   ` Bruce Richardson
  0 siblings, 0 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-11 13:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, thomas, ray.kinsella, bluca

On Wed, Dec 11, 2019 at 11:15:29AM +0000, Ferruh Yigit wrote:
> On 12/11/2019 10:26 AM, Bruce Richardson wrote:
> > 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.
> > 
> > This patch fixes the issue by switching from 2-part to 3-part ABI version
> > numbers so that we can keep 20.0 as soname and using the final digits to
> > identify the 20.x releases which are ABI compatible. This requires changes
> > to both make and meson builds to handle the three-digit version and shrink
> > it to 2-digit for soname.
> 
> What about following, does it makes file names better?
> 
> DPDK_20.02 (ABI_20.1):
>  SONAME: .so.20.0
>  library name: .so.20.1
>  .so.20.0 --> .so.20.1
>  .so --> .so.20.1
> 
> 
> DPDK_20.05 (ABI_20.2):
>  SONAME: .so.20.0
>  library name: .so.20.2
>  .so.20.0 --> .so.20.2
>  .so --> .so.20.2
> 
> 
Personally, I really don't like having symlinks for libraries with the same
"level" of version number, i.e. while linking from 20.0 -> 20.0.1 is fine,
linking from 20.1 to 20.0 seems wrong, and would also potentially cause
issues with having 19.11 installed in parallel to another version.

/Bruce

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-11 10:26 [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity Bruce Richardson
  2019-12-11 11:04 ` Luca Boccassi
  2019-12-11 11:15 ` Ferruh Yigit
@ 2019-12-11 15:16 ` Bruce Richardson
  2019-12-12  8:27   ` David Marchand
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
  3 siblings, 1 reply; 31+ messages in thread
From: Bruce Richardson @ 2019-12-11 15:16 UTC (permalink / raw)
  To: dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca, Bruce Richardson

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.

This patch fixes the issue by switching from 2-part to 3-part ABI version
numbers so that we can keep 20.0 as soname and using the final digits to
identify the 20.x releases which are ABI compatible. This requires changes
to both make and meson builds to handle the three-digit version and shrink
it to 2-digit for soname.

Fixes: cba806e07d6f ("build: change ABI versioning to global")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---

V2: 
* adjusted the meson version to work correctly with both 2-part and
  3-part ABI versions, so it will work correctly even with no changes
  for a 21.x ABI version number
* adjusted the versions of the experimental libs so that they are
  consistent between meson and make, and also consistent with v19.11

---
 ABI_VERSION         |  2 +-
 config/meson.build  | 16 +++++++++++++---
 drivers/meson.build |  4 ++--
 lib/meson.build     |  4 ++--
 mk/rte.lib.mk       | 11 +++++++----
 5 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/ABI_VERSION b/ABI_VERSION
index 2e73f8d2a..fcc01369a 100644
--- a/ABI_VERSION
+++ b/ABI_VERSION
@@ -1 +1 @@
-20.1
+20.0.1
diff --git a/config/meson.build b/config/meson.build
index 364a8d739..01911ecf9 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
 major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
 abi_version = run_command(find_program('cat', 'more'),
 	abi_version_file).stdout().strip()
-# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
-ever = abi_version.split('.')
-experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
+
+# Regular libraries have the abi_version as the filename extension
+# and have the soname be all but the final part of the abi_version.
+# Experimental libraries have soname with '0.major'
+# and the filename suffix as 0.majorminor versions,
+# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
+#    sonames => librte_stable.so.20, librte_experimental.so.0.20
+# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
+#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
+abi_va = abi_version.split('.')
+stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
+experimental_abi_version = '0.' + ''.join(abi_va)
+experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
 
 # extract all version information into the build configuration
 dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
diff --git a/drivers/meson.build b/drivers/meson.build
index 72eec4608..4b17662b7 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
+				so_version = experimental_so_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
+				so_version = stable_so_version
 			endif
 
 			# now build the static driver
diff --git a/lib/meson.build b/lib/meson.build
index 6ceb5e756..0af3efab2 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -113,10 +113,10 @@ foreach l:libraries
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
+				so_version = experimental_so_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
+				so_version = stable_so_version
 			endif
 
 			# first build static lib
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 655a1b143..8ab852a3c 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
 # VPATH contains at least SRCDIR
 VPATH += $(SRCDIR)
 
-ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
 LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
-else ifeq ($(LIBABIVER),)
+SOVER := $(basename $(LIBABIVER))
+ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
 # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
-LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
+LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
+SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
 endif
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-11 15:16 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2019-12-12  8:27   ` David Marchand
  2019-12-12  8:57     ` Ferruh Yigit
  0 siblings, 1 reply; 31+ messages in thread
From: David Marchand @ 2019-12-12  8:27 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, Thomas Monjalon, Kinsella, Ray, Yigit, Ferruh, Luca Boccassi

Hello Bruce,

On Wed, Dec 11, 2019 at 4:16 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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.
>
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
>
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

There is an issue with the ethtool example.

  INSTALL-APP server
  INSTALL-MAP server.map
cat: /home/dmarchan/dpdk/examples/ethtool/lib/ABI_VERSION: No such
file or directory
  CC rte_ethtool.o
  LD librte_ethtool.so.0.
  INSTALL-LIB librte_ethtool.so.0.
gmake[3]: stat:
/home/dmarchan/builds/i686-native-linux-gcc+shared+debug+default/examples/ethtool/lib/i686-native-linux-gcc/lib/librte_ethtool.so.0.:
Too many levels of symbolic links
== ethtool-app


-- 
David Marchand


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-12  8:27   ` David Marchand
@ 2019-12-12  8:57     ` Ferruh Yigit
  2019-12-12 11:44       ` Bruce Richardson
  0 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-12-12  8:57 UTC (permalink / raw)
  To: David Marchand, Bruce Richardson
  Cc: dev, Thomas Monjalon, Kinsella, Ray, Luca Boccassi

On 12/12/2019 8:27 AM, David Marchand wrote:
> Hello Bruce,
> 
> On Wed, Dec 11, 2019 at 4:16 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
>>
>> 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.
>>
>> This patch fixes the issue by switching from 2-part to 3-part ABI version
>> numbers so that we can keep 20.0 as soname and using the final digits to
>> identify the 20.x releases which are ABI compatible. This requires changes
>> to both make and meson builds to handle the three-digit version and shrink
>> it to 2-digit for soname.
>>
>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>
>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> There is an issue with the ethtool example.
> 
>   INSTALL-APP server
>   INSTALL-MAP server.map
> cat: /home/dmarchan/dpdk/examples/ethtool/lib/ABI_VERSION: No such
> file or directory
>   CC rte_ethtool.o
>   LD librte_ethtool.so.0.
>   INSTALL-LIB librte_ethtool.so.0.
> gmake[3]: stat:
> /home/dmarchan/builds/i686-native-linux-gcc+shared+debug+default/examples/ethtool/lib/i686-native-linux-gcc/lib/librte_ethtool.so.0.:
> Too many levels of symbolic links
> == ethtool-app
> 
> 

It is linking against itself, in 'examples/ethtool/lib/build/lib':
librte_ethtool.so -> librte_ethtool.so.0.
librte_ethtool.so.0. -> librte_ethtool.so.0.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:19       ` Ferruh Yigit
@ 2019-12-12 11:07         ` Ray Kinsella
  0 siblings, 0 replies; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 11:07 UTC (permalink / raw)
  To: dev



On 11/12/2019 11:19, Ferruh Yigit wrote:
> On 12/11/2019 11:14 AM, Bruce Richardson wrote:
>> On Wed, Dec 11, 2019 at 12:08:25PM +0100, Thomas Monjalon wrote:
>>> 11/12/2019 12:04, Luca Boccassi:
>>>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
>>>>> 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.
>>>>>
>>>>> This patch fixes the issue by switching from 2-part to 3-part ABI
>>>>> version
>>>>> numbers so that we can keep 20.0 as soname and using the final digits
>>>>> to
>>>>> identify the 20.x releases which are ABI compatible. This requires
>>>>> changes
>>>>> to both make and meson builds to handle the three-digit version and
>>>>> shrink
>>>>> it to 2-digit for soname.
>>>>>
>>>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>>>
>>>>> Signed-off-by: Thomas Monjalon <
>>>>> thomas@monjalon.net
>>>>>>
>>>>> Signed-off-by: Bruce Richardson <
>>>>> bruce.richardson@intel.com
>>>>>>
>>>>> ---
>>>>>
>>>>> This patch contains an alternative fix to that implied by the
>>>>> previous patches:
>>>>> http://patches.dpdk.org/patch/63726/
>>>>>
>>>>> http://patches.dpdk.org/patch/63728/
>>>>>
>>>>>
>>>>> ---
>>>>>  ABI_VERSION         | 2 +-
>>>>>  drivers/meson.build | 4 ++--
>>>>>  lib/meson.build     | 4 ++--
>>>>>  mk/rte.lib.mk       | 5 ++++-
>>>>>  4 files changed, 9 insertions(+), 6 deletions(-)
>>>>
>>>> Acked-by: Luca Boccassi <bluca@debian.org>
>>>>
>>>> Thank you! I've set a reminder in my calendar for September to revert
>>>> it :-)
>>>
>>> I don't think we need to revert it.
>>> The ABI version will have only 2 numbers (21.0).
>>> In makefile there is no change.
>>> What needs to be changed in meson?
>>>
>> We need to remove the explicit use of so_version, and let meson just do the
>> right thing with the lib version. That being said, I can see about having
>> meson behave as make so that it will work even if we forget (i.e. even with
>> changed behaviour we should still remove the explicit soversion usage when
>> it's no longer needed).
>>
> 
> Current major become two digits, "20.0", I think we fix it to single digit,
> "21", again in 20.11.
> 
> I suggest adding this to deprecation notice document, with 20.11 target, so it
> can stay there and remind us the change.
> 
+1, we do.

So name, should be comprised of the library name and the major version only.

Ray K

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-11 11:11   ` Bruce Richardson
  2019-12-11 11:25     ` Ferruh Yigit
@ 2019-12-12 11:14     ` Ray Kinsella
  2019-12-12 13:58       ` Luca Boccassi
  1 sibling, 1 reply; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 11:14 UTC (permalink / raw)
  To: Bruce Richardson, Luca Boccassi; +Cc: dev, thomas, ray.kinsella, ferruh.yigit



On 11/12/2019 11:11, Bruce Richardson wrote:
> On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
>>> 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.
>>>
>>> This patch fixes the issue by switching from 2-part to 3-part ABI
>>> version
>>> numbers so that we can keep 20.0 as soname and using the final digits
>>> to
>>> identify the 20.x releases which are ABI compatible. This requires
>>> changes
>>> to both make and meson builds to handle the three-digit version and
>>> shrink
>>> it to 2-digit for soname.
>>>
>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>
>>> Signed-off-by: Thomas Monjalon <
>>> thomas@monjalon.net
>>>>
>>> Signed-off-by: Bruce Richardson <
>>> bruce.richardson@intel.com
>>>>
>>> ---
>>>
>>> This patch contains an alternative fix to that implied by the
>>> previous patches:
>>> http://patches.dpdk.org/patch/63726/
>>>
>>> http://patches.dpdk.org/patch/63728/
>>>
>>>
>>> ---
>>>  ABI_VERSION         | 2 +-
>>>  drivers/meson.build | 4 ++--
>>>  lib/meson.build     | 4 ++--
>>>  mk/rte.lib.mk       | 5 ++++-
>>>  4 files changed, 9 insertions(+), 6 deletions(-)
>>
>> Acked-by: Luca Boccassi <bluca@debian.org>
>>
>> Thank you! I've set a reminder in my calendar for September to revert
>> it :-)
>>
> Lol, don't forget to put another reminder to fix things properly then too.
> :-)
> 
> We also still need consensus in the community as to whether to take this
> approach or to do a re-spin of 19.11. At this point, I'm swayed by your
> arguments and think we should keep compatibility at the cost of a little
> pain and weirdness in our .so filenames.
> 
> /Bruce
>

My vote would be for a respin.
We don't yet know what challenges the weirdness or pain will be.
Why we would bother for the sake of a respin?

Ray K

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-12  8:57     ` Ferruh Yigit
@ 2019-12-12 11:44       ` Bruce Richardson
  2019-12-12 11:59         ` Bruce Richardson
  0 siblings, 1 reply; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 11:44 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: David Marchand, dev, Thomas Monjalon, Kinsella, Ray, Luca Boccassi

On Thu, Dec 12, 2019 at 08:57:50AM +0000, Ferruh Yigit wrote:
> On 12/12/2019 8:27 AM, David Marchand wrote:
> > Hello Bruce,
> > 
> > On Wed, Dec 11, 2019 at 4:16 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> >>
> >> 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.
> >>
> >> This patch fixes the issue by switching from 2-part to 3-part ABI version
> >> numbers so that we can keep 20.0 as soname and using the final digits to
> >> identify the 20.x releases which are ABI compatible. This requires changes
> >> to both make and meson builds to handle the three-digit version and shrink
> >> it to 2-digit for soname.
> >>
> >> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> >>
> >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > There is an issue with the ethtool example.
> > 
> >   INSTALL-APP server
> >   INSTALL-MAP server.map
> > cat: /home/dmarchan/dpdk/examples/ethtool/lib/ABI_VERSION: No such
> > file or directory
> >   CC rte_ethtool.o
> >   LD librte_ethtool.so.0.
> >   INSTALL-LIB librte_ethtool.so.0.
> > gmake[3]: stat:
> > /home/dmarchan/builds/i686-native-linux-gcc+shared+debug+default/examples/ethtool/lib/i686-native-linux-gcc/lib/librte_ethtool.so.0.:
> > Too many levels of symbolic links
> > == ethtool-app
> > 
> > 
> 
> It is linking against itself, in 'examples/ethtool/lib/build/lib':
> librte_ethtool.so -> librte_ethtool.so.0.
> librte_ethtool.so.0. -> librte_ethtool.so.0.

Yes. The issue is that this patch doesn't correct account for external libs
using their own version numbers. The trivial fix for this, which I'll add
in v3 is to make two small changes:

1. Use ?= rather than := when assigning to LIBABIVER in rte.lib.mk
2. Change the LIBABIVER in ethtool/lib to "1.0" rather than "1", since the
code assumes that we have more than a single digit in our version numbers.

Question: Do we need to officially support external libs using our build
system?

* If no (because we assume nobody uses it or otherwise), then we use the two
one-line fixes above and job done.
* If yes, then the makefile logic needs further work to support the case of
having an arbitrary version number. Also, we need to look into the whole
experimental detection logic, as that would probably not apply for external
libs.

/Bruce

PS: No need to ask this question for meson, as there is no assumption that
end user apps use any part of our build systems for their apps - it's
managed through pkg-config only.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-11 10:26 [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity Bruce Richardson
                   ` (2 preceding siblings ...)
  2019-12-11 15:16 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2019-12-12 11:58 ` Bruce Richardson
  2019-12-12 12:30   ` Ray Kinsella
                     ` (5 more replies)
  3 siblings, 6 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 11:58 UTC (permalink / raw)
  To: dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca, Bruce Richardson

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.

This patch fixes the issue by switching from 2-part to 3-part ABI version
numbers so that we can keep 20.0 as soname and using the final digits to
identify the 20.x releases which are ABI compatible. This requires changes
to both make and meson builds to handle the three-digit version and shrink
it to 2-digit for soname.

The final fix needed in this patch is to adjust the library version number
for the ethtool example library, which needs to be upped to 2-digits, as
external libraries using the DPDK build system also use the logic in this
file.

Fixes: cba806e07d6f ("build: change ABI versioning to global")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

V3:
* fixed issues with building ethtool example app.
V2:
* adjusted the meson version to work correctly with both 2-part and
  3-part ABI versions, so it will work correctly even with no changes
  for a 21.x ABI version number
* adjusted the versions of the experimental libs so that they are
  consistent between meson and make, and also consistent with v19.11

---
 ABI_VERSION                   |  2 +-
 config/meson.build            | 16 +++++++++++++---
 drivers/meson.build           |  4 ++--
 examples/ethtool/lib/Makefile |  2 +-
 lib/meson.build               |  4 ++--
 mk/rte.lib.mk                 | 13 ++++++++-----
 6 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/ABI_VERSION b/ABI_VERSION
index 2e73f8d2a..fcc01369a 100644
--- a/ABI_VERSION
+++ b/ABI_VERSION
@@ -1 +1 @@
-20.1
+20.0.1
diff --git a/config/meson.build b/config/meson.build
index 364a8d739..01911ecf9 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
 major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
 abi_version = run_command(find_program('cat', 'more'),
 	abi_version_file).stdout().strip()
-# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
-ever = abi_version.split('.')
-experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
+
+# Regular libraries have the abi_version as the filename extension
+# and have the soname be all but the final part of the abi_version.
+# Experimental libraries have soname with '0.major'
+# and the filename suffix as 0.majorminor versions,
+# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
+#    sonames => librte_stable.so.20, librte_experimental.so.0.20
+# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
+#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
+abi_va = abi_version.split('.')
+stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
+experimental_abi_version = '0.' + ''.join(abi_va)
+experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
 
 # extract all version information into the build configuration
 dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
diff --git a/drivers/meson.build b/drivers/meson.build
index 72eec4608..4b17662b7 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
+				so_version = experimental_so_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
+				so_version = stable_so_version
 			endif
 
 			# now build the static driver
diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
index 9da7dc3ba..649474127 100644
--- a/examples/ethtool/lib/Makefile
+++ b/examples/ethtool/lib/Makefile
@@ -18,7 +18,7 @@ endif
 # library name
 LIB = librte_ethtool.a
 
-LIBABIVER := 1
+LIBABIVER := 0.1
 
 # all source are stored in SRC-Y
 SRCS-y := rte_ethtool.c
diff --git a/lib/meson.build b/lib/meson.build
index 6ceb5e756..0af3efab2 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -113,10 +113,10 @@ foreach l:libraries
 
 			if is_experimental != 0
 				lib_version = experimental_abi_version
-				so_version = experimental_abi_version
+				so_version = experimental_so_version
 			else
 				lib_version = abi_version
-				so_version = abi_version
+				so_version = stable_so_version
 			endif
 
 			# first build static lib
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 655a1b143..b1a8372cc 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
 # VPATH contains at least SRCDIR
 VPATH += $(SRCDIR)
 
-ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
-LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
-else ifeq ($(LIBABIVER),)
+LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
+SOVER := $(basename $(LIBABIVER))
+ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
 # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
-LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
+LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
+SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
 endif
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+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


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:44       ` Bruce Richardson
@ 2019-12-12 11:59         ` Bruce Richardson
  2019-12-12 13:41           ` Thomas Monjalon
  0 siblings, 1 reply; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 11:59 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: David Marchand, dev, Thomas Monjalon, Kinsella, Ray, Luca Boccassi

On Thu, Dec 12, 2019 at 11:44:51AM +0000, Bruce Richardson wrote:
> On Thu, Dec 12, 2019 at 08:57:50AM +0000, Ferruh Yigit wrote:
> > On 12/12/2019 8:27 AM, David Marchand wrote:
> > > Hello Bruce,
> > > 
> > > On Wed, Dec 11, 2019 at 4:16 PM Bruce Richardson
> > > <bruce.richardson@intel.com> wrote:
> > >>
> > >> 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.
> > >>
> > >> This patch fixes the issue by switching from 2-part to 3-part ABI version
> > >> numbers so that we can keep 20.0 as soname and using the final digits to
> > >> identify the 20.x releases which are ABI compatible. This requires changes
> > >> to both make and meson builds to handle the three-digit version and shrink
> > >> it to 2-digit for soname.
> > >>
> > >> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > >>
> > >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > 
> > > There is an issue with the ethtool example.
> > > 
> > >   INSTALL-APP server
> > >   INSTALL-MAP server.map
> > > cat: /home/dmarchan/dpdk/examples/ethtool/lib/ABI_VERSION: No such
> > > file or directory
> > >   CC rte_ethtool.o
> > >   LD librte_ethtool.so.0.
> > >   INSTALL-LIB librte_ethtool.so.0.
> > > gmake[3]: stat:
> > > /home/dmarchan/builds/i686-native-linux-gcc+shared+debug+default/examples/ethtool/lib/i686-native-linux-gcc/lib/librte_ethtool.so.0.:
> > > Too many levels of symbolic links
> > > == ethtool-app
> > > 
> > > 
> > 
> > It is linking against itself, in 'examples/ethtool/lib/build/lib':
> > librte_ethtool.so -> librte_ethtool.so.0.
> > librte_ethtool.so.0. -> librte_ethtool.so.0.
> 
> Yes. The issue is that this patch doesn't correct account for external libs
> using their own version numbers. The trivial fix for this, which I'll add
> in v3 is to make two small changes:
> 
> 1. Use ?= rather than := when assigning to LIBABIVER in rte.lib.mk
> 2. Change the LIBABIVER in ethtool/lib to "1.0" rather than "1", since the
> code assumes that we have more than a single digit in our version numbers.
> 
> Question: Do we need to officially support external libs using our build
> system?
> 
> * If no (because we assume nobody uses it or otherwise), then we use the two
> one-line fixes above and job done.
> * If yes, then the makefile logic needs further work to support the case of
> having an arbitrary version number. Also, we need to look into the whole
> experimental detection logic, as that would probably not apply for external
> libs.
> 
> /Bruce
> 
Patch v3 now sent, on the assumption that the answer is "no", or the answer
is "yes, but we can fix that later" :-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
@ 2019-12-12 12:30   ` Ray Kinsella
  2019-12-12 13:02     ` Bruce Richardson
  2019-12-12 14:45   ` Ferruh Yigit
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 12:30 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca



On 12/12/2019 11:58, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
> 
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> 
> V3:
> * fixed issues with building ethtool example app.
> V2:
> * adjusted the meson version to work correctly with both 2-part and
>   3-part ABI versions, so it will work correctly even with no changes
>   for a 21.x ABI version number
> * adjusted the versions of the experimental libs so that they are
>   consistent between meson and make, and also consistent with v19.11
> 
> ---
>  ABI_VERSION                   |  2 +-
>  config/meson.build            | 16 +++++++++++++---
>  drivers/meson.build           |  4 ++--
>  examples/ethtool/lib/Makefile |  2 +-
>  lib/meson.build               |  4 ++--
>  mk/rte.lib.mk                 | 13 ++++++++-----
>  6 files changed, 27 insertions(+), 14 deletions(-)
> 
> diff --git a/ABI_VERSION b/ABI_VERSION
> index 2e73f8d2a..fcc01369a 100644
> --- a/ABI_VERSION
> +++ b/ABI_VERSION
> @@ -1 +1 @@
> -20.1
> +20.0.1
> diff --git a/config/meson.build b/config/meson.build
> index 364a8d739..01911ecf9 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
>  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>  abi_version = run_command(find_program('cat', 'more'),
>  	abi_version_file).stdout().strip()
> -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
> -ever = abi_version.split('.')
> -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
> +
> +# Regular libraries have the abi_version as the filename extension
> +# and have the soname be all but the final part of the abi_version.
> +# Experimental libraries have soname with '0.major'
> +# and the filename suffix as 0.majorminor versions,
> +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
> +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
> +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
> +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
> +abi_va = abi_version.split('.')
> +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
> +experimental_abi_version = '0.' + ''.join(abi_va)
> +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
>  
>  # extract all version information into the build configuration
>  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 72eec4608..4b17662b7 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# now build the static driver
> diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
> index 9da7dc3ba..649474127 100644
> --- a/examples/ethtool/lib/Makefile
> +++ b/examples/ethtool/lib/Makefile
> @@ -18,7 +18,7 @@ endif
>  # library name
>  LIB = librte_ethtool.a
>  
> -LIBABIVER := 1
> +LIBABIVER := 0.1
>  
>  # all source are stored in SRC-Y
>  SRCS-y := rte_ethtool.c
> diff --git a/lib/meson.build b/lib/meson.build
> index 6ceb5e756..0af3efab2 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -113,10 +113,10 @@ foreach l:libraries
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# first build static lib
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 655a1b143..b1a8372cc 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
>  # VPATH contains at least SRCDIR
>  VPATH += $(SRCDIR)
>  
> -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> -else ifeq ($(LIBABIVER),)
> +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> +SOVER := $(basename $(LIBABIVER))
> +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
>  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
> -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
> +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
> +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
>  endif
>  
>  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> +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
>  
>  #
> 

My input is still the same, I think a respin to fix v19.11 is preferable.
However this patch does fix the issue.

V19.11
[root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.0 | grep SONAME
11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.0]

HEAD
[root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.1 | grep SONAME
11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.1]

HEAD + FIX
[root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.0.1 | grep SONAME
11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.0]

Thanks,

Ray K

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 12:30   ` Ray Kinsella
@ 2019-12-12 13:02     ` Bruce Richardson
  2019-12-12 15:25       ` Ray Kinsella
  0 siblings, 1 reply; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 13:02 UTC (permalink / raw)
  To: Ray Kinsella; +Cc: dev, thomas, ray.kinsella, ferruh.yigit, bluca

On Thu, Dec 12, 2019 at 12:30:19PM +0000, Ray Kinsella wrote:
> 
> 
> On 12/12/2019 11:58, Bruce Richardson wrote:
> > 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.
> > 
> > This patch fixes the issue by switching from 2-part to 3-part ABI version
> > numbers so that we can keep 20.0 as soname and using the final digits to
> > identify the 20.x releases which are ABI compatible. This requires changes
> > to both make and meson builds to handle the three-digit version and shrink
> > it to 2-digit for soname.
> > 
> > The final fix needed in this patch is to adjust the library version number
> > for the ethtool example library, which needs to be upped to 2-digits, as
> > external libraries using the DPDK build system also use the logic in this
> > file.
> > 
> > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > 
> > V3:
> > * fixed issues with building ethtool example app.
> > V2:
> > * adjusted the meson version to work correctly with both 2-part and
> >   3-part ABI versions, so it will work correctly even with no changes
> >   for a 21.x ABI version number
> > * adjusted the versions of the experimental libs so that they are
> >   consistent between meson and make, and also consistent with v19.11
> > 
> > ---
> >  ABI_VERSION                   |  2 +-
> >  config/meson.build            | 16 +++++++++++++---
> >  drivers/meson.build           |  4 ++--
> >  examples/ethtool/lib/Makefile |  2 +-
> >  lib/meson.build               |  4 ++--
> >  mk/rte.lib.mk                 | 13 ++++++++-----
> >  6 files changed, 27 insertions(+), 14 deletions(-)
> > 
> > diff --git a/ABI_VERSION b/ABI_VERSION
> > index 2e73f8d2a..fcc01369a 100644
> > --- a/ABI_VERSION
> > +++ b/ABI_VERSION
> > @@ -1 +1 @@
> > -20.1
> > +20.0.1
> > diff --git a/config/meson.build b/config/meson.build
> > index 364a8d739..01911ecf9 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
> >  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
> >  abi_version = run_command(find_program('cat', 'more'),
> >  	abi_version_file).stdout().strip()
> > -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
> > -ever = abi_version.split('.')
> > -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
> > +
> > +# Regular libraries have the abi_version as the filename extension
> > +# and have the soname be all but the final part of the abi_version.
> > +# Experimental libraries have soname with '0.major'
> > +# and the filename suffix as 0.majorminor versions,
> > +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
> > +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
> > +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
> > +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
> > +abi_va = abi_version.split('.')
> > +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
> > +experimental_abi_version = '0.' + ''.join(abi_va)
> > +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
> >  
> >  # extract all version information into the build configuration
> >  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
> > diff --git a/drivers/meson.build b/drivers/meson.build
> > index 72eec4608..4b17662b7 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
> >  
> >  			if is_experimental != 0
> >  				lib_version = experimental_abi_version
> > -				so_version = experimental_abi_version
> > +				so_version = experimental_so_version
> >  			else
> >  				lib_version = abi_version
> > -				so_version = abi_version
> > +				so_version = stable_so_version
> >  			endif
> >  
> >  			# now build the static driver
> > diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
> > index 9da7dc3ba..649474127 100644
> > --- a/examples/ethtool/lib/Makefile
> > +++ b/examples/ethtool/lib/Makefile
> > @@ -18,7 +18,7 @@ endif
> >  # library name
> >  LIB = librte_ethtool.a
> >  
> > -LIBABIVER := 1
> > +LIBABIVER := 0.1
> >  
> >  # all source are stored in SRC-Y
> >  SRCS-y := rte_ethtool.c
> > diff --git a/lib/meson.build b/lib/meson.build
> > index 6ceb5e756..0af3efab2 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -113,10 +113,10 @@ foreach l:libraries
> >  
> >  			if is_experimental != 0
> >  				lib_version = experimental_abi_version
> > -				so_version = experimental_abi_version
> > +				so_version = experimental_so_version
> >  			else
> >  				lib_version = abi_version
> > -				so_version = abi_version
> > +				so_version = stable_so_version
> >  			endif
> >  
> >  			# first build static lib
> > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> > index 655a1b143..b1a8372cc 100644
> > --- a/mk/rte.lib.mk
> > +++ b/mk/rte.lib.mk
> > @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
> >  # VPATH contains at least SRCDIR
> >  VPATH += $(SRCDIR)
> >  
> > -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> > -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> > -else ifeq ($(LIBABIVER),)
> > +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> > +SOVER := $(basename $(LIBABIVER))
> > +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> >  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
> > -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
> > +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
> > +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
> >  endif
> >  
> >  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> > +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
> >  
> >  #
> > 
> 
> My input is still the same, I think a respin to fix v19.11 is preferable.
> However this patch does fix the issue.
> 
> V19.11
> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.0 | grep SONAME
> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.0]
> 
> HEAD
> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.1 | grep SONAME
> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.1]
> 

Just FYI, a better test than this should be to check ABI version 21.0,
which will be used for 20.11. Version 20.1 is not going to be used in a
production release if we take this fix.

/Bruce

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v2] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:59         ` Bruce Richardson
@ 2019-12-12 13:41           ` Thomas Monjalon
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Monjalon @ 2019-12-12 13:41 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Ferruh Yigit, David Marchand, dev, Kinsella, Ray, Luca Boccassi

12/12/2019 12:59, Bruce Richardson:
> On Thu, Dec 12, 2019 at 11:44:51AM +0000, Bruce Richardson wrote:
> > On Thu, Dec 12, 2019 at 08:57:50AM +0000, Ferruh Yigit wrote:
> > > On 12/12/2019 8:27 AM, David Marchand wrote:
> > > > Hello Bruce,
> > > > 
> > > > On Wed, Dec 11, 2019 at 4:16 PM Bruce Richardson
> > > > <bruce.richardson@intel.com> wrote:
> > > >>
> > > >> 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.
> > > >>
> > > >> This patch fixes the issue by switching from 2-part to 3-part ABI version
> > > >> numbers so that we can keep 20.0 as soname and using the final digits to
> > > >> identify the 20.x releases which are ABI compatible. This requires changes
> > > >> to both make and meson builds to handle the three-digit version and shrink
> > > >> it to 2-digit for soname.
> > > >>
> > > >> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > > >>
> > > >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > > 
> > > > There is an issue with the ethtool example.
> > > > 
> > > >   INSTALL-APP server
> > > >   INSTALL-MAP server.map
> > > > cat: /home/dmarchan/dpdk/examples/ethtool/lib/ABI_VERSION: No such
> > > > file or directory
> > > >   CC rte_ethtool.o
> > > >   LD librte_ethtool.so.0.
> > > >   INSTALL-LIB librte_ethtool.so.0.
> > > > gmake[3]: stat:
> > > > /home/dmarchan/builds/i686-native-linux-gcc+shared+debug+default/examples/ethtool/lib/i686-native-linux-gcc/lib/librte_ethtool.so.0.:
> > > > Too many levels of symbolic links
> > > > == ethtool-app
> > > > 
> > > > 
> > > 
> > > It is linking against itself, in 'examples/ethtool/lib/build/lib':
> > > librte_ethtool.so -> librte_ethtool.so.0.
> > > librte_ethtool.so.0. -> librte_ethtool.so.0.
> > 
> > Yes. The issue is that this patch doesn't correct account for external libs
> > using their own version numbers. The trivial fix for this, which I'll add
> > in v3 is to make two small changes:
> > 
> > 1. Use ?= rather than := when assigning to LIBABIVER in rte.lib.mk
> > 2. Change the LIBABIVER in ethtool/lib to "1.0" rather than "1", since the
> > code assumes that we have more than a single digit in our version numbers.
> > 
> > Question: Do we need to officially support external libs using our build
> > system?
> > 
> > * If no (because we assume nobody uses it or otherwise), then we use the two
> > one-line fixes above and job done.
> > * If yes, then the makefile logic needs further work to support the case of
> > having an arbitrary version number. Also, we need to look into the whole
> > experimental detection logic, as that would probably not apply for external
> > libs.
> > 
> > /Bruce
> > 
> Patch v3 now sent, on the assumption that the answer is "no", or the answer
> is "yes, but we can fix that later" :-)

Yes, that's reasonnable.



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:14     ` Ray Kinsella
@ 2019-12-12 13:58       ` Luca Boccassi
  2019-12-12 14:05         ` Ray Kinsella
  0 siblings, 1 reply; 31+ messages in thread
From: Luca Boccassi @ 2019-12-12 13:58 UTC (permalink / raw)
  To: Ray Kinsella, Bruce Richardson; +Cc: dev, thomas, ray.kinsella, ferruh.yigit

On Thu, 2019-12-12 at 11:14 +0000, Ray Kinsella wrote:
> 
> On 11/12/2019 11:11, Bruce Richardson wrote:
> > On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
> > > On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> > > > 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.
> > > > 
> > > > This patch fixes the issue by switching from 2-part to 3-part
> > > > ABI
> > > > version
> > > > numbers so that we can keep 20.0 as soname and using the final
> > > > digits
> > > > to
> > > > identify the 20.x releases which are ABI compatible. This
> > > > requires
> > > > changes
> > > > to both make and meson builds to handle the three-digit version
> > > > and
> > > > shrink
> > > > it to 2-digit for soname.
> > > > 
> > > > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> > > > 
> > > > Signed-off-by: Thomas Monjalon <
> > > > thomas@monjalon.net
> > > > 
> > > > 
> > > > Signed-off-by: Bruce Richardson <
> > > > bruce.richardson@intel.com
> > > > 
> > > > 
> > > > ---
> > > > 
> > > > This patch contains an alternative fix to that implied by the
> > > > previous patches:
> > > > http://patches.dpdk.org/patch/63726/
> > > > 
> > > > 
> > > > http://patches.dpdk.org/patch/63728/
> > > > 
> > > > 
> > > > 
> > > > ---
> > > >  ABI_VERSION         | 2 +-
> > > >  drivers/meson.build | 4 ++--
> > > >  lib/meson.build     | 4 ++--
> > > >  mk/rte.lib.mk       | 5 ++++-
> > > >  4 files changed, 9 insertions(+), 6 deletions(-)
> > > 
> > > Acked-by: Luca Boccassi <
> > > bluca@debian.org
> > > >
> > > 
> > > Thank you! I've set a reminder in my calendar for September to
> > > revert
> > > it :-)
> > > 
> > 
> > Lol, don't forget to put another reminder to fix things properly
> > then too.
> > :-)
> > 
> > We also still need consensus in the community as to whether to take
> > this
> > approach or to do a re-spin of 19.11. At this point, I'm swayed by
> > your
> > arguments and think we should keep compatibility at the cost of a
> > little
> > pain and weirdness in our .so filenames.
> > 
> > /Bruce
> > 
> 
> My vote would be for a respin.
> We don't yet know what challenges the weirdness or pain will be.
> Why we would bother for the sake of a respin?
> 
> Ray K

We already uploaded 19.11 to Debian last week, which means the tarball
is in the archive and it's hashsummed and signed:

http://deb.debian.org/debian/pool/main/d/dpdk/dpdk_19.11.orig.tar.xz

(it's in experimental, but the archive is the same)

A respin at this point would make my life not impossible, but quite
difficult.

IMHO respins are acceptable within a few hours - two weeks later it's
no longer a respin, it's a new version :-)

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-12 13:58       ` Luca Boccassi
@ 2019-12-12 14:05         ` Ray Kinsella
  2019-12-12 15:08           ` Bruce Richardson
  0 siblings, 1 reply; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 14:05 UTC (permalink / raw)
  To: Luca Boccassi, Bruce Richardson; +Cc: dev, thomas, ray.kinsella, ferruh.yigit



On 12/12/2019 13:58, Luca Boccassi wrote:
> On Thu, 2019-12-12 at 11:14 +0000, Ray Kinsella wrote:
>>
>> On 11/12/2019 11:11, Bruce Richardson wrote:
>>> On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
>>>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
>>>>> 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.
>>>>>
>>>>> This patch fixes the issue by switching from 2-part to 3-part
>>>>> ABI
>>>>> version
>>>>> numbers so that we can keep 20.0 as soname and using the final
>>>>> digits
>>>>> to
>>>>> identify the 20.x releases which are ABI compatible. This
>>>>> requires
>>>>> changes
>>>>> to both make and meson builds to handle the three-digit version
>>>>> and
>>>>> shrink
>>>>> it to 2-digit for soname.
>>>>>
>>>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>>>
>>>>> Signed-off-by: Thomas Monjalon <
>>>>> thomas@monjalon.net
>>>>>
>>>>>
>>>>> Signed-off-by: Bruce Richardson <
>>>>> bruce.richardson@intel.com
>>>>>
>>>>>
>>>>> ---
>>>>>
>>>>> This patch contains an alternative fix to that implied by the
>>>>> previous patches:
>>>>> http://patches.dpdk.org/patch/63726/
>>>>>
>>>>>
>>>>> http://patches.dpdk.org/patch/63728/
>>>>>
>>>>>
>>>>>
>>>>> ---
>>>>>  ABI_VERSION         | 2 +-
>>>>>  drivers/meson.build | 4 ++--
>>>>>  lib/meson.build     | 4 ++--
>>>>>  mk/rte.lib.mk       | 5 ++++-
>>>>>  4 files changed, 9 insertions(+), 6 deletions(-)
>>>>
>>>> Acked-by: Luca Boccassi <
>>>> bluca@debian.org
>>>>>
>>>>
>>>> Thank you! I've set a reminder in my calendar for September to
>>>> revert
>>>> it :-)
>>>>
>>>
>>> Lol, don't forget to put another reminder to fix things properly
>>> then too.
>>> :-)
>>>
>>> We also still need consensus in the community as to whether to take
>>> this
>>> approach or to do a re-spin of 19.11. At this point, I'm swayed by
>>> your
>>> arguments and think we should keep compatibility at the cost of a
>>> little
>>> pain and weirdness in our .so filenames.
>>>
>>> /Bruce
>>>
>>
>> My vote would be for a respin.
>> We don't yet know what challenges the weirdness or pain will be.
>> Why we would bother for the sake of a respin?
>>
>> Ray K
> 
> We already uploaded 19.11 to Debian last week, which means the tarball
> is in the archive and it's hashsummed and signed:
> 
> http://deb.debian.org/debian/pool/main/d/dpdk/dpdk_19.11.orig.tar.xz
> 
> (it's in experimental, but the archive is the same)
> 
> A respin at this point would make my life not impossible, but quite
> difficult.
> 
> IMHO respins are acceptable within a few hours - two weeks later it's
> no longer a respin, it's a new version :-)
> 

Understood, we are stretching the acceptable terms of a re-spin.

If the version that is in the archive fundamentally broken, what are you going to do.
This is not a relatively easy circumstance that we can simply fix it with an apt-get update.

Is there precedent for pulling and re-releasing something that is broken in this way?

Ray K

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
  2019-12-12 12:30   ` Ray Kinsella
@ 2019-12-12 14:45   ` Ferruh Yigit
  2019-12-12 16:34   ` Ray Kinsella
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-12-12 14:45 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, bluca

On 12/12/2019 11:58 AM, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
> 
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity
  2019-12-12 14:05         ` Ray Kinsella
@ 2019-12-12 15:08           ` Bruce Richardson
  0 siblings, 0 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 15:08 UTC (permalink / raw)
  To: Ray Kinsella; +Cc: Luca Boccassi, dev, thomas, ray.kinsella, ferruh.yigit

On Thu, Dec 12, 2019 at 02:05:44PM +0000, Ray Kinsella wrote:
> 
> 
> On 12/12/2019 13:58, Luca Boccassi wrote:
> > On Thu, 2019-12-12 at 11:14 +0000, Ray Kinsella wrote:
> >>
> >> On 11/12/2019 11:11, Bruce Richardson wrote:
> >>> On Wed, Dec 11, 2019 at 11:04:01AM +0000, Luca Boccassi wrote:
> >>>> On Wed, 2019-12-11 at 10:26 +0000, Bruce Richardson wrote:
> >>>>> 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.
> >>>>>
> >>>>> This patch fixes the issue by switching from 2-part to 3-part
> >>>>> ABI
> >>>>> version
> >>>>> numbers so that we can keep 20.0 as soname and using the final
> >>>>> digits
> >>>>> to
> >>>>> identify the 20.x releases which are ABI compatible. This
> >>>>> requires
> >>>>> changes
> >>>>> to both make and meson builds to handle the three-digit version
> >>>>> and
> >>>>> shrink
> >>>>> it to 2-digit for soname.
> >>>>>
> >>>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> >>>>>
> >>>>> Signed-off-by: Thomas Monjalon <
> >>>>> thomas@monjalon.net
> >>>>>
> >>>>>
> >>>>> Signed-off-by: Bruce Richardson <
> >>>>> bruce.richardson@intel.com
> >>>>>
> >>>>>
> >>>>> ---
> >>>>>
> >>>>> This patch contains an alternative fix to that implied by the
> >>>>> previous patches:
> >>>>> http://patches.dpdk.org/patch/63726/
> >>>>>
> >>>>>
> >>>>> http://patches.dpdk.org/patch/63728/
> >>>>>
> >>>>>
> >>>>>
> >>>>> ---
> >>>>>  ABI_VERSION         | 2 +-
> >>>>>  drivers/meson.build | 4 ++--
> >>>>>  lib/meson.build     | 4 ++--
> >>>>>  mk/rte.lib.mk       | 5 ++++-
> >>>>>  4 files changed, 9 insertions(+), 6 deletions(-)
> >>>>
> >>>> Acked-by: Luca Boccassi <
> >>>> bluca@debian.org
> >>>>>
> >>>>
> >>>> Thank you! I've set a reminder in my calendar for September to
> >>>> revert
> >>>> it :-)
> >>>>
> >>>
> >>> Lol, don't forget to put another reminder to fix things properly
> >>> then too.
> >>> :-)
> >>>
> >>> We also still need consensus in the community as to whether to take
> >>> this
> >>> approach or to do a re-spin of 19.11. At this point, I'm swayed by
> >>> your
> >>> arguments and think we should keep compatibility at the cost of a
> >>> little
> >>> pain and weirdness in our .so filenames.
> >>>
> >>> /Bruce
> >>>
> >>
> >> My vote would be for a respin.
> >> We don't yet know what challenges the weirdness or pain will be.
> >> Why we would bother for the sake of a respin?
> >>
> >> Ray K
> > 
> > We already uploaded 19.11 to Debian last week, which means the tarball
> > is in the archive and it's hashsummed and signed:
> > 
> > http://deb.debian.org/debian/pool/main/d/dpdk/dpdk_19.11.orig.tar.xz
> > 
> > (it's in experimental, but the archive is the same)
> > 
> > A respin at this point would make my life not impossible, but quite
> > difficult.
> > 
> > IMHO respins are acceptable within a few hours - two weeks later it's
> > no longer a respin, it's a new version :-)
> > 
> 
> Understood, we are stretching the acceptable terms of a re-spin.
> 
> If the version that is in the archive fundamentally broken, what are you going to do.
> This is not a relatively easy circumstance that we can simply fix it with an apt-get update.
> 
> Is there precedent for pulling and re-releasing something that is broken in this way?
> 
The thing is that our existing package is not fundamentally broken, it just
has a wrong ABI version, which we can work around with a non-massive
amount of work. Given we have a fix that avoids any respinning, I see no
reason not just to go with it, and keep our ABI compatibility promise.

And I, too, have already uploaded a new build recipe, including package
checksums, to the FreeBSD ports collection. Respinning would be awkward
there too.

/Bruce

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 13:02     ` Bruce Richardson
@ 2019-12-12 15:25       ` Ray Kinsella
  2019-12-12 15:34         ` Bruce Richardson
  0 siblings, 1 reply; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 15:25 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, thomas, ray.kinsella, ferruh.yigit, bluca



On 12/12/2019 13:02, Bruce Richardson wrote:
> On Thu, Dec 12, 2019 at 12:30:19PM +0000, Ray Kinsella wrote:
>>
>>
>> On 12/12/2019 11:58, Bruce Richardson wrote:
>>> 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.
>>>
>>> This patch fixes the issue by switching from 2-part to 3-part ABI version
>>> numbers so that we can keep 20.0 as soname and using the final digits to
>>> identify the 20.x releases which are ABI compatible. This requires changes
>>> to both make and meson builds to handle the three-digit version and shrink
>>> it to 2-digit for soname.
>>>
>>> The final fix needed in this patch is to adjust the library version number
>>> for the ethtool example library, which needs to be upped to 2-digits, as
>>> external libraries using the DPDK build system also use the logic in this
>>> file.
>>>
>>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>>>
>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>>> ---
>>>
>>> V3:
>>> * fixed issues with building ethtool example app.
>>> V2:
>>> * adjusted the meson version to work correctly with both 2-part and
>>>   3-part ABI versions, so it will work correctly even with no changes
>>>   for a 21.x ABI version number
>>> * adjusted the versions of the experimental libs so that they are
>>>   consistent between meson and make, and also consistent with v19.11
>>>
>>> ---
>>>  ABI_VERSION                   |  2 +-
>>>  config/meson.build            | 16 +++++++++++++---
>>>  drivers/meson.build           |  4 ++--
>>>  examples/ethtool/lib/Makefile |  2 +-
>>>  lib/meson.build               |  4 ++--
>>>  mk/rte.lib.mk                 | 13 ++++++++-----
>>>  6 files changed, 27 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/ABI_VERSION b/ABI_VERSION
>>> index 2e73f8d2a..fcc01369a 100644
>>> --- a/ABI_VERSION
>>> +++ b/ABI_VERSION
>>> @@ -1 +1 @@
>>> -20.1
>>> +20.0.1
>>> diff --git a/config/meson.build b/config/meson.build
>>> index 364a8d739..01911ecf9 100644
>>> --- a/config/meson.build
>>> +++ b/config/meson.build
>>> @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
>>>  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>>>  abi_version = run_command(find_program('cat', 'more'),
>>>  	abi_version_file).stdout().strip()
>>> -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
>>> -ever = abi_version.split('.')
>>> -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
>>> +
>>> +# Regular libraries have the abi_version as the filename extension
>>> +# and have the soname be all but the final part of the abi_version.
>>> +# Experimental libraries have soname with '0.major'
>>> +# and the filename suffix as 0.majorminor versions,
>>> +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
>>> +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
>>> +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
>>> +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
>>> +abi_va = abi_version.split('.')
>>> +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
>>> +experimental_abi_version = '0.' + ''.join(abi_va)
>>> +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
>>>  
>>>  # extract all version information into the build configuration
>>>  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
>>> diff --git a/drivers/meson.build b/drivers/meson.build
>>> index 72eec4608..4b17662b7 100644
>>> --- a/drivers/meson.build
>>> +++ b/drivers/meson.build
>>> @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
>>>  
>>>  			if is_experimental != 0
>>>  				lib_version = experimental_abi_version
>>> -				so_version = experimental_abi_version
>>> +				so_version = experimental_so_version
>>>  			else
>>>  				lib_version = abi_version
>>> -				so_version = abi_version
>>> +				so_version = stable_so_version
>>>  			endif
>>>  
>>>  			# now build the static driver
>>> diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
>>> index 9da7dc3ba..649474127 100644
>>> --- a/examples/ethtool/lib/Makefile
>>> +++ b/examples/ethtool/lib/Makefile
>>> @@ -18,7 +18,7 @@ endif
>>>  # library name
>>>  LIB = librte_ethtool.a
>>>  
>>> -LIBABIVER := 1
>>> +LIBABIVER := 0.1
>>>  
>>>  # all source are stored in SRC-Y
>>>  SRCS-y := rte_ethtool.c
>>> diff --git a/lib/meson.build b/lib/meson.build
>>> index 6ceb5e756..0af3efab2 100644
>>> --- a/lib/meson.build
>>> +++ b/lib/meson.build
>>> @@ -113,10 +113,10 @@ foreach l:libraries
>>>  
>>>  			if is_experimental != 0
>>>  				lib_version = experimental_abi_version
>>> -				so_version = experimental_abi_version
>>> +				so_version = experimental_so_version
>>>  			else
>>>  				lib_version = abi_version
>>> -				so_version = abi_version
>>> +				so_version = stable_so_version
>>>  			endif
>>>  
>>>  			# first build static lib
>>> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
>>> index 655a1b143..b1a8372cc 100644
>>> --- a/mk/rte.lib.mk
>>> +++ b/mk/rte.lib.mk
>>> @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
>>>  # VPATH contains at least SRCDIR
>>>  VPATH += $(SRCDIR)
>>>  
>>> -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
>>> -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
>>> -else ifeq ($(LIBABIVER),)
>>> +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
>>> +SOVER := $(basename $(LIBABIVER))
>>> +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
>>>  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
>>> -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
>>> +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
>>> +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
>>>  endif
>>>  
>>>  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
>>> +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
>>>  
>>>  #
>>>
>>
>> My input is still the same, I think a respin to fix v19.11 is preferable.
>> However this patch does fix the issue.
>>
>> V19.11
>> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.0 | grep SONAME
>> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.0]
>>
>> HEAD
>> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.1 | grep SONAME
>> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.1]
>>
> 
> Just FYI, a better test than this should be to check ABI version 21.0,
> which will be used for 20.11. 
> Version 20.1 is not going to be used in a
> production release if we take this fix.

I don't follow this point?

> 
> /Bruce
> 

Building DPDK v19.11 TestPMD, and tried to run it against the HEAD shared Libs.

[root@silpixa00396680 build.head]# ldd app/dpdk-testpmd.v19.11
        linux-vdso.so.1 (0x00007ffcf828c000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f9aad937000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f9aad930000)
        libnuma.so.1 => /lib64/libnuma.so.1 (0x00007f9aad922000)
        librte_ethdev.so.20.0 => not found
        librte_eal.so.20.0 => not found
        librte_kvargs.so.20.0 => not found
        librte_net.so.20.0 => not found
        librte_mbuf.so.20.0 => not found
        librte_mempool.so.20.0 => not found
        librte_ring.so.20.0 => not found
        librte_meter.so.20.0 => not found


After applying the fix ...

[root@silpixa00396680 build.head]# ldd app/dpdk-testpmd.v19.11
        linux-vdso.so.1 (0x00007ffc0e5c0000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f656ef9f000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f656ef98000)
        libnuma.so.1 => /lib64/libnuma.so.1 (0x00007f656ef8a000)
        librte_ethdev.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_ethdev.so.20.0 (0x00007f656eee6000)
        librte_eal.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_eal.so.20.0 (0x00007f656ee02000)
        librte_kvargs.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_kvargs.so.20.0 (0x00007f656edfd000)
        librte_net.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_net.so.20.0 (0x00007f656edf4000)
        librte_mbuf.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_mbuf.so.20.0 (0x00007f656ede8000)
        librte_mempool.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_mempool.so.20.0 (0x00007f656eddf000)
        librte_ring.so.20.0 => /root/src/dpdk/build.head/app/../lib/librte_ring.so.20.0 (0x00007f656edda000)

I updated ABI_VERSION to 20.0.2 etc, and all was still OK.

Ray K



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 15:25       ` Ray Kinsella
@ 2019-12-12 15:34         ` Bruce Richardson
  0 siblings, 0 replies; 31+ messages in thread
From: Bruce Richardson @ 2019-12-12 15:34 UTC (permalink / raw)
  To: Ray Kinsella; +Cc: dev, thomas, ray.kinsella, ferruh.yigit, bluca

On Thu, Dec 12, 2019 at 03:25:12PM +0000, Ray Kinsella wrote:
> 
> 
> On 12/12/2019 13:02, Bruce Richardson wrote:
> > On Thu, Dec 12, 2019 at 12:30:19PM +0000, Ray Kinsella wrote:
> >>
> >>
> >> On 12/12/2019 11:58, Bruce Richardson wrote:
> >>> 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.
> >>>
> >>> This patch fixes the issue by switching from 2-part to 3-part ABI version
> >>> numbers so that we can keep 20.0 as soname and using the final digits to
> >>> identify the 20.x releases which are ABI compatible. This requires changes
> >>> to both make and meson builds to handle the three-digit version and shrink
> >>> it to 2-digit for soname.
> >>>
> >>> The final fix needed in this patch is to adjust the library version number
> >>> for the ethtool example library, which needs to be upped to 2-digits, as
> >>> external libraries using the DPDK build system also use the logic in this
> >>> file.
> >>>
> >>> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> >>>
> >>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> >>> ---
> >>>
> >>> V3:
> >>> * fixed issues with building ethtool example app.
> >>> V2:
> >>> * adjusted the meson version to work correctly with both 2-part and
> >>>   3-part ABI versions, so it will work correctly even with no changes
> >>>   for a 21.x ABI version number
> >>> * adjusted the versions of the experimental libs so that they are
> >>>   consistent between meson and make, and also consistent with v19.11
> >>>
> >>> ---
> >>>  ABI_VERSION                   |  2 +-
> >>>  config/meson.build            | 16 +++++++++++++---
> >>>  drivers/meson.build           |  4 ++--
> >>>  examples/ethtool/lib/Makefile |  2 +-
> >>>  lib/meson.build               |  4 ++--
> >>>  mk/rte.lib.mk                 | 13 ++++++++-----
> >>>  6 files changed, 27 insertions(+), 14 deletions(-)
> >>>
> >>> diff --git a/ABI_VERSION b/ABI_VERSION
> >>> index 2e73f8d2a..fcc01369a 100644
> >>> --- a/ABI_VERSION
> >>> +++ b/ABI_VERSION
> >>> @@ -1 +1 @@
> >>> -20.1
> >>> +20.0.1
> >>> diff --git a/config/meson.build b/config/meson.build
> >>> index 364a8d739..01911ecf9 100644
> >>> --- a/config/meson.build
> >>> +++ b/config/meson.build
> >>> @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
> >>>  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
> >>>  abi_version = run_command(find_program('cat', 'more'),
> >>>  	abi_version_file).stdout().strip()
> >>> -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
> >>> -ever = abi_version.split('.')
> >>> -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
> >>> +
> >>> +# Regular libraries have the abi_version as the filename extension
> >>> +# and have the soname be all but the final part of the abi_version.
> >>> +# Experimental libraries have soname with '0.major'
> >>> +# and the filename suffix as 0.majorminor versions,
> >>> +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
> >>> +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
> >>> +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
> >>> +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
> >>> +abi_va = abi_version.split('.')
> >>> +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
> >>> +experimental_abi_version = '0.' + ''.join(abi_va)
> >>> +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
> >>>  
> >>>  # extract all version information into the build configuration
> >>>  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
> >>> diff --git a/drivers/meson.build b/drivers/meson.build
> >>> index 72eec4608..4b17662b7 100644
> >>> --- a/drivers/meson.build
> >>> +++ b/drivers/meson.build
> >>> @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
> >>>  
> >>>  			if is_experimental != 0
> >>>  				lib_version = experimental_abi_version
> >>> -				so_version = experimental_abi_version
> >>> +				so_version = experimental_so_version
> >>>  			else
> >>>  				lib_version = abi_version
> >>> -				so_version = abi_version
> >>> +				so_version = stable_so_version
> >>>  			endif
> >>>  
> >>>  			# now build the static driver
> >>> diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
> >>> index 9da7dc3ba..649474127 100644
> >>> --- a/examples/ethtool/lib/Makefile
> >>> +++ b/examples/ethtool/lib/Makefile
> >>> @@ -18,7 +18,7 @@ endif
> >>>  # library name
> >>>  LIB = librte_ethtool.a
> >>>  
> >>> -LIBABIVER := 1
> >>> +LIBABIVER := 0.1
> >>>  
> >>>  # all source are stored in SRC-Y
> >>>  SRCS-y := rte_ethtool.c
> >>> diff --git a/lib/meson.build b/lib/meson.build
> >>> index 6ceb5e756..0af3efab2 100644
> >>> --- a/lib/meson.build
> >>> +++ b/lib/meson.build
> >>> @@ -113,10 +113,10 @@ foreach l:libraries
> >>>  
> >>>  			if is_experimental != 0
> >>>  				lib_version = experimental_abi_version
> >>> -				so_version = experimental_abi_version
> >>> +				so_version = experimental_so_version
> >>>  			else
> >>>  				lib_version = abi_version
> >>> -				so_version = abi_version
> >>> +				so_version = stable_so_version
> >>>  			endif
> >>>  
> >>>  			# first build static lib
> >>> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> >>> index 655a1b143..b1a8372cc 100644
> >>> --- a/mk/rte.lib.mk
> >>> +++ b/mk/rte.lib.mk
> >>> @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
> >>>  # VPATH contains at least SRCDIR
> >>>  VPATH += $(SRCDIR)
> >>>  
> >>> -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> >>> -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> >>> -else ifeq ($(LIBABIVER),)
> >>> +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> >>> +SOVER := $(basename $(LIBABIVER))
> >>> +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> >>>  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
> >>> -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
> >>> +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
> >>> +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
> >>>  endif
> >>>  
> >>>  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> >>> +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
> >>>  
> >>>  #
> >>>
> >>
> >> My input is still the same, I think a respin to fix v19.11 is preferable.
> >> However this patch does fix the issue.
> >>
> >> V19.11
> >> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.0 | grep SONAME
> >> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.0]
> >>
> >> HEAD
> >> [root@silpixa00396680 build]# readelf -d ./lib/librte_eal.so.20.1 | grep SONAME
> >> 11: 0x000000000000000e (SONAME)             Library soname: [librte_eal.so.20.1]
> >>
> > 
> > Just FYI, a better test than this should be to check ABI version 21.0,
> > which will be used for 20.11. 
> > Version 20.1 is not going to be used in a
> > production release if we take this fix.
> 
> I don't follow this point?
> 
Reading back, I can see why, I completely missed what you were saying. My
bad, sorry!

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
  2019-12-12 12:30   ` Ray Kinsella
  2019-12-12 14:45   ` Ferruh Yigit
@ 2019-12-12 16:34   ` Ray Kinsella
  2019-12-13 11:38   ` Neil Horman
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 31+ messages in thread
From: Ray Kinsella @ 2019-12-12 16:34 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca



On 12/12/2019 11:58, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
> 
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> 
> V3:
> * fixed issues with building ethtool example app.
> V2:
> * adjusted the meson version to work correctly with both 2-part and
>   3-part ABI versions, so it will work correctly even with no changes
>   for a 21.x ABI version number
> * adjusted the versions of the experimental libs so that they are
>   consistent between meson and make, and also consistent with v19.11
> 
> ---
>  ABI_VERSION                   |  2 +-
>  config/meson.build            | 16 +++++++++++++---
>  drivers/meson.build           |  4 ++--
>  examples/ethtool/lib/Makefile |  2 +-
>  lib/meson.build               |  4 ++--
>  mk/rte.lib.mk                 | 13 ++++++++-----
>  6 files changed, 27 insertions(+), 14 deletions(-)
> 
> diff --git a/ABI_VERSION b/ABI_VERSION
> index 2e73f8d2a..fcc01369a 100644
> --- a/ABI_VERSION
> +++ b/ABI_VERSION
> @@ -1 +1 @@
> -20.1
> +20.0.1
> diff --git a/config/meson.build b/config/meson.build
> index 364a8d739..01911ecf9 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
>  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>  abi_version = run_command(find_program('cat', 'more'),
>  	abi_version_file).stdout().strip()
> -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
> -ever = abi_version.split('.')
> -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
> +
> +# Regular libraries have the abi_version as the filename extension
> +# and have the soname be all but the final part of the abi_version.
> +# Experimental libraries have soname with '0.major'
> +# and the filename suffix as 0.majorminor versions,
> +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
> +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
> +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
> +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
> +abi_va = abi_version.split('.')
> +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
> +experimental_abi_version = '0.' + ''.join(abi_va)
> +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
>  
>  # extract all version information into the build configuration
>  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 72eec4608..4b17662b7 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# now build the static driver
> diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
> index 9da7dc3ba..649474127 100644
> --- a/examples/ethtool/lib/Makefile
> +++ b/examples/ethtool/lib/Makefile
> @@ -18,7 +18,7 @@ endif
>  # library name
>  LIB = librte_ethtool.a
>  
> -LIBABIVER := 1
> +LIBABIVER := 0.1
>  
>  # all source are stored in SRC-Y
>  SRCS-y := rte_ethtool.c
> diff --git a/lib/meson.build b/lib/meson.build
> index 6ceb5e756..0af3efab2 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -113,10 +113,10 @@ foreach l:libraries
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# first build static lib
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 655a1b143..b1a8372cc 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
>  # VPATH contains at least SRCDIR
>  VPATH += $(SRCDIR)
>  
> -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> -else ifeq ($(LIBABIVER),)
> +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> +SOVER := $(basename $(LIBABIVER))
> +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
>  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
> -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
> +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
> +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
>  endif
>  
>  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> +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
>  
>  #
> 
Tested-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
                     ` (2 preceding siblings ...)
  2019-12-12 16:34   ` Ray Kinsella
@ 2019-12-13 11:38   ` Neil Horman
  2019-12-16 11:21   ` Laatz, Kevin
  2019-12-19 12:42   ` David Marchand
  5 siblings, 0 replies; 31+ messages in thread
From: Neil Horman @ 2019-12-13 11:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, thomas, ray.kinsella, ferruh.yigit, bluca

On Thu, Dec 12, 2019 at 11:58:26AM +0000, Bruce Richardson wrote:
> 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.
> 
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
> 
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
> 
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> 
> V3:
> * fixed issues with building ethtool example app.
> V2:
> * adjusted the meson version to work correctly with both 2-part and
>   3-part ABI versions, so it will work correctly even with no changes
>   for a 21.x ABI version number
> * adjusted the versions of the experimental libs so that they are
>   consistent between meson and make, and also consistent with v19.11
> 
> ---
>  ABI_VERSION                   |  2 +-
>  config/meson.build            | 16 +++++++++++++---
>  drivers/meson.build           |  4 ++--
>  examples/ethtool/lib/Makefile |  2 +-
>  lib/meson.build               |  4 ++--
>  mk/rte.lib.mk                 | 13 ++++++++-----
>  6 files changed, 27 insertions(+), 14 deletions(-)
> 
> diff --git a/ABI_VERSION b/ABI_VERSION
> index 2e73f8d2a..fcc01369a 100644
> --- a/ABI_VERSION
> +++ b/ABI_VERSION
> @@ -1 +1 @@
> -20.1
> +20.0.1
> diff --git a/config/meson.build b/config/meson.build
> index 364a8d739..01911ecf9 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -20,9 +20,19 @@ pver = meson.project_version().split('.')
>  major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>  abi_version = run_command(find_program('cat', 'more'),
>  	abi_version_file).stdout().strip()
> -# experimental libraries are versioned as 0.majorminor versions, e.g. 0.201
> -ever = abi_version.split('.')
> -experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1))
> +
> +# Regular libraries have the abi_version as the filename extension
> +# and have the soname be all but the final part of the abi_version.
> +# Experimental libraries have soname with '0.major'
> +# and the filename suffix as 0.majorminor versions,
> +# e.g. v20.1 => librte_stable.so.20.1, librte_experimental.so.0.201
> +#    sonames => librte_stable.so.20, librte_experimental.so.0.20
> +# e.g. v20.0.1 => librte_stable.so.20.0.1, librte_experimental.so.0.2001
> +#      sonames => librte_stable.so.20.0, librte_experimental.so.0.200
> +abi_va = abi_version.split('.')
> +stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[1]
> +experimental_abi_version = '0.' + ''.join(abi_va)
> +experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))
>  
>  # extract all version information into the build configuration
>  dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 72eec4608..4b17662b7 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -132,10 +132,10 @@ foreach class:dpdk_driver_classes
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# now build the static driver
> diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
> index 9da7dc3ba..649474127 100644
> --- a/examples/ethtool/lib/Makefile
> +++ b/examples/ethtool/lib/Makefile
> @@ -18,7 +18,7 @@ endif
>  # library name
>  LIB = librte_ethtool.a
>  
> -LIBABIVER := 1
> +LIBABIVER := 0.1
>  
>  # all source are stored in SRC-Y
>  SRCS-y := rte_ethtool.c
> diff --git a/lib/meson.build b/lib/meson.build
> index 6ceb5e756..0af3efab2 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -113,10 +113,10 @@ foreach l:libraries
>  
>  			if is_experimental != 0
>  				lib_version = experimental_abi_version
> -				so_version = experimental_abi_version
> +				so_version = experimental_so_version
>  			else
>  				lib_version = abi_version
> -				so_version = abi_version
> +				so_version = stable_so_version
>  			endif
>  
>  			# first build static lib
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 655a1b143..b1a8372cc 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -11,14 +11,16 @@ EXTLIB_BUILD ?= n
>  # VPATH contains at least SRCDIR
>  VPATH += $(SRCDIR)
>  
> -ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
> -LIBABIVER := $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> -else ifeq ($(LIBABIVER),)
> +LIBABIVER ?= $(shell cat $(RTE_SRCDIR)/ABI_VERSION)
> +SOVER := $(basename $(LIBABIVER))
> +ifeq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
>  # EXPERIMENTAL ABI is versioned as 0.major+minor, e.g. 0.201 for 20.1 ABI
> -LIBABIVER := 0.$(shell cat $(RTE_SRCDIR)/ABI_VERSION | tr -d '.')
> +LIBABIVER := 0.$(shell echo $(LIBABIVER) | tr -d '.')
> +SOVER := 0.$(shell echo $(SOVER) | tr -d '.')
>  endif
>  
>  ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> +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
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
                     ` (3 preceding siblings ...)
  2019-12-13 11:38   ` Neil Horman
@ 2019-12-16 11:21   ` Laatz, Kevin
  2019-12-19 12:42   ` David Marchand
  5 siblings, 0 replies; 31+ messages in thread
From: Laatz, Kevin @ 2019-12-16 11:21 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: thomas, ray.kinsella, ferruh.yigit, bluca

On 12/12/2019 11:58, Bruce Richardson wrote:
> 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.
>
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
>
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
>
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Patch also tested with new Meson ABI checks (see 
http://patches.dpdk.org/project/dpdk/list/?series=7830)

Tested-by: Kevin Laatz <kevin.laatz@intel.com>



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
                     ` (4 preceding siblings ...)
  2019-12-16 11:21   ` Laatz, Kevin
@ 2019-12-19 12:42   ` David Marchand
  2019-12-19 15:19     ` Thomas Monjalon
  5 siblings, 1 reply; 31+ messages in thread
From: David Marchand @ 2019-12-19 12:42 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, Thomas Monjalon, Kinsella, Ray, Yigit, Ferruh, Luca Boccassi

On Thu, Dec 12, 2019 at 12:59 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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.
>
> This patch fixes the issue by switching from 2-part to 3-part ABI version
> numbers so that we can keep 20.0 as soname and using the final digits to
> identify the 20.x releases which are ABI compatible. This requires changes
> to both make and meson builds to handle the three-digit version and shrink
> it to 2-digit for soname.
>
> The final fix needed in this patch is to adjust the library version number
> for the ethtool example library, which needs to be upped to 2-digits, as
> external libraries using the DPDK build system also use the logic in this
> file.
>
> Fixes: cba806e07d6f ("build: change ABI versioning to global")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Tested-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [dpdk-dev] [PATCH v3] build: fix soname info for 19.11 compatiblity
  2019-12-19 12:42   ` David Marchand
@ 2019-12-19 15:19     ` Thomas Monjalon
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Monjalon @ 2019-12-19 15:19 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, David Marchand, Kinsella, Ray, Yigit, Ferruh, Luca Boccassi

19/12/2019 13:42, David Marchand:
> On Thu, Dec 12, 2019 at 12:59 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > 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.
> >
> > This patch fixes the issue by switching from 2-part to 3-part ABI version
> > numbers so that we can keep 20.0 as soname and using the final digits to
> > identify the 20.x releases which are ABI compatible. This requires changes
> > to both make and meson builds to handle the three-digit version and shrink
> > it to 2-digit for soname.
> >
> > The final fix needed in this patch is to adjust the library version number
> > for the ethtool example library, which needs to be upped to 2-digits, as
> > external libraries using the DPDK build system also use the logic in this
> > file.
> >
> > Fixes: cba806e07d6f ("build: change ABI versioning to global")
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Ray Kinsella <mdr@ashroe.eu>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Kevin Laatz <kevin.laatz@intel.com>

> Tested-by: David Marchand <david.marchand@redhat.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2019-12-19 15:19 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 10:26 [dpdk-dev] [PATCH] build: fix soname info for 19.11 compatiblity Bruce Richardson
2019-12-11 11:04 ` Luca Boccassi
2019-12-11 11:08   ` Thomas Monjalon
2019-12-11 11:14     ` Bruce Richardson
2019-12-11 11:19       ` Ferruh Yigit
2019-12-12 11:07         ` Ray Kinsella
2019-12-11 11:11   ` Bruce Richardson
2019-12-11 11:25     ` Ferruh Yigit
2019-12-12 11:14     ` Ray Kinsella
2019-12-12 13:58       ` Luca Boccassi
2019-12-12 14:05         ` Ray Kinsella
2019-12-12 15:08           ` Bruce Richardson
2019-12-11 11:15 ` Ferruh Yigit
2019-12-11 13:14   ` Bruce Richardson
2019-12-11 15:16 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2019-12-12  8:27   ` David Marchand
2019-12-12  8:57     ` Ferruh Yigit
2019-12-12 11:44       ` Bruce Richardson
2019-12-12 11:59         ` Bruce Richardson
2019-12-12 13:41           ` Thomas Monjalon
2019-12-12 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2019-12-12 12:30   ` Ray Kinsella
2019-12-12 13:02     ` Bruce Richardson
2019-12-12 15:25       ` Ray Kinsella
2019-12-12 15:34         ` Bruce Richardson
2019-12-12 14:45   ` Ferruh Yigit
2019-12-12 16:34   ` Ray Kinsella
2019-12-13 11:38   ` Neil Horman
2019-12-16 11:21   ` Laatz, Kevin
2019-12-19 12:42   ` David Marchand
2019-12-19 15:19     ` Thomas Monjalon

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).