shm_open in rt - not found when trying to install a library using CMake

I am new to CMake. I wanted to Install the OpenFHE library, which instructs to use CMake to do so. (The Library states it is tested and build on MinGW (64-bit) on Windows 10, while I use MinGW64 on Windows 11, but I hope that is backwards compatible).

Following the instructions I created a repo, and then used cmake .. in a new empty folder (with the intend continue with build).

Cmake did not find shm_open in rt and proceeded to fail some tests.

Is rt a dependency I can update (and if yes where?) or is this an issue with the library I tried to download or a compatibility issue?

The failed tests were:

HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed, HAVE_CXX_FLAG_WD654 - Failed, HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed, Performing Test HAVE_GNU_POSIX_REGEX – failed to compile, HAVE_POSIX_REGEX – failed to compile and HAVE_PTHREAD_AFFINITY – failed to compile

The full output was:

$ cmake ..
– The C compiler identification is GNU 15.2.0
– The CXX compiler identification is GNU 15.2.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/msys64/mingw64/bin/c++.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Building in Release mode
– BUILD_UNITTESTS: ON
– BUILD_EXAMPLES: ON
– BUILD_BENCHMARKS: ON
– BUILD_EXTRAS: OFF
– BUILD_STATIC: OFF
– BUILD_SHARED: ON
– GIT_SUBMOD_AUTO: ON
– WITH_BE2: OFF
– WITH_BE4: OFF
– WITH_NTL: OFF
– WITH_TCM: OFF
– WITH_OPENMP: ON
– NATIVE_SIZE: 64
– CKKS_M_FACTOR: 1
– WITH_NATIVEOPT: OFF
– WITH_COVTEST: OFF
– WITH_NOISE_DEBUG: OFF
– WITH_REDUCED_NOISE: OFF
– USE_MACPORTS: OFF
– BUILTIN_INFO_AVAILABLE is defined
***** INSTALL IS AT C:/Program Files (x86)/OpenFHE; to change, run cmake with -DCMAKE_INSTALL_PREFIX=/your/path
– Architecture is x86_64
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of __int128
– Check size of __int128 - done
– Check size of uint64_t
– Check size of uint64_t - done
– NATIVEINT is set to 64
– MATHBACKEND is set to 4
– MATHBACKEND set to 4. Setting WITH_BE4 to ON
– Found OpenMP_C: -fopenmp (found version “4.5”)
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”)
– Found Git: C:/msys64/usr/bin/git.exe (found version “2.51.2”)
– Submodule update
Synchronizing submodule url for ‘third-party/cereal’
Synchronizing submodule url for ‘third-party/google-benchmark’
Synchronizing submodule url for ‘third-party/google-test’
Synchronizing submodule url for ‘third-party/gperftools’
– Google Benchmark version: v1.9.4, normalized to 1.9.4
– Looking for shm_open in rt
– Looking for shm_open in rt - not found
– Performing Test HAVE_CXX_FLAG_WALL
– Performing Test HAVE_CXX_FLAG_WALL - Success
– Performing Test HAVE_CXX_FLAG_WEXTRA
– Performing Test HAVE_CXX_FLAG_WEXTRA - Success
– Performing Test HAVE_CXX_FLAG_WSHADOW
– Performing Test HAVE_CXX_FLAG_WSHADOW - Success
– Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
– Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
– Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST
– Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST - Success
– Performing Test HAVE_CXX_FLAG_WCONVERSION
– Performing Test HAVE_CXX_FLAG_WCONVERSION - Success
– Performing Test HAVE_CXX_FLAG_WERROR
– Performing Test HAVE_CXX_FLAG_WERROR - Success
– Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE
– Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success
– Performing Test HAVE_CXX_FLAG_PEDANTIC
– Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
– Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
– Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
– Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
– Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
– Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
– Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
– Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
– Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
– Performing Test HAVE_CXX_FLAG_WD654
– Performing Test HAVE_CXX_FLAG_WD654 - Failed
– Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
– Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
– Performing Test HAVE_CXX_FLAG_COVERAGE
– Performing Test HAVE_CXX_FLAG_COVERAGE - Success
– Compiling and running to test HAVE_STD_REGEX
– Performing Test HAVE_STD_REGEX – success
– Compiling and running to test HAVE_GNU_POSIX_REGEX
– Performing Test HAVE_GNU_POSIX_REGEX – failed to compile
– Compiling and running to test HAVE_POSIX_REGEX
– Performing Test HAVE_POSIX_REGEX – failed to compile
– Compiling and running to test HAVE_STEADY_CLOCK
– Performing Test HAVE_STEADY_CLOCK – success
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Compiling and running to test HAVE_PTHREAD_AFFINITY
– Performing Test HAVE_PTHREAD_AFFINITY – failed to compile
– Configuring done (66.7s)
– Generating done (4.4s)
– Build files have been written to: C:/Users/Startklar/OpenFHE/openfhe-development/build

Failed tests are not necessairly a problem, unless you know they should succeed. The role of those tests is to figure out if certain things are available for usage.

Since CMake finished normaly, it’s probably OK.
If you build it and run the tests without errors, then don’t sweat about some failed configure checks.

Thanks a lot for the help.

Make runs without errors, but the libraries tests throw a few errors. I can not find a solid documentation for the tests in the library right now, but since the tests refer to other libraries, is my asumption right that it’s probably something specific with the library I try to build?

C:/Users/Startklar/OpenFHE/openfhe-development/build/unittest/binfhe_tests.exe: error while loading shared libraries: libOPENFHEcore.dll: cannot open shared object file: No such file or directory
make[3]: *** [CMakeFiles/testall.dir/build.make:74: CMakeFiles/testall] Error 127
make[2]: *** [CMakeFiles/Makefile2:761: CMakeFiles/testall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:768: CMakeFiles/testall.dir/rule] Error 2
make: *** [Makefile:248: testall] Error 2