Closed jyothiyzen closed 2 years ago
Can you try building just the C++ implementation and see if it fails as well?
From the repository root:
$ cd cc
$ bazel build ...
I get the same error when I try building the C++ implementation on the https://github.com/google/tink/commit/9f30c97cb84b10bbba6978bc9c12c86478024050 commit. When I build it on the master branch I get the following error
ERROR: /private/var/tmp/_bazel_vicpar/3ff93db1c7e2ed0959f0ecf3c53b4b9e/external/com_google_protobuf/BUILD:155:11: Compiling src/google/protobuf/any_lite.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 35 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox
external/com_google_protobuf/src/google/protobuf/any_lite.cc:59:14: error: no matching member function for call to 'Set'
type_url_->Set(&::google::protobuf::internal::GetEmptyString(),
~~~~~~~~~~~^~~
/usr/local/include/google/protobuf/arenastring.h:412:29: note: candidate function not viable: no known conversion from 'const std::string *' (aka 'const basic_string<char, char_traits<char>, allocator<char>> *') to 'const char *' for 1st argument
inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
^
/usr/local/include/google/protobuf/arenastring.h:262:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
void Set(ConstStringParam value, Arena* arena);
^
/usr/local/include/google/protobuf/arenastring.h:263:8: note: candidate function not viable: requires 2 arguments, but 3 were provided
void Set(std::string&& value, Arena* arena);
^
/usr/local/include/google/protobuf/arenastring.h:408:29: note: candidate function not viable: requires 2 arguments, but 3 were provided
inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
^
/usr/local/include/google/protobuf/arenastring.h:273:8: note: candidate function template not viable: requires 2 arguments, but 3 were provided
void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
^
external/com_google_protobuf/src/google/protobuf/any_lite.cc:62:39: error: no member named 'EmptyDefault' in 'google::protobuf::internal::ArenaStringPtr'
value_->Mutable(ArenaStringPtr::EmptyDefault{}, arena));
Thanks for testing!
What version of macOS are you running?
Even though we have continuous tests running in a macOS enviroment, it's an older version. I want to make sure I have an accurate environment for reproducing this failure.
I am using MacOS Monterey on Intel Core I7 chip. Here is the environment I am using
kern.version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 kern.ostype: Darwin kern.osrelease: 21.5.0 kern.osrevision: 199506 ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79
Running from the zshell (5.8.1) Bazel: 5.1.1 protoc: 3.21.3
FYI, I'm still having trouble reproducing the failure you're running into.
One more spot check, does the C++ build fail after performing bazel clean --expunge
? I've had a few instances where I've gotten Bazel into an inconsistent state which required flushing build outputs to clear up.
In the meantime, I'm still working on getting an environment where I can reproduce the failure.
I tried thebazel clean --expunge
but the build still fails. I can clean up the rest of my environment and see if any other install is interfering with the build
After taking another look at the logs you posted and doing a bit more digging, it looks like the issue is with the Bazel execution of the C++ compiler including system headers located in /usr/local/include
.
Two potential options for solving the issue:
--sandbox_block_path=/usr/local
flag in your bazel build
invocationprotobuf
installation present in /usr/local/include/google/protobuf
For reference, see https://github.com/protocolbuffers/protobuf/issues/5376#issuecomment-1069780157 and https://github.com/bazelbuild/bazel/issues/8053#issuecomment-490838966.
That worked. Thank you for your help resolving this issue
We are having issues installing
tink
on an intel based MacBook Prod using the commit 9f30c97cb84b10bbba6978bc9c12c86478024050 and master branch. Note: These versions work with Python 3.10 on a MacBook with M1 chipOn an intel based MacBook Pro. We tried the following.
bazelisk
and buildtink
from python folderbazel
version 5.1.1 andbazel build ...
from the python folderprotobuf
protobuf
3.19.4What was the expected behavior?
Tink
library is expected to be built using 9f30c97cb84b10bbba6978bc9c12c86478024050 or later version when using python 3.10How can we reproduce the bug? Installing Bazel Version 5.1.1
Install Tink in virtual environment in python version 3.10.0
Do you have any debugging information?
version information: