mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-20 22:58:41 -04:00
3da5ca0321
Commit5051cd3596("src/Makefile: use VERSION variable consistently") changed the library soname from liburing.so.2 to liburing.so. The idea of soname is that executables linked against liburing.so.2 continue to work with liburing.so.2.1, liburing.so.2.2, etc because the soname matches. They must not work against liburing.so.1 or liburing.so.3 though since those major versions are incompatible. Dropping the major version makes the soname unversioned and executables will link against future liburing releases that are not compatible. Fix the soname compatibility problem by re-adding the major version number. Compute it from the VERSION value instead of hardcoding it in the Makefile. liburing 2.1: $ readelf -a src/liburing.so.2.1 | grep SON 0x000000000000000e (SONAME) Library soname: [liburing.so.2] commit5051cd3596: $ readelf -a src/liburing.so.2.2 | grep SON 0x000000000000000e (SONAME) Library soname: [liburing.so] With this fix: $ readelf -a src/liburing.so.2.2 | grep SON 0x000000000000000e (SONAME) Library soname: [liburing.so.2] Fixes:5051cd3596("src/Makefile: use VERSION variable consistently") Reported-by: Daniel P. Berrangé <berrange@redhat.com> Cc: Bikal Lem <gbikal+git@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://lore.kernel.org/r/20220321114101.682270-1-stefanha@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 lines
256 B
Makefile
7 lines
256 B
Makefile
TOP := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
|
|
NAME=liburing
|
|
SPECFILE=$(TOP)/$(NAME).spec
|
|
VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
|
|
VERSION_MAJOR=$(shell echo $(VERSION) | cut -d. -f1)
|
|
TAG = $(NAME)-$(VERSION)
|