luceneplusplus / LucenePlusPlus

Lucene++ is an up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
luceneplusplus@googlegroups.com
Other
743 stars 235 forks source link

Build with tests fails on macOS 12–14: `gtest-internal.h: error: use of undeclared identifier 'FLT_MAX'` #199

Open barracuda156 opened 10 months ago

barracuda156 commented 10 months ago
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/analysis/MappingCharFilterTest.cpp:7:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/TestInc.h:23:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/test_lucene.h:13:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/gtest.h:62:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:390:51: error: use of undeclared identifier 'FLT_MAX'
:info:build inline float FloatingPoint<float>::Max() { return FLT_MAX; }
:info:build                                                   ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/analysis/AnalyzersTest.cpp:7:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/TestInc.h:23:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/test_lucene.h:13:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/gtest.h:62:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:390:51: error: use of undeclared identifier 'FLT_MAX'
:info:build inline float FloatingPoint<float>::Max() { return FLT_MAX; }
:info:build                                                   ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:392:53: error: use of undeclared identifier 'DBL_MAX'
:info:build inline double FloatingPoint<double>::Max() { return DBL_MAX; }
:info:build                                                     ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:392:53: error: use of undeclared identifier 'DBL_MAX'
:info:build inline double FloatingPoint<double>::Max() { return DBL_MAX; }
:info:build                                                     ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/analysis/BaseTokenStreamFixture.cpp:7:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/TestInc.h:23:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/test_lucene.h:13:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/gtest.h:62:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:390:51: error: use of undeclared identifier 'FLT_MAX'
:info:build inline float FloatingPoint<float>::Max() { return FLT_MAX; }
:info:build                                                   ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/analysis/KeywordAnalyzerTest.cpp:7:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/TestInc.h:23:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/test_lucene.h:13:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/gtest.h:62:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:390:51: error: use of undeclared identifier 'FLT_MAX'
:info:build inline float FloatingPoint<float>::Max() { return FLT_MAX; }
:info:build                                                   ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:392:53: error: use of undeclared identifier 'DBL_MAX'
:info:build inline double FloatingPoint<double>::Max() { return DBL_MAX; }
:info:build                                                     ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:392:53: error: use of undeclared identifier 'DBL_MAX'
:info:build inline double FloatingPoint<double>::Max() { return DBL_MAX; }
:info:build                                                     ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/analysis/LengthFilterTest.cpp:7:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/TestInc.h:23:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/include/test_lucene.h:13:
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/gtest.h:62:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_LucenePlusPlus/LucenePlusPlus/work/LucenePlusPlus-3.0.8/src/test/gtest/googletest/include/gtest/internal/gtest-internal.h:390:51: error: use of undeclared identifier 'FLT_MAX'
:info:build inline float FloatingPoint<float>::Max() { return FLT_MAX; }
:info:build                                                   ^

The same code builds fine on 10.6 PowerPC with gcc13.