OpenFHE build error at 22%

Hello! I’m looking for help regarding a build error.

I repeatedly ran into this error when building OpenFHE on windows system using MinGW64. I followed each step of the documentation for installation. Starting when running cmake, there are a few problems from

Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32, HAVE_CXX_FLAG_WD654, HAVE_CXX_FLAG_WITHREAD_SAFETY, HAVE_GNU_POSIX_REGEX, HAVE_POSIX_REGEX
these failed

Assuming they’re not critical I continued; After invoking make, the build stopped at 22%. I edited CMakeLists to suppress this error and passing in flags when invoking cmake earlier, but fixes were unsuccessful.

Do you have any suggestions to fix the error efficiently?

1 Like

Could you try building OpenFHE using the dev branch? We fixed a compilation problem for g++18 there. Please let me know if this helps.

I had the same error was able to complete the installation by

  1. Reinstalling the most current copy of MSYS2
  2. Ran this toolchain library " pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain " from Get Started with C++ and MinGW-w64 in Visual Studio Code.
  3. I didn’t need to run the first command on the OpenFHE Windows installation page. I just ran the remaining commands below
    pacman -S mingw-w64-x86_64-gcc (This installed gcc version 13.2.0)
    pacman -S mingw-w64-x86_64-cmake
    pacman -S make
    pacman -S git
    git clone GitHub - openfheorg/openfhe-development: This is the development repository for the OpenFHE library. The current (stable) version is v1.2.0 (released on June 25, 2024).
    cd openfhe-development
    mkdir build
    cd build
    cmake …
    pacman -S autoconf
    make
    make install
    export PATH=$PATH:lib
    make testall
    bin/examples/pke/simple-integers

Actually, I have fixed all the installation errors by using windows subsystem for Linux. It finished within 30 minutes :slight_smile:

1 Like