bazelbuild / bazelbuild/rules_android
_copy_file and _copy_dir fail on macOS
- Dominant language
- Java
- Stars
- 203
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
macOS's `cp` command doesn't support the `--reflink` flag (used [here](https://github.com/bazelbuild/rules_android/blob/main/rules/utils.bzl#L213)). Attempting to build a library with databinding causes the following error:
```
$ bazel build //app
ERROR: /Users/p/Code/project/app/BUILD.bazel:4:13: Copy ../rules_android~/rules/data_binding_annotation_template.txt to app/databinding/app_RESOURCES_DO_NOT_USE/android/databinding/layouts/DataBindingInfo.java failed: (Exit 64): bash failed: error executing CopyFile command (from target ///app:app_RESOURCES_DO_NOT_USE) /bin/bash -c 'cp --reflink=auto $1 $2' '' external/rules_android~/rules/data_binding_annotation_template.txt ... (remaining 1 argument skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory
Target //src/airborne/Android/app:app failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.255s, Critical Path: 3.89s
INFO: 898 processes: 416 internal, 482 darwin-sandbox.
ERROR: Build did NOT complete successfully
Contributor guide
Assessment
This issue has not been assessed yet.