bazelbuild / rules_android

Android rules for Bazel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_copy_file and _copy_dir fail on macOS

pswaminathan opened this issue · comments

macOS's cp command doesn't support the --reflink flag (used here). 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