google / private-join-and-compute

Apache License 2.0
789 stars 139 forks source link

bazel build //private_join_and_compute:all fails #44

Open duki22 opened 1 year ago

duki22 commented 1 year ago

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
grujicf commented 11 months ago

Open .bazelrc and replace -std=c++17 with -std:c++17.