Search code examples
c++bazelboringssltink

Google Tink library building C++


Trying to build Tink library (https://github.com/google/tink) with Bazel. Bazel installed, gcc version 7.2.0, Windows 10 x64. Visual C++ 2017.

At first, there were errors like "C++ compilation of rule '@boringssl//:crypto' failed" - I commented these lines (with compilation flags I think) in boringssl/BUILD file (sections boringssl_copts, boringssl_copts_c11) and they disappeared.

But after that, bazel said, that error is in errors.h file (https://github.com/google/tink/blob/master/cc/util/errors.h)

// from #include "absl/base/port.h"
#define PRINTF_ATTRIBUTE(string_index, first_to_check)                  \
__attribute__((__format__ (__printf__, string_index, first_to_check)))
// Constructs a Status object given a printf-style va list.
crypto::tink::util::Status ToStatusF(
crypto::tink::util::error::Code code, const char* format, ...)
PRINTF_ATTRIBUTE(2, 3);
}  // namespace tink
}  // namespace crypto
enter code here

Error C3646: unknown override specifier on line 32 (line with "PRINTF_ATTRIBUTE(2, 3);"). The most frightening thing is that in another files the same code (defining same attribute) is working.

There are another errors in this file, but mentioned is the first (and another are about the same line, so they are consequences of the first I guess).

I'm nearly a total newbie in cpp, but only cpp should be used, not java-version of library.

Thank you for your help, and sorry for possible misformatting and broken english - this is my first question here.


Solution

  • Unfortunately, we don't support Windows for now. It's something that we plan to support next year, please see our feature roadmap.