cryptobiu / libscapi

Comprehensive Open Source Library for Secure Multiparty Computation
MIT License
180 stars 66 forks source link

Problem compiling on different directory rather them home directory #50

Closed Arash-Afshar closed 5 years ago

Arash-Afshar commented 6 years ago

I get the following error when it gets to compiling libOTe:

Scanning dependencies of target sha_asm
[  1%] /repo/libscapi/build/libOTe/cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/Crypto/sha_lnx.S.o
[  1%] Built target sha_asm
Scanning dependencies of target cryptoTools
[  3%] Building CXX object cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/Common/BitIterator.cpp.o
In file included from /repo/libscapi/build/libOTe/cryptoTools/cryptoTools/Common/BitIterator.cpp:1:
In file included from /repo/libscapi/build/libOTe/cryptoTools/cryptoTools/Common/BitIterator.h:3:
/repo/libscapi/build/libOTe/cryptoTools/cryptoTools/Common/Defines.h:11:10: fatal error: 
      'boost/lexical_cast.hpp' file not found
#include <boost/lexical_cast.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/Common/BitIterator.cpp.o] Error 1
make[2]: *** [cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [compile-libote] Error 2

I see that boost was compiled and exists in build/boost_1_64_0

Arash-Afshar commented 6 years ago

The problem is the use of $ENV{HOME} in the CMakeLists.txt, e.g., here: https://github.com/cryptobiu/libscapi/blob/bf93f30a60670ee5ccb3cc86ae62a1ce7e22e580/lib/libOTe/cryptoTools/cryptoTools/CMakeLists.txt#L97

Which points to the user home directory. Therefore, if this repository is cloned anywhere other than in the home directory, compile will fail.

abarak-biu commented 6 years ago

Hi. Thanks for pointing this out. I have added this to the documentation, and we will fix it in the next version

abarak-biu commented 6 years ago

Reopening. not fixed yet

liorko87 commented 5 years ago

After a long time, this demand was cancelled. You can install libscapi on any directory you would like. Please pull the latest version from the dev branch