# OpenFHE build error at 22%

**URL:** <https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504>\
**Category:** Library Questions\
**Created:** [August 20, 2024, 9:25pm UTC](https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504 "2024-08-20T21:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![indiraschka](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@indiraschka](https://openfhe.discourse.group/u/indiraschka)\
**Post date:** [August 20, 2024, 9:25pm UTC](https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504/1 "2024-08-20T21:25:00Z")

</div>

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.

 ![Screenshot 2024-08-20 164808](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/438db187df73c935da55cd664c044c1d1ca8dc00.png)

Do you have any suggestions to fix the error efficiently?

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [August 22, 2024, 12:51am UTC](https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504/2 "2024-08-22T00:51:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![audobong](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@audobong](https://openfhe.discourse.group/u/audobong)\
**Post date:** [September 6, 2024, 8:54am UTC](https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504/3 "2024-09-06T08:54:27Z")

</div>

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](https://code.visualstudio.com/docs/cpp/config-mingw).
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).](https://github.com/openfheorg/openfhe-development)  
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

 ![page2](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/f126d0bce7b0fba45056b8d8988791cab4aedb24.png)

---

<div class="post-metadata">

**Author:** ![indiraschka](https://avatars.discourse-cdn.com/v4/letter/i/4491bb/32.png) [@indiraschka](https://openfhe.discourse.group/u/indiraschka)\
**Post date:** [September 8, 2024, 6:56pm UTC](https://openfhe.discourse.group/t/openfhe-build-error-at-22/1504/4 "2024-09-08T18:56:11Z")

</div>

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