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 2019/08/08 08:48:51 UTC

[arrow] branch master updated: ARROW-6167: [R] macOS binary R packages on CRAN don't have arrow_available

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 13f5e92  ARROW-6167: [R] macOS binary R packages on CRAN don't have arrow_available
13f5e92 is described below

commit 13f5e92b87a87669a8fd15c457140dd098408fce
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Thu Aug 8 17:48:35 2019 +0900

    ARROW-6167: [R] macOS binary R packages on CRAN don't have arrow_available
    
    This fixes one of the three possibilities described on the ticket, and certainly not the one that affected CRAN. It also adds a warning to the README with workaround instructions.
    
    Closes #5034 from nealrichardson/macos-configure and squashes the following commits:
    
    4d745e8b8 <Neal Richardson> Merge upstream/master
    3d477a45b <Neal Richardson> Feedback from @kou
    b2c888254 <Neal Richardson> Automatically install via homebrew if needed; update README to warn about bad 0.14.1
    
    Authored-by: Neal Richardson <ne...@gmail.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 r/README.Rmd |  6 ++++++
 r/README.md  |  6 ++++++
 r/configure  | 24 +++++++++---------------
 3 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/r/README.Rmd b/r/README.Rmd
index 5f5d22a..8ef3c60 100644
--- a/r/README.Rmd
+++ b/r/README.Rmd
@@ -30,6 +30,12 @@ Install the latest release of `arrow` from CRAN with
 install.packages("arrow")
 ```
 
+> Warning: the macOS binary packages on CRAN for 0.14.1 do not work as described
+> below. To install, you'll first need to use Homebrew to get the Arrow C++
+> library (`brew install apache-arrow`), and then from R you can
+> `install.packages("arrow", type = "source")`. We hope to have this resolved
+> in the next release.
+
 On macOS and Windows, installing a binary package from CRAN will handle Arrow's C++ dependencies for you. On Linux, you'll need to first install the C++ library. See the [Arrow project installation page](https://arrow.apache.org/install/) to find pre-compiled binary packages for some common Linux distributions, including Debian, Ubuntu, and CentOS. You'll need to install `libparquet-dev` on Debian and Ubuntu, or `parquet-devel` on CentOS. This will also automatically install the Arrow C+ [...]
 
 If you install the `arrow` package from source and the C++ library is not found, the R package functions will notify you that Arrow is not available. Call
diff --git a/r/README.md b/r/README.md
index 91e750c..0c13e0b 100644
--- a/r/README.md
+++ b/r/README.md
@@ -27,6 +27,12 @@ Install the latest release of `arrow` from CRAN with
 install.packages("arrow")
 ```
 
+> Warning: the macOS binary packages on CRAN for 0.14.1 do not work as
+> described below. To install, you’ll first need to use Homebrew to get
+> the Arrow C++ library (`brew install apache-arrow`), and then from R
+> you can `install.packages("arrow", type = "source")`. We hope to have
+> this resolved in the next release.
+
 On macOS and Windows, installing a binary package from CRAN will handle
 Arrow’s C++ dependencies for you. On Linux, you’ll need to first install
 the C++ library. See the [Arrow project installation
diff --git a/r/configure b/r/configure
index da3d868..12d8b0b 100755
--- a/r/configure
+++ b/r/configure
@@ -48,41 +48,35 @@ else
   # Use pkg-config if available
   pkg-config --version >/dev/null 2>&1
   if [ $? -eq 0 ]; then
-    echo "$ pkg-config --cflags --silence-errors ${PKG_CONFIG_NAME}"
     PKGCONFIG_CFLAGS=`pkg-config --cflags --silence-errors ${PKG_CONFIG_NAME}`
-    echo "PKGCONFIG_CFLAGS = \"${PKGCONFIG_CFLAGS}\""
-
-    echo "$ pkg-config --libs ${PKG_CONFIG_NAME}"
     PKGCONFIG_LIBS=`pkg-config --libs --silence-errors ${PKG_CONFIG_NAME}`
-    echo "PKGCONFIG_LIBS = \"${PKGCONFIG_LIBS}\""
-    echo ""
   fi
 
   if [ "$PKGCONFIG_CFLAGS" ] || [ "$PKGCONFIG_LIBS" ]; then
-    echo "Found pkg-config cflags and libs!"
+    echo "Arrow C++ libraries found via pkg-config"
     PKG_CFLAGS="$PKGCONFIG_CFLAGS"
     PKG_LIBS=${PKGCONFIG_LIBS}
   else
     if [[ "$OSTYPE" == "darwin"* ]]; then
       if [ "$(command -v brew)" ]; then
-        echo "brew is available"
-        BREWDIR=$(brew --prefix)
-
-        if brew ls --versions apache-arrow > /dev/null; then
-          # Install apache-arrow via Homebrew if we don't already have it
-          brew install apache-arrow
+        if [ "$(brew ls --versions ${PKG_BREW_NAME})" == "" ]; then
+          echo "Installing ${PKG_BREW_NAME} via Homebrew"
+          brew install ${PKG_BREW_NAME}
+        else
+          # We already have it so no need to install
+          echo "Using Homebrew ${PKG_BREW_NAME}"
         fi
 
+        BREWDIR=$(brew --prefix)
         PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include"
         PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS"
       else
-        echo "brew is not available, trying autobrew"
+        echo "Installing ${PKG_BREW_NAME} via Autobrew"
         curl -sfL "https://jeroen.github.io/autobrew/$PKG_BREW_NAME" > autobrew
         source autobrew
         PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include"
         PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS"
       fi
-
     fi
   fi
 fi