From f3b77cc64726c4203f169d4e25c4e57fb61f63a6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 18 Dec 2022 13:57:42 +1100 Subject: [PATCH 1/6] fix missing RECIPE_ROOT variable now expected by conda build --- dev/tasks/conda-recipes/build_steps.sh | 9 +++++---- dev/tasks/conda-recipes/run_docker_build.sh | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dev/tasks/conda-recipes/build_steps.sh b/dev/tasks/conda-recipes/build_steps.sh index ea607763fc5..b6bd1770c15 100755 --- a/dev/tasks/conda-recipes/build_steps.sh +++ b/dev/tasks/conda-recipes/build_steps.sh @@ -10,18 +10,19 @@ # benefit from the improvement. set -xeuo pipefail +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" output_dir=${1} export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc </dev/null && pwd )" ARROW_ROOT=$(cd "$THISDIR/../../.."; pwd;) FEEDSTOCK_ROOT=$THISDIR +RECIPE_ROOT=$THISDIR docker info @@ -64,6 +65,7 @@ docker run ${DOCKER_RUN_ARGS} \ -v "${ARROW_ROOT}":/arrow:rw,z \ -v "${build_dir}":/build:rw \ -e FEEDSTOCK_ROOT="/arrow/dev/tasks/conda-recipes" \ + -e RECIPE_ROOT="/arrow/dev/tasks/conda-recipes" \ -e CONFIG \ -e R_CONFIG \ -e HOST_USER_ID \ From 6efeeecc21de1aabcc4bf3c0c28ea6aee902b450 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 18 Dec 2022 17:39:55 +0100 Subject: [PATCH 2/6] Don't build libarrow from source --- dev/tasks/conda-recipes/r-arrow/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tasks/conda-recipes/r-arrow/build.sh b/dev/tasks/conda-recipes/r-arrow/build.sh index efb9dfcd513..67f59f6da5f 100755 --- a/dev/tasks/conda-recipes/r-arrow/build.sh +++ b/dev/tasks/conda-recipes/r-arrow/build.sh @@ -5,6 +5,7 @@ export DISABLE_AUTOBREW=1 # arrow uses C++17 export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -std=c++17" +export LIBARROW_BUILD=false if [[ "${target_platform}" == osx-* ]]; then # See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk From e04c9dc488a65a9c418f776da685b9cf9623fb11 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 19 Dec 2022 12:31:06 +0900 Subject: [PATCH 3/6] Debug --- r/configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r/configure b/r/configure index 3f5f743fc08..8184080ed7b 100755 --- a/r/configure +++ b/r/configure @@ -25,6 +25,8 @@ # INCLUDE_DIR and LIB_DIR manually via e.g: # R CMD INSTALL --configure-vars='INCLUDE_DIR=/.../include LIB_DIR=/.../lib' +set -x + # Library settings PKG_CONFIG_NAME="arrow" PKG_DEB_NAME="(unsuppored)" From b26892dcb7105cb7288a8266ebea830891d41480 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 19 Dec 2022 12:35:53 +0900 Subject: [PATCH 4/6] Use BUILD_PREFIX --- dev/tasks/conda-recipes/r-arrow/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/conda-recipes/r-arrow/build.sh b/dev/tasks/conda-recipes/r-arrow/build.sh index 67f59f6da5f..75af823a3d4 100755 --- a/dev/tasks/conda-recipes/r-arrow/build.sh +++ b/dev/tasks/conda-recipes/r-arrow/build.sh @@ -12,7 +12,7 @@ if [[ "${target_platform}" == osx-* ]]; then export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" fi -export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" +export PKG_CONFIG_PATH="${BUILD_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" # ${R_ARGS} necessary to support cross-compilation ${R} CMD INSTALL --build r/. ${R_ARGS} From 3b9c72df689677a814b1f1a615efdea0c03cf633 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 19 Dec 2022 15:42:15 +0900 Subject: [PATCH 5/6] "pkg-config --cflags" may be empty For example, Apache Arrow C++ is installed in system directory. --- r/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/configure b/r/configure index 8184080ed7b..2ff01d2e635 100755 --- a/r/configure +++ b/r/configure @@ -106,7 +106,7 @@ else PKGCONFIG_DIRS=`pkg-config --libs-only-L --silence-errors ${PKG_CONFIG_NAME}` fi - if [ "$PKGCONFIG_CFLAGS" ] && [ "$PKGCONFIG_LIBS" ]; then + if [ "$PKGCONFIG_LIBS" != "" ]; then FOUND_LIB_DIR=`echo $PKGCONFIG_DIRS | sed -e 's/^-L//'` echo "*** Arrow C++ libraries found via pkg-config at $FOUND_LIB_DIR" PKG_CFLAGS="$PKGCONFIG_CFLAGS $PKG_CFLAGS" From f018c905fe1c668af686d5753d883fb006c85418 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 20 Dec 2022 06:00:58 +0900 Subject: [PATCH 6/6] Remove needless codes --- dev/tasks/conda-recipes/r-arrow/build.sh | 2 -- r/configure | 2 -- 2 files changed, 4 deletions(-) diff --git a/dev/tasks/conda-recipes/r-arrow/build.sh b/dev/tasks/conda-recipes/r-arrow/build.sh index 75af823a3d4..340b2196a2c 100755 --- a/dev/tasks/conda-recipes/r-arrow/build.sh +++ b/dev/tasks/conda-recipes/r-arrow/build.sh @@ -12,7 +12,5 @@ if [[ "${target_platform}" == osx-* ]]; then export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" fi -export PKG_CONFIG_PATH="${BUILD_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" - # ${R_ARGS} necessary to support cross-compilation ${R} CMD INSTALL --build r/. ${R_ARGS} diff --git a/r/configure b/r/configure index 2ff01d2e635..0b23847b59c 100755 --- a/r/configure +++ b/r/configure @@ -25,8 +25,6 @@ # INCLUDE_DIR and LIB_DIR manually via e.g: # R CMD INSTALL --configure-vars='INCLUDE_DIR=/.../include LIB_DIR=/.../lib' -set -x - # Library settings PKG_CONFIG_NAME="arrow" PKG_DEB_NAME="(unsuppored)"