Open bhaagiKenpachi opened 1 year ago
Did the build process go through for you ? I am facing the same issue of crypto suites cpp linking error.
@singhparshant its resolved. First you have to build Safeheron-crypto suites repo and then come here to build.
I am trying to build the crypto suites library but getting the below error. Did you face any issues with the build ?
`/Users/parshantsingh/projects/safeheron-crypto-suites-cpp/src/crypto-curve-cpp/src/crypto-curve/proto_gen/curve_point.pb.switch.h:17:2: error: Invalid version of protobuf.
^ In file included from /Users/parshantsingh/projects/safeheron-crypto-suites-cpp/src/crypto-curve-cpp/src/crypto-curve/curve.cpp:1: In file included from /Users/parshantsingh/projects/safeheron-crypto-suites-cpp/src/crypto-curve-cpp/src/crypto-curve/curve.h:5: /Users/parshantsingh/projects/safeheron-crypto-suites-cpp/src/crypto-curve-cpp/src/crypto-curve/curve_point.h:366:35: error: no member named 'proto' in namespace 'safeheron' bool ToProtoObject(safeheron::proto::CurvePoint &curve_point) const;
/Users/parshantsingh/projects/safeheron-crypto-suites-cpp/src/crypto-curve-cpp/src/crypto-curve/curve_point.h:373:43: error: no member named 'proto' in namespace 'safeheron'
bool FromProtoObject(const safeheron::proto::CurvePoint &curve_point);
~~~~~~~~~~~^
3 errors generated.
make[2]: *** [CMakeFiles/SafeheronCryptoSuites.dir/src/crypto-curve-cpp/src/crypto-curve/curve.cpp.o] Error 1
make[1]: *** [CMakeFiles/SafeheronCryptoSuites.dir/all] Error 2
make: *** [all] Error 2`
Could you tell which version of protobuf you have installed : protoc --version
Also, after you build this library, how do you link it to the tss-rsa-cpp build ? Did you make any changes in the cmake file ?
@singhparshant If you look inside the file where error is throwing. It checks for two versions. 3.14 and 3.20 protobuf versions.
Steps to downgrade:
So, cmake went through but make
throws this error:
/usr/bin/ld: /usr/local/lib/libprotobuf.a(arena.cc.o): relocation R_X86_64_TPOFF32 against symbol _ZN6google8protobuf8internal15ThreadSafeArena13thread_cache_E can not be used when making a shared object; recompile with -fPIC
Do we need to do the make install
for crypto suits to build tss repo ? And do we need to update any of the tss cmake files after the crypto suits is built ?
@singhparshant I haven't faced above issue. I tried both in Mac and Ubuntu, I faced no issues after cmake step.
Did you export below var? export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib/
@bhaagiKenpachi So, I was finally able to build and install crypto suits repo. (apparently it doesn't build on ubuntu) Now I am trying to build this tss repo, but get this while trying to do the cmake command:
CMake Error at test/CMakeLists.txt:2 (find_package):
By not providing "Findbenchmark.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"benchmark", but CMake did not find one.
Could not find a package configuration file provided by "benchmark" with
any of the following names:
benchmarkConfig.cmake
benchmark-config.cmake
And The benchmark link is not working, did you try this ??
I figured it out. The readme needs to be updated with the correct benchmark link. I downloaded the google benchmark and it is working fine now.
@singhparshant Could the crypto suites cpp repo be installed on CentOS7? Or is there a kind of Linux fitted? I came across the protoc version error and wondered how to fix it. Thank you!
@HappyUniversity I think in the end these repos are to be run under sgx intel processor support to get more clarification.
@singhparshant Could the crypto suites cpp repo be installed on CentOS7? Or is there a kind of Linux fitted? I came across the protoc version error and wondered how to fix it. Thank you!
Hi, You should use protobuf 3.14 or 3.20, because we only made adaptations for these two versions of protobuf now.
Why is crypto suites cpp repo isn't public?. If possible can you make it public.