From 49ef7da5e923713fb12fb44487f8bb7363d68925 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 27 Jul 2023 03:42:28 +0200 Subject: [PATCH 1/3] use ARROW_JEMALLOC_LG_PAGE instead of sed --- recipe/build-arrow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build-arrow.sh b/recipe/build-arrow.sh index 369723a01..d22034e3f 100644 --- a/recipe/build-arrow.sh +++ b/recipe/build-arrow.sh @@ -43,8 +43,8 @@ if [[ "${build_platform}" != "${target_platform}" ]]; then fi EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCLANG_EXECUTABLE=${BUILD_PREFIX}/bin/${CONDA_TOOLCHAIN_HOST}-clang" EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DLLVM_LINK_EXECUTABLE=${BUILD_PREFIX}/bin/llvm-link" + EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DARROW_JEMALLOC_LG_PAGE=16" sed -ie "s;protoc-gen-grpc.*$;protoc-gen-grpc=${BUILD_PREFIX}/bin/grpc_cpp_plugin\";g" ../src/arrow/flight/CMakeLists.txt - sed -ie 's;"--with-jemalloc-prefix\=je_arrow_";"--with-jemalloc-prefix\=je_arrow_" "--with-lg-page\=16";g' ../cmake_modules/ThirdpartyToolchain.cmake fi # disable -fno-plt, which causes problems with GCC on PPC From ac9af2c52d47c65926808bbf5b56f0db4df1d206 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jul 2023 01:19:52 +1100 Subject: [PATCH 2/3] bail out of activation if environment is not writable Reinstate 7c0287a84ba8303b12c97e397f2b24a0239b6b46 Also consistently use punctionation at the end of log messages. --- recipe/activate.sh | 12 +++++++++--- recipe/meta.yaml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/recipe/activate.sh b/recipe/activate.sh index 2e3bb8244..515a79743 100755 --- a/recipe/activate.sh +++ b/recipe/activate.sh @@ -23,6 +23,12 @@ _la_log "Beginning libarrow activation." # where the GDB wrappers get installed _la_gdb_prefix="$CONDA_PREFIX/share/gdb/auto-load" +# If the directory is not writable, nothing can be done +if [ ! -w "$_la_gdb_prefix" ]; then + _la_log 'No rights to modify $_la_gdb_prefix, cannot create symlink!' + return +fi + # this needs to be in sync with the respective patch _la_placeholder="replace_this_section_with_absolute_slashed_path_to_CONDA_PREFIX" # the paths here are intentionally stacked, see #935, resp. @@ -44,7 +50,7 @@ for _la_target in "$_la_orig_install_dir/"*.py; do # If the file doesn't exist, skip this iteration of the loop. # (This happens when no files are found, in which case the # loop runs with target equal to the pattern itself.) - _la_log 'Folder $_la_orig_install_dir seems to not contain .py files, skipping' + _la_log 'Folder $_la_orig_install_dir seems to not contain .py files, skipping.' continue fi _la_symlink="$_la_symlink_dir/$(basename "$_la_target")" @@ -54,12 +60,12 @@ for _la_target in "$_la_orig_install_dir/"*.py; do _la_log 'symlink $_la_symlink already exists and points to $_la_target, skipping.' continue fi - _la_log 'Creating symlink $_la_symlink pointing to $_la_target' + _la_log 'Creating symlink $_la_symlink pointing to $_la_target.' mkdir -p "$_la_symlink_dir" || true # this check also creates the symlink; if it fails, we enter the if-branch. if ! ln -sf "$_la_target" "$_la_symlink"; then echo -n "${BASH_SOURCE[0]} ERROR: Failed to create symlink from " - echo -n "'$_la_target' to '$_la_symlink'" + echo -n "'$_la_target' to '$_la_symlink'!" echo continue fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7260ca734..8ec113c2c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -39,7 +39,7 @@ source: folder: testing build: - number: 31 + number: 32 # for cuda support, building with one version is enough to be compatible with # all later versions, since arrow is only using libcuda, and not libcudart. skip: true # [cuda_compiler_version not in ("None", cuda_compiler_version_min)] From bfbcc1d56ee52592509f37dc9de5a16c56fab020 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jul 2023 01:54:24 +1100 Subject: [PATCH 3/3] add note when warning in activate.sh can be safely ignored Suggested-By: Ben Mares --- recipe/activate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/activate.sh b/recipe/activate.sh index 515a79743..247bc3966 100755 --- a/recipe/activate.sh +++ b/recipe/activate.sh @@ -26,6 +26,7 @@ _la_gdb_prefix="$CONDA_PREFIX/share/gdb/auto-load" # If the directory is not writable, nothing can be done if [ ! -w "$_la_gdb_prefix" ]; then _la_log 'No rights to modify $_la_gdb_prefix, cannot create symlink!' + _la_log 'Unless you plan to use the GDB debugger with libarrow, this warning can be safely ignored.' return fi