Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] bail out of activation if environment is not writable #1127

Merged
merged 4 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions recipe/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ _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!'
_la_log 'Unless you plan to use the GDB debugger with libarrow, this warning can be safely ignored.'
return
fi

# this needs to be in sync with ARROW_GDB_INSTALL_DIR in build.sh
_la_placeholder="replace_this_section_with_absolute_slashed_path_to_CONDA_PREFIX"
# the paths here are intentionally stacked, see #935, resp.
Expand All @@ -44,7 +51,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")"
Expand All @@ -54,12 +61,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
Expand Down
2 changes: 1 addition & 1 deletion recipe/build-arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source:
folder: testing

build:
number: 6
number: 7
# 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)]
Expand Down Expand Up @@ -65,7 +65,7 @@ outputs:
build:
string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ build_ext }}
run_exports:
- {{ pin_subpackage("libarrow", max_pin="x.x.x") }}
- {{ pin_subpackage("libarrow", max_pin="x") }}
ignore_run_exports_from:
- {{ compiler("cuda") }} # [cuda_compiler_version != "None"]
# arrow only uses headers, apparently
Expand Down