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

@examples//matrix:native_matrix fails to build #43

Closed
katre opened this issue Mar 24, 2017 · 0 comments
Closed

@examples//matrix:native_matrix fails to build #43

katre opened this issue Mar 24, 2017 · 0 comments
Assignees
Labels

Comments

@katre
Copy link
Member

katre commented Mar 24, 2017

The for loops in examples/matrix/src/matrix.c don't compile because they require C99 mode:

$ bazel build @examples//matrix:native_matrix
INFO: Found 1 target...
ERROR: /home/jcater/.cache/bazel/_bazel_jcater/f161603a652c64478ce40dd2b7d0ce80/external/examples/matrix/BUILD:5:1: C++ compilation of rule '@examples//matrix:native_matrix' failed: Process exited with status 1 [sandboxed].
external/examples/matrix/src/matrix.c: In function 'matrix_transpose':
external/examples/matrix/src/matrix.c:73:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < q; ++i) {
   ^
external/examples/matrix/src/matrix.c:73:3: note: use option -std=c99 or -std=gnu99 to compile your code
external/examples/matrix/src/matrix.c: In function 'matrix_equal':
external/examples/matrix/src/matrix.c:107:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < len; ++i) {
   ^
Use --strategy=CppCompile=standalone to disable sandboxing for the failing actions.
Target @examples//matrix:native_matrix failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.274s, Critical Path: 0.11s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants