You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2018/09/18 23:40:26 UTC

[arrow] branch master updated: ARROW-3240: [GLib] Add build instructions using meson

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

kou 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 92a2e6a  ARROW-3240: [GLib] Add build instructions using meson
92a2e6a is described below

commit 92a2e6a63e3199cce7c20449295cd94a45fd2a39
Author: yosuke shiro <ys...@gmail.com>
AuthorDate: Wed Sep 19 08:40:09 2018 +0900

    ARROW-3240: [GLib] Add build instructions using meson
    
    Because we support two build systems, GNU Autotools and Meson.
    
    Author: yosuke shiro <ys...@gmail.com>
    
    Closes #2563 from shiro615/glib-add-build-instructions-using-meson and squashes the following commits:
    
    904df48f <yosuke shiro>  Use 'ninja -C build'
    6888a91f <yosuke shiro>  Remove 'mkdir -p build'
    d5df8169 <yosuke shiro>  Remove unnecessary description
    7257a76a <yosuke shiro>  Update .gitignore
    5bb7a1bb <yosuke shiro>  Add build instructions using meson
---
 c_glib/.gitignore |  1 +
 c_glib/README.md  | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/c_glib/.gitignore b/c_glib/.gitignore
index 6cd02f5..7298af9 100644
--- a/c_glib/.gitignore
+++ b/c_glib/.gitignore
@@ -61,3 +61,4 @@ Makefile.in
 /example/read-batch
 /example/read-stream
 /gtk-doc.make
+/build/
diff --git a/c_glib/README.md b/c_glib/README.md
index 97d44d6..c4f8045 100644
--- a/c_glib/README.md
+++ b/c_glib/README.md
@@ -53,7 +53,7 @@ recommended that you use packages.
 Note that the packages are "unofficial". "Official" packages will be
 released in the future.
 
-If you find problems when installing please see [common build problems](https://github.com/apache/arrow/blob/master/c_glib/README.md#common-build-problems).
+We support two build systems, GNU Autotools and Meson. If you find problems when installing please see [common build problems](https://github.com/apache/arrow/blob/master/c_glib/README.md#common-build-problems).
 
 ### Package
 
@@ -73,10 +73,12 @@ GLib (replace the version number in the following commands with the one you use)
 You need to build and install Arrow C++ before you build and install
 Arrow GLib. See Arrow C++ document about how to install Arrow C++.
 
-You can build and install Arrow GLib after you install Arrow C++.
-
 If you use macOS with [Homebrew](https://brew.sh/), you must install required packages and set `PKG_CONFIG_PATH` before build Arrow GLib:
 
+If you use GNU Autotools, you can build and install Arrow GLib by the followings:
+
+macOS:
+
 ```console
 % cd c_glib
 % brew bundle
@@ -94,6 +96,27 @@ Others:
 % sudo make install
 ```
 
+If you use Meson, you can build and install Arrow GLib by the followings:
+
+macOS:
+
+```console
+% cd c_glib
+% brew bundle
+% PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig:$PKG_CONFIG_PATH meson build --buildtype=release
+% ninja -C build
+% sudo ninja -C build install
+```
+
+Others:
+
+```console
+% cd c_glib
+% meson build --buildtype=release
+% ninja -C build
+% sudo ninja -C build install
+```
+
 ### How to build by developers
 
 You need to install Arrow C++ before you install Arrow GLib. See Arrow
@@ -106,13 +129,14 @@ to build Arrow GLib. You can install them by the followings:
 On Debian GNU/Linux or Ubuntu:
 
 ```console
-% sudo apt install -y -V gtk-doc-tools autoconf-archive libgirepository1.0-dev
+% sudo apt install -y -V gtk-doc-tools autoconf-archive libgirepository1.0-dev meson ninja-build
 ```
 
 On CentOS 7 or later:
 
 ```console
 % sudo yum install -y gtk-doc gobject-introspection-devel
+% sudo pip install -y meson ninja
 ```
 
 On macOS with [Homebrew](https://brew.sh/):
@@ -121,7 +145,7 @@ On macOS with [Homebrew](https://brew.sh/):
 % brew bundle
 ```
 
-Now, you can build Arrow GLib:
+If you use GNU Autotools, you can build and install Arrow GLib by the followings:
 
 ```console
 % cd c_glib
@@ -137,6 +161,21 @@ You need to set `PKG_CONFIG_PATH` to `configure` On macOS:
 % ./configure PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig:$PKG_CONFIG_PATH --enable-gtk-doc
 ```
 
+If you use Meson, you can build and install Arrow GLib by the followings:
+
+```console
+% cd c_glib
+% meson build -Dgtk_doc=true
+% ninja -C build
+% sudo ninja -C build install
+```
+
+You need to set `PKG_CONFIG_PATH` on macOS:
+
+```console
+% PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig:$PKG_CONFIG_PATH meson build -Dgtk_doc=true
+```
+
 ## Usage
 
 You can use Arrow GLib with C or other languages. If you use Arrow