Be ware of HElib and corresponding NTL versions

Today I tested an old HElib version (back to mid-2017), but met following compile errors:

......
In file included from EncryptedArray.cpp:15:
EncryptedArray.h:301:19: error: ‘FHE_DEFINE_LOWER_DISPATCH’ has not been declared
  301 |   NTL_FOREACH_ARG(FHE_DEFINE_LOWER_DISPATCH)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
EncryptedArray.h:303:3: error: ISO C++ forbids declaration of ‘NTL_FOREACH_ARG’ with no type [-fpermissive]
  303 |   const RX& getG() const { return mappingData.getG(); }
      |   ^~~~~
......

After some investigation, I found the problem was the NTL on my system is too new (version is 11.3.2). So I downloaded an old NTL version, and specified using this version in Makefile:

CFLAGS = -g -O2 -std=c++11 -I../../ntl-10.5.0/include ......

Then it worked like a charm!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.