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 #136

Merged
merged 1 commit into from
Mar 22, 2016
Merged

fix bazel build #136

merged 1 commit into from
Mar 22, 2016

Conversation

mikedanese
Copy link
Contributor

Build appears to be broken on HEAD

$ bazel build //cmd:jsonnet --verbose_failures
INFO: Found 1 target...
ERROR: /home/mikedanese/jsonnet/core/BUILD:31:1: C++ compilation of rule '//core:jsonnet-common' failed: gcc failed: error executing command 
  (cd /home/mikedanese/.cache/bazel/_bazel_mikedanese/fab3a42bbd7a88931a2be2b547bd48af/jsonnet && \
  exec env - \
    PATH=/home/mikedanese/google-cloud-sdk/bin:/home/mikedanese/bin:/home/mikedanese/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem core -isystem bazel-out/local_linux-fastbuild/genfiles/core -isystem external/bazel_tools/tools/cpp/gcc3 -isystem include -isystem bazel-out/local_linux-fastbuild/genfiles/include -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.d -fPIC -c core/desugarer.cpp -o bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.o): gcc failed: error executing command 
  (cd /home/mikedanese/.cache/bazel/_bazel_mikedanese/fab3a42bbd7a88931a2be2b547bd48af/jsonnet && \
  exec env - \
    PATH=/home/mikedanese/google-cloud-sdk/bin:/home/mikedanese/bin:/home/mikedanese/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem core -isystem bazel-out/local_linux-fastbuild/genfiles/core -isystem external/bazel_tools/tools/cpp/gcc3 -isystem include -isystem bazel-out/local_linux-fastbuild/genfiles/include -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.d -fPIC -c core/desugarer.cpp -o bazel-out/local_linux-fastbuild/bin/core/_objs/jsonnet-common/core/desugarer.pic.o).
core/desugarer.cpp:66:29: fatal error: std.jsonnet.h: No such file or directory
compilation terminated.
Target //cmd:jsonnet failed to build
INFO: Elapsed time: 1.630s, Critical Path: 0.62s

Not sure if this is the best way to fix :)

cc @davidzchen

@sparkprime
Copy link
Member

Doh, I just cut a release! :) No matter, we'll get this fixed (waiting for dzc to comment on that) and then do a follow-up release.

@davidzchen
Copy link
Contributor

This PR looks good but what's odd is that bazel build //cmd:jsonnet works fine for me with Bazel at HEAD (as in Bazel HEAD). Which version of Bazel are you running and on which OS?

@mikedanese
Copy link
Contributor Author

I'm running the most recent release. It looks like std.jsonnet.h is not included in the sandbox.

$ bazel version
Build label: 0.2.0
Build target: bazel-out/local_linux-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Feb 23 13:08:29 2016 (1456232909)
Build timestamp: 1456232909
Build timestamp as int: 1456232909
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:        15.10
Codename:       wily
$ uname -a
Linux ubuntu 4.2.0-30-generic #36-Ubuntu SMP Fri Feb 26 00:58:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

looking at the previous rule, it seems like it should have worked...

@sparkprime
Copy link
Member

I also had this on my work laptop:

$ bazel version
Build label: 0.1.2
Build target: bazel-out/local_linux-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel-main_deploy.jar
Build time: Fri Dec 4 23:13:21 2015 (1449270801)
Build timestamp: 1449270801
Build timestamp as int: 1449270801

@sparkprime
Copy link
Member

@davidzchen did you try on a fresh clone?

@davidzchen
Copy link
Contributor

Interesting. This reproduces on Linux but not on OS X. Let's go ahead and merge these changes. I'll try to isolate a test case and send a bug report to Bazel.

LGTM

@sparkprime sparkprime merged commit 02e84e0 into google:master Mar 22, 2016
@sparkprime
Copy link
Member

We could really use a travis rule for bazel builds :)

@davidzchen
Copy link
Contributor

I'll set that up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants