Category : bazel

I cannot build abseil-cpp with Bazel. I’m building it directly on arm64. Device: NVIDIA Jetson Xavier NX OS: Ubuntu 18.04 CPU: 6-core NVIDIA Carmel ARMĀ®v8.2 64-bit ./example/hello_world.cc #include <iostream> #include <string> #include <vector> #include "absl/strings/str_join.h" #include "absl/random/random.h" int main() { std::vector<std::string> v = {"foo", "bar", "baz"}; std::string s = absl::StrJoin(v, "-"); absl::BitGen bitgen; std::cout << ..

Read more

I am trying to use yggdrasil-decision-forests (ydf) as an external dependence of a C++ project. According with ydf’s own documentation, one should include the following in the WORKSPACE file: http_archive( name = "ydf", strip_prefix = "yggdrasil_decision_forests-master", urls = ["https://github.com/google/yggdrasil_decision_forests/archive/master.zip"], ) load("@ydf//yggdrasil_decision_forests:library.bzl", ydf_load_deps = "load_dependencies") ydf_load_deps(repo_name = "@ydf") And the following on the BUILD file: cc_binary( ..

Read more

I am building a 32bit c++ library that has the following dependencies #include <google/protobuf/message.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/arena.h> #include <google/protobuf/compiler/importer.h> #include <google/protobuf/dynamic_message.h> with the following as a BUILD.bazel file COPTS = select({ "//conditions:default": [ "-Wall", "-m32", "-fPIC" ], }) LINK_OPTS = select({ "//conditions:default": [ "-m32", "-fPIC", # "-lpthread", # "-lprotobuf", # "-pthread" ], }) .. ..

Read more

I am trying to use code in Bazel, which uses the -include flag (https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html) to always include a config header. The config header sets a number of #defines that are required by the header files, ie enabling/disabling certain APIs. The config header looks something like this: #ifndef CONFIG_H_ #define CONFIG_H_ // part of library, defines ..

Read more

I’m currently migrating a multipackage C++14 project to Bazel, but whenever I run $ bazel build on linux I end up getting build errors because Bazel is calling the compiler with -std=c++0x. One of the requirements for this project is to gradually migrate its packages to C++17 once the build system is up and running. ..

Read more