differential-privacy icon indicating copy to clipboard operation
differential-privacy copied to clipboard

Fix bazel build issues on Mac for ZetaSQL

Open miracvbasaran opened this issue 4 years ago • 5 comments

miracvbasaran avatar Jan 28 '21 13:01 miracvbasaran

@miracvbasaran Hello Could you detail the current recommended workaround for this issue ? I tried to build using Bazelisk like described in the readme but couldn't get it to work. FYI I am running MacOS BigSur 11.1 Thanks

EDIT: Nervermind I was able to get it to work using Bazelisk + re-installing the latest Command line tools Thanks for all the work you do on maintaining such useful libraries!

jean-malo avatar Feb 05 '21 18:02 jean-malo

I am also still having these bazel build issues for Mac. I followed @jean-malo comments and used Bazelisk and reinstalled the latest Command line tools, but it still isn't working. Are there any updates?

My error is this:

examples/zetasql/BUILD:19:1 error executing shell command: '/bin/bash -c function cleanup_function() {
local ecode=$?
if [ $ecode -eq 0 ]; then
cleanup_on_success
else
cleanup_on_failure
fi
}
set -e
function cleanup_on_success() {
printf "rules_foreign_cc: ...' failed (Exit 2) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)

gracetian6 avatar Nov 05 '21 20:11 gracetian6

Can you provide more information about the failure? Did you try building with --verbose_failures? The command.log file will also have more information.

rjwilson avatar Nov 08 '21 23:11 rjwilson

@rjwilson The verbose_failure says that this shell command failed:

/bin/bash -c function cleanup_function() {
local ecode=$?
if [ $ecode -eq 0 ]; then
cleanup_on_success
else
cleanup_on_failure
fi
}
set -e
function cleanup_on_success() {
printf "rules_foreign_cc: ...' failed (Exit 2) bash failed: error executing command 
  (cd /private/var/tmp/_bazel_gracetian/bae5cb828fdd24ed9c85e9dd230cbf42/sandbox/darwin-sandbox/9/execroot/zetasql_example && \
  exec env - \
  /bin/bash -c 'function cleanup_function() {
local ecode=$?
if [ $ecode -eq 0 ]; then
cleanup_on_success
else
cleanup_on_failure
fi
}
set -e
function cleanup_on_success() {
printf "rules_foreign_cc: Cleaning temp directories"
  rm -rf $BUILD_TMPDIR $EXT_BUILD_DEPS
}
function cleanup_on_failure() {
printf "\nrules_foreign_cc: Build failed!\nrules_foreign_cc: Keeping temp build directory $BUILD_TMPDIR and dependencies directory $EXT_BUILD_DEPS for debug.\nrules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify '\''--sandbox_debug'\'' Bazel command line flag.\n\nrules_foreign_cc: Printing build logs:\n\n_____ BEGIN BUILD LOGS _____\n"
cat "$BUILD_LOG"
printf "\n_____ END BUILD LOGS _____\n"
printf "rules_foreign_cc: Build script location: $BUILD_SCRIPT\n"
printf "rules_foreign_cc: Build log location: $BUILD_LOG\n\n"
}
trap "cleanup_function" EXIT
export BUILD_SCRIPT="bazel-out/darwin-fastbuild/bin/external/icu/icu/logs/Configure_script.sh"
export BUILD_LOG="bazel-out/darwin-fastbuild/bin/external/icu/icu/logs/Configure.log"
touch $BUILD_LOG
$BUILD_SCRIPT &> $BUILD_LOG

gracetian6 avatar Nov 11 '21 05:11 gracetian6

What's the error in $BUILD_LOG?

rjwilson avatar Nov 12 '21 19:11 rjwilson

Please fix my account payment issues

TohaAbir avatar Jun 21 '22 19:06 TohaAbir