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

Fix bazel build issues on Mac for ZetaSQL #71

Open
miracvbasaran opened this issue Jan 28, 2021 · 5 comments
Open

Fix bazel build issues on Mac for ZetaSQL #71

miracvbasaran opened this issue Jan 28, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@miracvbasaran
Copy link
Collaborator

No description provided.

@miracvbasaran miracvbasaran added the bug Something isn't working label Jan 28, 2021
@jean-malo
Copy link

jean-malo commented Feb 5, 2021

@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!

@gracetian6
Copy link

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)

@rjwilson
Copy link
Collaborator

rjwilson commented Nov 8, 2021

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

@gracetian6
Copy link

gracetian6 commented Nov 11, 2021

@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

@rjwilson
Copy link
Collaborator

What's the error in $BUILD_LOG?

@google google deleted a comment from TohaAbir Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants