google-deepmind / code_contests

Apache License 2.0
2.04k stars 200 forks source link

Error running: Bazel run #1

Closed MJeremy2017 closed 2 years ago

MJeremy2017 commented 2 years ago

I followed the steps in the readme, clone the repo, download the data and tried to use bazel run command to check the training data. It ran into this error:

ERROR: /private/var/tmp/_bazel_jeremy.zhang/a44e22cefef79c0c35685895270fd665/external/org_brotli/BUILD:113:11: Compiling c/dec/bit_reader.c failed: (Aborted): wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG '-DNS_BLOCK_ASSERTIONS=1' ... (remaining 40 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
error: unknown warning option '-Wno-vla-parameter'; did you mean '-Wno-unused-parameter'? [-Werror,-Wunknown-warning-option]
Error in child process '/usr/bin/xcrun'. 1
Target //:print_names_and_sources failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 10.118s, Critical Path: 9.73s
INFO: 91 processes: 26 internal, 65 darwin-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

I installed bazel using homebrew

bazel 5.0.0-homebrew

Laptop: Mac

python:

3.7.9
jtkeeling commented 2 years ago

Hi Jeremy. Thanks for reporting this. We set this flag in our .bazelrc file on line 3: build --copt="-Wno-vla-parameter".

We needed to add this flag in order to build the brotli dependency when testing our public release.

However it looks like the flag is not supported by your compiler. Could you try deleting that line of .bazelrc and see if that fixes the issue for you? In the meantime, I will investigate exactly which compilers (or compiler versions) do and do not need this flag to build.

Thanks!

jtkeeling commented 2 years ago

I've just pushed 7bc1b1aafc808afa1cb958886293ae2172650528 which should have fixed this issue. Please feel free to re-open the issue if this isn't the case.

Thanks!