From b6c5274f09e269fbb7972942effcd1d4ae067402 Mon Sep 17 00:00:00 2001 From: Wataru Shimizu Date: Sun, 17 Sep 2017 02:41:14 +0900 Subject: [PATCH 1/2] Add "Common build problems" section in the README.md of c_glib Add some detailed explanation of common build problems especially on macOS because it requires some tweaks. --- c_glib/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/c_glib/README.md b/c_glib/README.md index 5062ceab7a7..2a7781b3fb4 100644 --- a/c_glib/README.md +++ b/c_glib/README.md @@ -197,3 +197,37 @@ Now, you can run unit tests by the followings: % cd c_glib % test/run-test.sh ``` + +## Common build problems +### configure failed - `AX_CXX_COMPILE_STDCXX_11(ext, mandatory)' + +* Check whether `autoconf-archive` is installed. +* [macOS] Run `brew install autoconf-archive` again. If it shows like the following message, run `brew link autoconf-archive`. + +```text +$ brew install autoconf-archive +Warning: autoconf-archive 2017.03.21 is already installed, it's just not linked. +You can use `brew link autoconf-archive` to link this version. +``` + +Some packages (e.g. `gnome-common`) conflict with `autoconf-archive`. If you see like the following message, run `brew unlink `, then run `brew link autoconf-archive` again. + +```text +$ brew link autoconf-archive +Linking /usr/local/Cellar/autoconf-archive/2017.03.21... +Error: Could not symlink share/aclocal/ax_check_enable_debug.m4 +Target /usr/local/share/aclocal/ax_check_enable_debug.m4 +is a symlink belonging to gnome-common. You can unlink it: + brew unlink gnome-common +``` +After installing/linking `autoconf-archive`, you need to run `./autogen.sh` again. + +### [macOS] configure failed - gobject-introspection-1.0 is not installed +gobject-introspection requires libffi, and it's automatically installed with gobject-introspection. However it can't be found because it's [keg-only](https://docs.brew.sh/FAQ.html#what-does-keg-only-mean). You need to set `PKG_CONFIG_PATH` when executing configure. + +```text +% PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig ./configure +``` + +### build failed - /usr/bin/ld: cannot find -larrow +Arrow C++ must be installed to build Arrow GLib. Run `make install` on Arrow C++ build directory. In addtion, on linux, you may need to run `sudo ldconfig`. From 9b655426f4dee865bba6fe7236af6758d68ab0ab Mon Sep 17 00:00:00 2001 From: Wataru Shimizu Date: Mon, 18 Sep 2017 20:36:03 +0900 Subject: [PATCH 2/2] Improve format and the explanation of installing/linking autoconf archive on macOS. Fixed format issues: * Use '%' for shell prompt. * Use `console` for console output. * Add empty lines under header lines. --- c_glib/README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/c_glib/README.md b/c_glib/README.md index 2a7781b3fb4..2a9d5d64ce2 100644 --- a/c_glib/README.md +++ b/c_glib/README.md @@ -199,35 +199,41 @@ Now, you can run unit tests by the followings: ``` ## Common build problems + ### configure failed - `AX_CXX_COMPILE_STDCXX_11(ext, mandatory)' * Check whether `autoconf-archive` is installed. -* [macOS] Run `brew install autoconf-archive` again. If it shows like the following message, run `brew link autoconf-archive`. +* [macOS] `autoconf-archive` must be linked, but may not be linked. You can check it by running `brew install autoconf-archive` again. If it's not linked, it will show a warning message like: -```text -$ brew install autoconf-archive +```console +% brew install autoconf-archive Warning: autoconf-archive 2017.03.21 is already installed, it's just not linked. You can use `brew link autoconf-archive` to link this version. ``` -Some packages (e.g. `gnome-common`) conflict with `autoconf-archive`. If you see like the following message, run `brew unlink `, then run `brew link autoconf-archive` again. +In this case, you need to run `brew link autoconf-archive`. It may fail with the following message if you have install conflicted packages (e.g. `gnome-common`). -```text -$ brew link autoconf-archive +```console +% brew link autoconf-archive Linking /usr/local/Cellar/autoconf-archive/2017.03.21... Error: Could not symlink share/aclocal/ax_check_enable_debug.m4 Target /usr/local/share/aclocal/ax_check_enable_debug.m4 is a symlink belonging to gnome-common. You can unlink it: brew unlink gnome-common ``` -After installing/linking `autoconf-archive`, you need to run `./autogen.sh` again. + +You need to run `brew unlink `, then run `brew link autoconf-archive` again. + +After installing/linking `autoconf-archive`, run `./autogen.sh` again. ### [macOS] configure failed - gobject-introspection-1.0 is not installed + gobject-introspection requires libffi, and it's automatically installed with gobject-introspection. However it can't be found because it's [keg-only](https://docs.brew.sh/FAQ.html#what-does-keg-only-mean). You need to set `PKG_CONFIG_PATH` when executing configure. -```text -% PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig ./configure +```console +% ./configure PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig ``` ### build failed - /usr/bin/ld: cannot find -larrow + Arrow C++ must be installed to build Arrow GLib. Run `make install` on Arrow C++ build directory. In addtion, on linux, you may need to run `sudo ldconfig`.