qdm12 / hbc

API of homomorphic binary operations such as binary comparisons or binary divisions using the library HElib
28 stars 5 forks source link

Installation Issue #1

Closed mominbuet closed 8 years ago

mominbuet commented 8 years ago

When I was trying to make HElib ti stuck on:

CModulus.cpp: In member function ‘void Cmodulus::FFT(NTL::vec_long&, const NTL::ZZX&, long int) const’: CModulus.cpp:200:5: error: ‘PreconditionedRemainder’ was not declared in this scope PreconditionedRemainder prem(zz_p::modulus(), sz); ^ CModulus.cpp:204:44: error: ‘prem’ was not declared in this scope tmp.rep[i].LoopHole() = prem(x.rep[i]); ^ Makefile:91: recipe for target 'CModulus.o' failed make[1]: * [CModulus.o] Error 1 make[1]: Leaving directory '/home/user/Desktop/hbc/HElib/src' makefile:59: recipe for target 'HElib' failed make: * [HElib] Error 2

I previously installed HElib and did not see this error.

qdm12 commented 8 years ago

Hi momimbuet, thanks for letting me know. This is a modification added 19 days ago on HElib and may be the cause, I'll look into it in a few hours. What's your platform?

mominbuet commented 8 years ago

Ubuntu, I think I resolved it with a c++ library, have to check. Was working on something else.

I am using a fresh ubuntu along with the recommended libraries.

qdm12 commented 8 years ago

Alright great! I'll try to fix that makefile when I get back. I'll let you know what was wrong.

mominbuet commented 8 years ago

Thanks

qdm12 commented 8 years ago

Hello again,

I believe the error was due to the NTL libary being outdated (9.6.2) for the latest updates of HElib. The makefile has now the version 9.9.1, I'm still testing but it should work now. Sorry for the inconvenience! And thanks for letting me know :+1:

mominbuet commented 8 years ago

I installed NTL seperately and thats why it worked. Thanks

mominbuet commented 8 years ago

There is another problem though, in line 145 in the makefile (./HEapp) it shows this error:

======================================
Segmentation fault (core dumped)

HElib is installed correctly.

qdm12 commented 8 years ago

Alright so the project's code compiled and the program failed. Maybe try make HE -B and see what happens? I'm on a trip but I'm recompiling everything to check if the error occurs here as well, I'll let you know.

mominbuet commented 8 years ago

Same error actually:

Building HEapp...
g++ objects/*.o HElib/src/fhe.a -o HEapp -L/usr/local/lib -lntl -lgmp -lm
./HEapp
======================================
makefile:145: recipe for target 'HE' failed
make: *** [HE] Segmentation fault (core dumped)
qdm12 commented 8 years ago

Alright sorry to hear that. I am desperately trying to setup HElib on my windows 7 laptop but it won't work because of some NTL related issues. I am coming back Wednesday so I'll fix it and let you know on Wednesday. You may also comment out some function calls in the main.cpp source file. The error could be from the first unit test which is TEST_LOGIC_GATES.

mominbuet commented 8 years ago

have fun, no rush. I have time on this one

BlackPerles commented 8 years ago

Hello, I have the same problem as you. I think it comes when i using the KeyGen. I would say it is a Helib problem, specifically with the use of c ++ 11. But I 'm not sure, just a suggestion.

qdm12 commented 8 years ago

Ok one thing i am certain is that this comes since an update some 20 days ago by Victor Shoup on HElib. Now HElib requires a newer version of NTL (more than 9.6.2) and its keygen method could had changed since then. If you're in a hurry you can probably use the version of HElib prior to that update, or I'll fix it on Wednesday the latest. I'll let you know & thanks for the support!

mominbuet commented 8 years ago

Seems like that, previously I added -std=c++11 on HElib. Now its working fine. Just add this on g++ commands on makefile.

qdm12 commented 7 years ago

Hi there, just to let you know, I have re-worked the project by adding support for Vagrant, added more doc etc so it should be way more fun to tweak the code now. Good luck ! And thanks again for that std=c++11 !!