Intel HEXL AVX512 Bug

Hi,

I think there is a bug in the build system. Here are the steps to reproduce it:
When I start the building process I am in the /home/ec2-user location (here I run git clone https://github.com/openfheorg/openfhe-configurator.git)

  1. Follow the instruction from here.

  2. Once the build is done, cd openfhe-configurator/openfhe-staging/openfhe-development/build/ and then run sudo make install

  3. Try to build a simple example like this using the standard CMakeLists.User.txt. You create a folder mkdir build, you run cd build then cmake .. and then make.

  4. You will get the following error:
    image

  5. Open the /usr/local/lib/OpenFHE/OpenFHETargets.cmake file and replace set(_IMPORT_PREFIX "ON") with set(_IMPORT_PREFIX "/home/ec2-user/openfhe-configurator/openfhe-staging/openfhe-development/build/ON")

  6. Return to step 3.

  7. You will get the following error:
    image

  8. Copy the hexl includes in the standard location: cp -r /home/ec2-user/openfhe-configurator/openfhe-staging/include/* /usr/local/include/

  9. Copy the hexl libraries in the standard location: cp -r /home/ec2-user/openfhe-configurator/openfhe-staging/lib64/* /usr/local/lib/

  10. Edit the file /usr/local/lib/OpenFHE/OpenFHEConfig.cmake by replacing HEXL::hexl with hexl

  11. Edit the file /usr/local/lib/OpenFHE/OpenFHETargets.cmake by replacing HEXL::hexl with hexl

  12. Return to step 3. You are in the build directory. You run cmake .. and then make. You will get the following error:

  13. Copy the includes of openfhe in the standard location: cp -r /home/ec2-user/openfhe-configurator/openfhe-staging/openfhe-development/build/ON/include/* /usr/local/include/

  14. Copy the openfhe libraries in the standard location: cp -r /home/ec2-user/openfhe-configurator/openfhe-staging/openfhe-development/build/ON/lib/* /usr/local/lib

  15. Return to step 3. Here is the hard part that I didn’t get it. After you execute make will you get a linker error:

The error is much longer but the idea is that it’s a linker error. Maybe it’s not a bug and I did something wrong. Do you have any ideas?

Thank you!

Hi Mihail,

cmake setting _IMPORT_PREFIX to ON is definitely a bug. Thank you for bringing this to our attention. I’ll open an issue.

A potential workaround while we address the issue could be to work with a local build instead of installing the library. The following should work, but let us know if you have any issues.

> cd {path to openfhe-configurator}
> ./scripts/configure.sh
> cp {path to example.cpp} openfhe-staging/openfhe-development/src/pke/examples/
> ./scripts/build-openfhe-development-hexl.sh
> ./openfhe-staging/openfhe-development/build/bin/examples/pke/example
1 Like

Hi Mihail,

We pushed an update for this bug late last week. Hopefully the update resolves your issue, but let us know if you run into any others.