From f0b50534a08294b3afe4e2f42aa558c22f07f55d Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 26 May 2021 07:11:15 +0100 Subject: [PATCH 1/8] Add Raspberry Pi libatomic flag --- r/configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/r/configure b/r/configure index 22a34bc519f..915e596c7f4 100755 --- a/r/configure +++ b/r/configure @@ -44,6 +44,7 @@ NOT_CRAN=`echo $NOT_CRAN | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` +DISTID=`lsb_release -i` # generate code if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then @@ -186,6 +187,11 @@ else fi fi +# If on Raspberry Pi, need to manually link against latomic +if [ "$DISTID" = "Raspbian" ]; then + PKG_CFLAGS="$PKG_CFLAGS -DARROW_CXXFLAGS=-latomic" +fi + # If libarrow uses the old GLIBCXX ABI, so we have to use it too if [ "$ARROW_USE_OLD_CXXABI" ]; then PKG_CFLAGS="$PKG_CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0" From 519916fbadd61c1f9c6386f07cd4533069406fa8 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 26 May 2021 08:58:59 +0100 Subject: [PATCH 2/8] Echo distid --- r/configure | 1 + 1 file changed, 1 insertion(+) diff --git a/r/configure b/r/configure index 915e596c7f4..3c4fe745dc4 100755 --- a/r/configure +++ b/r/configure @@ -45,6 +45,7 @@ NOT_CRAN=`echo $NOT_CRAN | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` DISTID=`lsb_release -i` +echo "$DISTID" # generate code if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then From 01eec70e40ee22fee9ae23b52ef03bb7c9c43767 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 26 May 2021 09:03:22 +0100 Subject: [PATCH 3/8] Update lsb_release command so less verbose --- r/configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r/configure b/r/configure index 3c4fe745dc4..626813c3e47 100755 --- a/r/configure +++ b/r/configure @@ -44,8 +44,7 @@ NOT_CRAN=`echo $NOT_CRAN | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` -DISTID=`lsb_release -i` -echo "$DISTID" +DISTID=`lsb_release -i -s` # generate code if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then From dcd8d7cce73dac7d08ed9d26fb88179eca40a556 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 26 May 2021 10:22:52 +0100 Subject: [PATCH 4/8] use portable syntax --- r/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/configure b/r/configure index 626813c3e47..394b41ff8b3 100755 --- a/r/configure +++ b/r/configure @@ -44,7 +44,7 @@ NOT_CRAN=`echo $NOT_CRAN | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` -DISTID=`lsb_release -i -s` +DISTID=`grep ^ID\= /etc/os-release | awk -F= '{print $2}' | sed 's/\"//g'` # generate code if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then From f64810cd5f3d37d79fc90bf20288a9eb17f733f5 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Wed, 26 May 2021 10:30:03 +0100 Subject: [PATCH 5/8] lowercase --- r/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/configure b/r/configure index 394b41ff8b3..ee3eaf566df 100755 --- a/r/configure +++ b/r/configure @@ -188,7 +188,7 @@ else fi # If on Raspberry Pi, need to manually link against latomic -if [ "$DISTID" = "Raspbian" ]; then +if [ "$DISTID" = "raspbian" ]; then PKG_CFLAGS="$PKG_CFLAGS -DARROW_CXXFLAGS=-latomic" fi From 3c46ae9ed183ff306715690510f49a3f3314c6a8 Mon Sep 17 00:00:00 2001 From: Nic Date: Wed, 26 May 2021 17:31:04 +0100 Subject: [PATCH 6/8] Update r/configure Co-authored-by: Neal Richardson --- r/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/configure b/r/configure index ee3eaf566df..a5317bccd07 100755 --- a/r/configure +++ b/r/configure @@ -188,7 +188,7 @@ else fi # If on Raspberry Pi, need to manually link against latomic -if [ "$DISTID" = "raspbian" ]; then +if grep raspbian /etc/os-release >/dev/null 2>&1; then PKG_CFLAGS="$PKG_CFLAGS -DARROW_CXXFLAGS=-latomic" fi From 772fb162965318ae06000914502aad663969d2d4 Mon Sep 17 00:00:00 2001 From: Nic Date: Wed, 26 May 2021 17:31:10 +0100 Subject: [PATCH 7/8] Update r/configure Co-authored-by: Neal Richardson --- r/configure | 1 - 1 file changed, 1 deletion(-) diff --git a/r/configure b/r/configure index a5317bccd07..53e3d668916 100755 --- a/r/configure +++ b/r/configure @@ -44,7 +44,6 @@ NOT_CRAN=`echo $NOT_CRAN | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` -DISTID=`grep ^ID\= /etc/os-release | awk -F= '{print $2}' | sed 's/\"//g'` # generate code if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then From 0b09589ba596ab201ab9630c95b201b7b34ca07f Mon Sep 17 00:00:00 2001 From: Nic Date: Wed, 9 Jun 2021 20:55:57 +0100 Subject: [PATCH 8/8] Update configure --- r/configure | 1 + 1 file changed, 1 insertion(+) diff --git a/r/configure b/r/configure index 53e3d668916..760c60e6a5c 100755 --- a/r/configure +++ b/r/configure @@ -187,6 +187,7 @@ else fi # If on Raspberry Pi, need to manually link against latomic +# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 for similar example if grep raspbian /etc/os-release >/dev/null 2>&1; then PKG_CFLAGS="$PKG_CFLAGS -DARROW_CXXFLAGS=-latomic" fi