Fail to load file after updating bazel...
So I'm using gtest, and followed the tips on the C++ basics... So when I attempt to build empty (just a main function returning 0), i get Failed to load File error.If I remove the gtest dependency and the include header from the empty.c file and I'm able to build. This just happened after I updated bazel, been around 3 to 4 weeks from previous update. I'm able to anything that is not depending on gtest. WORKSPACE
new_http_archive(
name = "gtest",
url = "https://googletest.googlecode.com/files/gtest-1.7.0.zip",
sha256 = "247ca18dd83f53deb1328be17e4b1be31514cedfc1e3424f672bf11fd7e0d60d",
build_file = "gtest.BUILD",
)
gtest.BUILD
cc_library(
name = "main",
srcs = glob(
["gtest-1.7.0/src/*.cc"],
exclude = ["gtest-1.7.0/src/gtest-all.cc"]
),
hdrs = glob(["gtest-1.7.0/include/**/*.h"]),
includes = [
"gtest-1.7.0",
"gtest-1.7.0/include"
],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],
)
BUILD
cc_binary(
name = "empty",
srcs = ["empty.c"],
deps = ["@gtest//:main"],
)
Also when doing bazel fecth ...
no such package 'external': Error extracting /private/var/tmp/.../b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0.zip to /private/var/tmp/.../b617756f007b2f3d025bc5e5204b3edc/external/gtest: /private/var/tmp/.../b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0/build-aux/config.h.in and...
Files are there though...
Thanks for the report, I'm looking into it.
On Mon, Jun 15, 2015 at 3:56 PM, Gianfranco Valentino < [email protected]> wrote:
Also when doing bazel fecth ... ´´´ no such package 'external': Error extracting /private/var/tmp//b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0.zip to /private/var/tmp//b617756f007b2f3d025bc5e5204b3edc/external/gtest: /private/var/tmp/***/b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0/build-aux/ config.h.in and... ´´´ Files are there though...
— Reply to this email directly or view it on GitHub https://github.com/google/bazel/issues/246#issuecomment-112188986.
Temporary workaround: run bazel clean --expunge, then build.
This was caused by https://github.com/google/bazel/commit/86746cefb3996f3014d88a281d719b469761bf98 (and is kind of a side-effect of https://github.com/google/bazel/issues/236 ).
On Mon, Jun 15, 2015 at 4:13 PM, Kristina Chodorow [email protected] wrote:
Thanks for the report, I'm looking into it.
On Mon, Jun 15, 2015 at 3:56 PM, Gianfranco Valentino < [email protected]> wrote:
Also when doing bazel fecth ... ´´´ no such package 'external': Error extracting /private/var/tmp//b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0.zip to /private/var/tmp//b617756f007b2f3d025bc5e5204b3edc/external/gtest: /private/var/tmp/***/b617756f007b2f3d025bc5e5204b3edc/external/gtest/gtest-1.7.0/build-aux/ config.h.in and... ´´´ Files are there though...
— Reply to this email directly or view it on GitHub https://github.com/google/bazel/issues/246#issuecomment-112188986.
Thanks, that worked.
This is now fixed.