From 845aaed66abdbad4304b1bb2d17d2b99b4f6eaaa Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 3 Oct 2023 12:14:59 +0300 Subject: [PATCH] nmslib: add -fno-finite-math-only to fix issues with glibc >= 2.31 --- recipes/nmslib/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/nmslib/all/conanfile.py b/recipes/nmslib/all/conanfile.py index 97e9d9fd5d9b8e..1d8651f6aaf38f 100644 --- a/recipes/nmslib/all/conanfile.py +++ b/recipes/nmslib/all/conanfile.py @@ -61,6 +61,10 @@ def generate(self): tc.variables["WITHOUT_TESTS"] = True # Relocatable shared libs on macOS tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # The finite-math-only optimization has no effect and can cause linking errors + # when linked against glibc >= 2.31 + tc.variables["CMAKE_C_FLAGS"] = "-fno-finite-math-only" + tc.variables["CMAKE_CXX_FLAGS"] = "-fno-finite-math-only" tc.generate() def build(self):