google / google/private-join-and-compute
bazel build //private_join_and_compute:all fails
- Dominant language
- C++
- Stars
- 856
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm trying to build this repo using bazel.
I use windows 10, and bazel 6.3.2
```
ERROR: C:/users/duki/desktop/workspace/private-join-and-compute/private_join_and_compute/crypto/BUILD:40:11: Compiling private_join_and_compute/crypto/big_num.cc failed: (Exit 2): cl.exe failed: error executing command (from target //private_join_and_compute/crypto:bn_util) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE ... (remaining 36 arguments skipped)
cl : Command line warning D9002 : ignoring unknown option '-std=c++17'
private_join_and_compute/crypto/big_num.cc(102): error C2440: 'reinterpret_cast': cannot convert from 'const _Elem *' to 'unsigned char *'
with
[
_Elem=char
]
private_join_and_compute/crypto/big_num.cc(102): note: Conversion loses qualifiers
private_join_and_compute/crypto/big_num.cc(102): error C2660: 'BN_bn2bin': function does not take 1 arguments
external/boringssl/src/include\openssl/bn.h(257): note: see declaration of 'BN_bn2bin'
private_join_and_compute/crypto/big_num.cc(102): note: while trying to match the argument list '(bignum_st *)'
INFO: Elapsed time: 2.691s, Critical Path: 1.90s
INFO: 13 processes: 13 internal.
FAILED: Build did NOT complete successfully
```
Contributor guide
Research direction
Start with private_join_and_compute/crypto/BUILD at line 40 and private_join_and_compute/crypto/big_num.cc at line 102, then compare the failing MSVC invocation with the declaration in external/boringssl/src/include/openssl/bn.h. Re-run bazel build //private_join_and_compute:all on Windows; done means the target builds without the reported compiler errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100