You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/09/13 13:52:48 UTC

[arrow] branch master updated: ARROW-3223: [GLib] Use the same shared object versioning rule in C++

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new c950e10  ARROW-3223: [GLib] Use the same shared object versioning rule in C++
c950e10 is described below

commit c950e1057b6497f0735dde6ffda79cd46de46e71
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Thu Sep 13 09:52:41 2018 -0400

    ARROW-3223: [GLib] Use the same shared object versioning rule in C++
    
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #2548 from kou/glib-use-same-so-versioning-rule-as-cpp and squashes the following commits:
    
    a1c8268a9 <Kouhei Sutou>  Use the same shared object versioning rule in C++
---
 c_glib/arrow-glib/Makefile.am     |  4 ++++
 c_glib/arrow-gpu-glib/Makefile.am |  4 ++++
 c_glib/configure.ac               | 11 ++++++++++-
 c_glib/meson.build                |  5 +++--
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/c_glib/arrow-glib/Makefile.am b/c_glib/arrow-glib/Makefile.am
index e557964..13bfe99 100644
--- a/c_glib/arrow-glib/Makefile.am
+++ b/c_glib/arrow-glib/Makefile.am
@@ -38,6 +38,10 @@ libarrow_glib_la_CXXFLAGS =			\
 	$(ARROW_CFLAGS)				\
 	$(GARROW_CXXFLAGS)
 
+libarrow_glib_la_LDFLAGS =			\
+	-version-info $(LT_VERSION_INFO)	\
+	-no-undefined
+
 libarrow_glib_la_LIBADD =			\
 	$(GLIB_LIBS)				\
 	$(ARROW_LIBS)
diff --git a/c_glib/arrow-gpu-glib/Makefile.am b/c_glib/arrow-gpu-glib/Makefile.am
index a7ef08f..a124903 100644
--- a/c_glib/arrow-gpu-glib/Makefile.am
+++ b/c_glib/arrow-gpu-glib/Makefile.am
@@ -34,6 +34,10 @@ libarrow_gpu_glib_la_CXXFLAGS =			\
 	$(ARROW_GPU_CFLAGS)			\
 	$(GARROW_CXXFLAGS)
 
+libarrow_gpu_glib_la_LDFLAGS =			\
+	-version-info $(LT_VERSION_INFO)	\
+	-no-undefined
+
 libarrow_gpu_glib_la_LIBADD =			\
 	$(GLIB_LIBS)				\
 	$(ARROW_LIBS)				\
diff --git a/c_glib/configure.ac b/c_glib/configure.ac
index 6368170..4f7b0ce 100644
--- a/c_glib/configure.ac
+++ b/c_glib/configure.ac
@@ -70,10 +70,19 @@ esac
 AC_MSG_RESULT([$os_macos])
 AM_CONDITIONAL(OS_MACOS, test "$os_macos" = "yes")
 
+LT_INIT
+LT_CURRENT=${GARROW_VERSION_MINOR}
+LT_REVISION=${GARROW_VERSION_MICRO}
+LT_AGE=0
+LT_VERSION_INFO="\$(LT_CURRENT):\$(LT_REVISION):\$(LT_AGE)"
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+AC_SUBST(LT_VERSION_INFO)
+
 AC_PROG_CC
 AC_PROG_CXX
 AX_CXX_COMPILE_STDCXX_11([ext], [mandatory])
-LT_INIT
 
 GARROW_CFLAGS="-Wall"
 GARROW_CXXFLAGS="-Wall"
diff --git a/c_glib/meson.build b/c_glib/meson.build
index 3f7846d..a9e327b 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -36,8 +36,9 @@ version_minor = version_numbers[1].to_int()
 version_micro = version_numbers[2].to_int()
 
 api_version = '1.0'
-so_version = 0
-library_version = '@0@.@1@.@2@'.format(so_version, 0, 0)
+so_version = version_minor
+so_version_patch = version_micro
+library_version = '@0@.@1@.@2@'.format(so_version, so_version_patch, 0)
 
 prefix = get_option('prefix')
 include_dir = join_paths(prefix, get_option('includedir'))