You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bazel build :tests
INFO: Analyzed target //src:tests (0 packages loaded, 0 targets configured).
ERROR: /tmp/bar/libcbor/examples/bazel/src/BUILD:20:8: Compiling src/hello_test.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target //src:tests) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF ... (remaining 60 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from external/googletest~/googletest/include/gtest/gtest-message.h:57,
from external/googletest~/googletest/include/gtest/gtest-assertion-result.h:46,
from external/googletest~/googletest/include/gtest/gtest.h:63,
from src/hello_test.cc:3:
external/googletest~/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::StrCaseCmp(const char*, const char*)':
external/googletest~/googletest/include/gtest/internal/gtest-port.h:2107:10: error: 'strcasecmp' was not declared in this scope; did you mean 'StrCaseCmp'?
2107 | return strcasecmp(s1, s2);
| ^~~~~~~~~~
| StrCaseCmp
Target //src:tests failed to build
Expected behavior bazel build: test succeed.
Could you plz provide an bazel example with http_archive?
Thank you so much.
Environment
libcbor version and build configuration flags (or source package version if using a package manager).
The text was updated successfully, but these errors were encountered:
Describe the bug
https://github.com/PJK/libcbor/blob/master/examples/bazel/WORKSPACE compiled,
However it failed to compile after replacing
new_local_repository
byhttp_archive
.To Reproduce
In https://github.com/PJK/libcbor/blob/master/examples/bazel/WORKSPACE, I replaced
new_local_repository
by
http_archive
. (As a user, we need to usehttp_archive
in thebazel
)where,
libcbor.BUILD
is as same as https://github.com/PJK/libcbor/blob/master/examples/bazel/third_party/libcbor.BUILD(I only updated the deps path + some typos in the srcs and hdrs)
Then
bazel build :hello
workbazel build :tests
failExpected behavior
bazel build: test
succeed.Could you plz provide an bazel example with
http_archive
?Thank you so much.
Environment
libcbor version and build configuration flags (or source package version if using a package manager).
The text was updated successfully, but these errors were encountered: