Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems to be a conflict caused by the local installation of libOTe. #65

Open
ShallMate opened this issue Jan 20, 2024 · 1 comment
Open

Comments

@ShallMate
Copy link

Respected Dr. Peter,

Due to my installation of the latest version of libOTe locally, I seem to encounter an issue while compiling libPSI. It appears to be compiling with my local libOTe instead of the one in the 'thirdparty' folder. How can I resolve this issue? Below is the error message I received.

Thank you for your assistance.

In file included from /home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiSender.cpp:4:
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiSender.h:6: warning: ignoring #pragma error [-Wunknown-pragmas]
#pragma error("ENABLE_AKN must be defined in libOTe")

In file included from /home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiReceiver.cpp:4:
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiReceiver.h:6: warning: ignoring #pragma error [-Wunknown-pragmas]
#pragma error("ENABLE_AKN must be defined in libOTe")

/home/user/lgw/c++/libPSI/libPSI/PSI/ECDH/EcdhPsiReceiver.cpp:10:10: fatal error: cryptoTools/Crypto/Curve.h: No such file or directory
#include "cryptoTools/Crypto/Curve.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/PSI/ECDH/EcdhPsiSender.cpp:9:10: fatal error: cryptoTools/Crypto/Curve.h: No such file or directory
#include "cryptoTools/Crypto/Curve.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiSender.cpp:4:
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiSender.h:12:10: fatal error: libOTe/NChooseK/AknOtSender.h: No such file or directory
#include "libOTe/NChooseK/AknOtSender.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:314: libPSI/CMakeFiles/libPSI.dir/PSI/ECDH/EcdhPsiReceiver.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:328: libPSI/CMakeFiles/libPSI.dir/PSI/ECDH/EcdhPsiSender.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:160: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr16/AknBfMPsiSender.cpp.o] Error 1
In file included from /home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiReceiver.cpp:4:
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr16/AknBfMPsiReceiver.h:12:10: fatal error: libOTe/NChooseK/AknOtReceiver.h: No such file or directory
#include "libOTe/NChooseK/AknOtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:146: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr16/AknBfMPsiReceiver.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/PSI/Dcw/DcwRBfPsiSender.cpp:3:10: fatal error: libOTe/TwoChooseOne/KosOtExtSender.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtSender.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/PSI/Dcw/DcwRBfPsiReceiver.cpp:5:10: fatal error: libOTe/TwoChooseOne/KosOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:272: libPSI/CMakeFiles/libPSI.dir/PSI/Dcw/DcwRBfPsiSender.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:258: libPSI/CMakeFiles/libPSI.dir/PSI/Dcw/DcwRBfPsiReceiver.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr17/Rr17a/Rr17aMPsiSender.cpp:10:10: fatal error: libOTe/TwoChooseOne/KosOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr17/Rr17b/Rr17bMPsiReceiver.cpp:17:10: fatal error: libOTe/TwoChooseOne/KosOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:188: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr17/Rr17a/Rr17aMPsiSender.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:202: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr17/Rr17b/Rr17bMPsiReceiver.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr17/Rr17a/Rr17aMPsiReceiver.cpp:16:10: fatal error: libOTe/TwoChooseOne/KosOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/MPSI/Grr18/Grr18MPsiReceiver.cpp:15:10: fatal error: libOTe/Base/naor-pinkas.h: No such file or directory
#include <libOTe/Base/naor-pinkas.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/MPSI/Rr17/Rr17b/Rr17bMPsiSender.cpp:12:10: fatal error: libOTe/TwoChooseOne/KosOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/KosOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/MPSI/Grr18/Grr18MPsiSender.cpp:9:10: fatal error: libOTe/Base/naor-pinkas.h: No such file or directory
#include "libOTe/Base/naor-pinkas.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:174: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr17/Rr17a/Rr17aMPsiReceiver.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:118: libPSI/CMakeFiles/libPSI.dir/MPSI/Grr18/Grr18MPsiReceiver.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:216: libPSI/CMakeFiles/libPSI.dir/MPSI/Rr17/Rr17b/Rr17bMPsiSender.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:132: libPSI/CMakeFiles/libPSI.dir/MPSI/Grr18/Grr18MPsiSender.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/PSI/Kkrt/KkrtPsiSender.cpp:9:10: fatal error: libOTe/TwoChooseOne/IknpOtExtReceiver.h: No such file or directory
#include "libOTe/TwoChooseOne/IknpOtExtReceiver.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:356: libPSI/CMakeFiles/libPSI.dir/PSI/Kkrt/KkrtPsiSender.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/PSI/Drrn/DrrnPsiServer.cpp:6:10: fatal error: libOTe/TwoChooseOne/IknpOtExtReceiver.h: No such file or directory
#include <libOTe/TwoChooseOne/IknpOtExtReceiver.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/lgw/c++/libPSI/libPSI/PSI/Kkrt/KkrtPsiReceiver.cpp:13:10: fatal error: libOTe/TwoChooseOne/IknpOtExtSender.h: No such file or directory
#include "libOTe/TwoChooseOne/IknpOtExtSender.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:300: libPSI/CMakeFiles/libPSI.dir/PSI/Drrn/DrrnPsiServer.cpp.o] Error 1
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:342: libPSI/CMakeFiles/libPSI.dir/PSI/Kkrt/KkrtPsiReceiver.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/MPSI/DKT/DktMPsiReceiver.cpp:6:15: error: static assertion failed: ENABLE_RELIC must be defined in libOTe
static_assert(0, "ENABLE_RELIC must be defined in libOTe");
^
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:76: libPSI/CMakeFiles/libPSI.dir/MPSI/DKT/DktMPsiReceiver.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/MPSI/DKT/DktMPsiSender.cpp:7:15: error: static assertion failed: ENABLE_RELIC must be defined in libOTe
static_assert(0, "ENABLE_RELIC must be defined in libOTe");
^
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:90: libPSI/CMakeFiles/libPSI.dir/MPSI/DKT/DktMPsiSender.cpp.o] Error 1
In file included from /usr/local/include/macoro/coro_frame.h:6,
from /usr/local/include/macoro/coroutine_handle.h:350,
from /usr/local/include/macoro/task.h:17,
from /usr/local/include/coproto/Common/macoro.h:11,
from /usr/local/include/coproto/Socket/Socket.h:16,
from /usr/local/include/coproto/coproto.h:11,
from /usr/local/include/libOTe/Tools/Coproto.h:9,
from /usr/local/include/libOTe/NChooseOne/NcoOtExt.h:13,
from /home/user/lgw/c++/libPSI/libPSI/../libPSI/MPSI/Rr17/Rr17a/Rr17aMPsiReceiver.h:8,
from /home/user/lgw/c++/libPSI/libPSI/Tools/fileBased.h:15,
from /home/user/lgw/c++/libPSI/libPSI/Tools/fileBased.cpp:1:
/usr/local/include/macoro/optional.h:19:13: error: ‘std::optional’ has not been declared
using std::optional;
^~~~~~~~
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:510: libPSI/CMakeFiles/libPSI.dir/Tools/fileBased.cpp.o] Error 1
In file included from /usr/local/include/macoro/coro_frame.h:6,
from /usr/local/include/macoro/coroutine_handle.h:350,
from /usr/local/include/macoro/task.h:17,
from /usr/local/include/coproto/Common/macoro.h:11,
from /usr/local/include/coproto/Socket/Socket.h:16,
from /usr/local/include/coproto/coproto.h:11,
from /usr/local/include/libOTe/Tools/Coproto.h:9,
from /usr/local/include/libOTe/NChooseOne/NcoOtExt.h:13,
from /usr/local/include/libOTe/NChooseOne/Kkrt/KkrtNcoOtReceiver.h:12,
from /home/user/lgw/c++/libPSI/libPSI/PSI/Drrn/DrrnPsiClient.h:17,
from /home/user/lgw/c++/libPSI/libPSI/PSI/Drrn/DrrnPsiClient.cpp:5:
/usr/local/include/macoro/optional.h:19:13: error: ‘std::optional’ has not been declared
using std::optional;
^~~~~~~~
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:286: libPSI/CMakeFiles/libPSI.dir/PSI/Drrn/DrrnPsiClient.cpp.o] Error 1
/home/user/lgw/c++/libPSI/libPSI/Tools/SimpleIndex.cpp: In member function ‘void osuCrypto::SimpleIndex::insertItems(osuCrypto::spanosuCrypto::block, osuCrypto::block)’:
/home/user/lgw/c++/libPSI/libPSI/Tools/SimpleIndex.cpp:161:75: error: no matching function for call to ‘osuCrypto::CuckooIndex<(osuCrypto::CuckooTypes)0>::getHash(std::array<osuCrypto::block, 8>::value_type&, int, osuCrypto::u64&)’
auto bIdx00 = CuckooIndex<>::getHash(hashs[0], 0, mNumBins);
^
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [libPSI/CMakeFiles/libPSI.dir/build.make:496: libPSI/CMakeFiles/libPSI.dir/Tools/SimpleIndex.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:134: libPSI/CMakeFiles/libPSI.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

@ladnir
Copy link
Member

ladnir commented Jan 21, 2024

The simplest solution is to uninstall your system install. Otherwise you need to find all the places the cmake does a find_package and add the no system paths option

https://stackoverflow.com/questions/49784667/how-to-tell-cmake-not-to-search-system-paths-for-libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants