arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [arrow] branch master updated: ARROW-1855: [GLib] Add workaround for build failure on macOS
Date Sat, 25 Nov 2017 17:09:56 GMT
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 aaa0443  ARROW-1855: [GLib] Add workaround for build failure on macOS
aaa0443 is described below

commit aaa04431acd998ebeef57f03456d95b534ad41f3
Author: Kouhei Sutou <kou@clear-code.com>
AuthorDate: Sat Nov 25 12:09:52 2017 -0500

    ARROW-1855: [GLib] Add workaround for build failure on macOS
    
    Arrow-1.0.gir generation may be failed on macOS. Because Python's distutils' build option
tries building universal binary implicitly. g-ir-scanner uses Python's distutils internally.
We can disable it by defining ARCHFLAGS environment variable.
    
    See also ARROW-1766.
    
    If we put this workaround in c_glib/, users don't need to specify ARCHFLAGS environment
variable explicitly.
    
    Author: Kouhei Sutou <kou@clear-code.com>
    
    Closes #1355 from kou/glib-add-macos-workaround and squashes the following commits:
    
    ac4ecc6e [Kouhei Sutou] [GLib] Add workaround for macOS
---
 c_glib/arrow-glib/Makefile.am     |  5 +++++
 c_glib/arrow-gpu-glib/Makefile.am |  4 ++++
 c_glib/configure.ac               | 13 +++++++++++++
 ci/travis_before_script_c_glib.sh |  8 +-------
 4 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/c_glib/arrow-glib/Makefile.am b/c_glib/arrow-glib/Makefile.am
index 5ecb1a6..e807311 100644
--- a/c_glib/arrow-glib/Makefile.am
+++ b/c_glib/arrow-glib/Makefile.am
@@ -207,6 +207,11 @@ if HAVE_INTROSPECTION
 -include $(INTROSPECTION_MAKEFILE)
 INTROSPECTION_GIRS =
 INTROSPECTION_SCANNER_ARGS =
+INTROSPECTION_SCANNER_ENV =
+if OS_MACOS
+INTROSPECTION_SCANNER_ENV +=			\
+	ARCHFLAGS=
+endif
 INTROSPECTION_COMPILER_ARGS =
 
 Arrow-1.0.gir: libarrow-glib.la
diff --git a/c_glib/arrow-gpu-glib/Makefile.am b/c_glib/arrow-gpu-glib/Makefile.am
index ec96159..11ffa5e 100644
--- a/c_glib/arrow-gpu-glib/Makefile.am
+++ b/c_glib/arrow-gpu-glib/Makefile.am
@@ -72,6 +72,10 @@ INTROSPECTION_GIRS =
 INTROSPECTION_SCANNER_ARGS =
 INTROSPECTION_SCANNER_ENV =			\
 	PKG_CONFIG_PATH=${abs_builddir}/../arrow-glib:$${PKG_CONFIG_PATH}
+if OS_MACOS
+INTROSPECTION_SCANNER_ENV +=			\
+	ARCHFLAGS=
+endif
 INTROSPECTION_COMPILER_ARGS =			\
 	--includedir=$(abs_builddir)/../arrow-glib
 
diff --git a/c_glib/configure.ac b/c_glib/configure.ac
index c6fa019..f06a017 100644
--- a/c_glib/configure.ac
+++ b/c_glib/configure.ac
@@ -34,6 +34,19 @@ AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([1.13 foreign])
 AM_SILENT_RULES([yes])
 
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([for macOS])
+case "$host_os" in
+darwin*)
+  os_macos=yes
+  ;;
+*)
+  os_macos=no
+  ;;
+esac
+AC_MSG_RESULT([$os_macos])
+AM_CONDITIONAL(OS_MACOS, test "$os_macos" = "yes")
+
 AC_PROG_CC
 AC_PROG_CXX
 AX_CXX_COMPILE_STDCXX_11([ext], [mandatory])
diff --git a/ci/travis_before_script_c_glib.sh b/ci/travis_before_script_c_glib.sh
index 99d0539..9d07e02 100755
--- a/ci/travis_before_script_c_glib.sh
+++ b/ci/travis_before_script_c_glib.sh
@@ -97,13 +97,7 @@ if [ $BUILD_SYSTEM = "autotools" ]; then
   CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS CXXFLAGS=-DARROW_NO_DEPRECATED_API"
 
   ./configure $CONFIGURE_OPTIONS
-
-  if [ "$TRAVIS_OS_NAME" = "osx" ]; then
-    ARCHFLAGS="-arch x86_64" make -j4
-  else
-    make -j4
-  fi
-
+  make -j4
   make install
 else
   MESON_OPTIONS="--prefix=$ARROW_C_GLIB_INSTALL"

-- 
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <commits@arrow.apache.org>'].

Mime
View raw message