encryptogroup / ABY

ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation
GNU Lesser General Public License v3.0
463 stars 132 forks source link

cmake error relic #145

Closed nilslukas closed 5 years ago

nilslukas commented 5 years ago

Running cmake on the build directory gives me the following output ..

CMake Error at src/abycore/CMakeLists.txt:1 (add_library): Target "aby" links to target "RELIC::relic" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

How do I install the relic target?

MartKro commented 5 years ago

Did you clone completly new? If not, did you update your submodules? The ENCRYPTO_utils library recently changed it's submodules so if you did not do it yet you should update your submodules using git submodule update --init at the root directory of the project. Also please check if the extern/ENCRYPTO_utils/extern/relic directory contains content.

If you did the recursive updating already or the relic directory contains content, it's a bug I'll look into it since the library should be built, found and used automatically.

nilslukas commented 5 years ago

Tried it, works. Don't know what was the problem the first time. Thanks.

siaaron045 commented 5 years ago

I do what you say but still have this error.Please help me.

ishaq commented 5 years ago

this is an issue with cmake file in OTExtension (I believe), if you have already installed ENCRYPTO_utils system wide, it would go crazy trying to find it. It is also missing a call to something like find_package(Boost REQUIRED COMPONENTS system thread). Instead of trying to fix its cmake, I just nuked my VM and on a fresh one, build ABY (just ABY, no OTExtension, ENCRYYPTO_Utils, etc). since it couldn't detect any components available, it pulled everything into its extern directory and installed.

Not the solution you need or deserve, but a solution nevertheless.

UPDATE: Note that if you use your own projects outside of ABY and depend on ABY (and ENCRYPTO_utils) via find_package in your cmake files, this will still give you RELIC errors. The real problem is, as the comment in ENCRYPTO_utils suggests, RELIC exports poorly. I guess including it in your own projects as a submodule and doing similar trickery as in ENCRYPTO_utils cmake file would fix it, but I haven't tried it.

I am not sure what the rationale was for something that hasn't created a release in years now. May be Victor Shoup's NTL would have been a good alternative. RELIC creates unncessary pain point for the users.

xfap commented 4 years ago

I got the problem too today. And like ishaq said, it's just because you install ENCRYPTO_utils by yourself in the system wide. The way is to find the path and delete the files. In my linux(Ubutun), the file is in "/usr/local/lib/cmake". After delete dir such as ENCRYPTO_utils,OTExtension , then it will go well.

locomotive-crypto commented 3 years ago

I also got this problem just now.

zhou-pz commented 1 year ago

I got the problem too today. And like ishaq said, it's just because you install ENCRYPTO_utils by yourself in the system wide. The way is to find the path and delete the files. In my linux(Ubutun), the file is in "/usr/local/lib/cmake". After delete dir such as ENCRYPTO_utils,OTExtension , then it will go well.

I also got this problem and this solution works!