You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2019/01/30 14:51:26 UTC
[arrow] branch master updated: ARROW-4328: Add a
ARROW_USE_OLD_CXXABI configure var to R
This is an automated email from the ASF dual-hosted git repository.
uwe 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 cf7bd13 ARROW-4328: Add a ARROW_USE_OLD_CXXABI configure var to R
cf7bd13 is described below
commit cf7bd131949366b8df901a89e31651f227f13197
Author: Peter <cH...@netflix.com>
AuthorDate: Wed Jan 30 15:51:05 2019 +0100
ARROW-4328: Add a ARROW_USE_OLD_CXXABI configure var to R
Sets GLIBCXX_USE_CXX11_ABI=0 so that the R lib will be compatible with a shared library built
with -DARROW_TENSORFLOW=ON
Author: Peter <cH...@netflix.com>
Closes #3409 from cHYzZQo/r-with-tensorflow and squashes the following commits:
d7dc98b7 <Peter> ARROW-4328: Add a ARROW_USE_OLD_CXXABI configure var to R
---
r/README.md | 7 +++++++
r/configure | 8 +++++++-
r/src/Makevars.in | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/r/README.md b/r/README.md
index 987d0c2..1e2cb2c 100644
--- a/r/README.md
+++ b/r/README.md
@@ -24,6 +24,13 @@ Then the R package:
devtools::install_github("apache/arrow/r")
```
+If libarrow was built with the old CXXABI then you need to pass
+the ARROW_USE_OLD_CXXABI configuration variable.
+
+``` r
+devtools::install_github("apache/arrow/r", args=c("--configure-vars=ARROW_USE_OLD_CXXABI=1"))
+```
+
## Example
``` r
diff --git a/r/configure b/r/configure
index c17fd4c..9df1f9d 100755
--- a/r/configure
+++ b/r/configure
@@ -71,6 +71,12 @@ CXX11FLAGS=$("${R_HOME}"/bin/R CMD config CXX11FLAGS)
CXX11STD=$("${R_HOME}"/bin/R CMD config CXX11STD)
CPPFLAGS=$("${R_HOME}"/bin/R CMD config CPPFLAGS)
+# If libarrow uses the old GLIBCXX ABI, so we have to use it too
+PKG_CXXFLAGS="$C_VISIBILITY"
+if [ "$ARROW_USE_OLD_CXXABI" ]; then
+ PKG_CXXFLAGS="$PKG_CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
+fi
+
# Test configuration
echo "#include $PKG_TEST_HEADER" | ${CXXCPP} ${CPPFLAGS} ${PKG_CFLAGS} ${CXX11FLAGS} ${CXX11STD} -xc++ - >/dev/null 2>&1
@@ -91,7 +97,7 @@ if [ $? -ne 0 ]; then
fi
# Write to Makevars
-sed -e "s|@cflags@|$PKG_CFLAGS|" -e "s|@libs@|$PKG_LIBS|" -e "s|@visibility@|$C_VISIBILITY|" src/Makevars.in > src/Makevars
+sed -e "s|@cflags@|$PKG_CFLAGS|" -e "s|@libs@|$PKG_LIBS|" -e "s|@pkgcxxflags@|$PKG_CXXFLAGS|" src/Makevars.in > src/Makevars
# Success
exit 0
diff --git a/r/src/Makevars.in b/r/src/Makevars.in
index a0d5fed..0d28087 100644
--- a/r/src/Makevars.in
+++ b/r/src/Makevars.in
@@ -16,7 +16,7 @@
# under the License.
PKG_CPPFLAGS=@cflags@
-PKG_CXXFLAGS=@visibility@
+PKG_CXXFLAGS=@pkgcxxflags@
CXX_STD=CXX11
PKG_LIBS=@libs@ -Wl,-rpath,/usr/local/lib
#CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"