YafaRay / libYafaRay

libYafaRay is a free open-source montecarlo raytracing engine released under the LGPL 2.1 license. Raytracing is a rendering technique for generating realistic images by tracing the path of light through a 3D scene.
http://www.yafaray.org
61 stars 8 forks source link

[build] error: « numeric_limits » is not member of « std » #15

Open Suryavarman opened 8 months ago

Suryavarman commented 8 months ago

Mageia 9 gcc 12.3.0 CMake 3.26.4 Yafaray: v3.5.1

Yafaray/include/core_api/surface.h:118:26: error: « numeric_limits » is not member of « std »
      118 |         else return std::numeric_limits<float>::infinity();`

To fix it: Add this two lines in the main CMakeLists.txt just before ####### Options ########

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
luzpaz commented 8 months ago

bump

DavidBluecame commented 8 months ago

Hello, Thank you for reporting this building issue. This problem is already resolved in the libYafaRay v4.0 pre-alpha codebase, which is using the C++17 standard. The old YafaRay v3.5.1 is no longer being developed.

DavidBluecame commented 8 months ago

That said, it is true that libYafaRay 4.0 pre-alpha code is still too unstable for any distros. In the mean time please feel free to keep your patch in the distro to build YafaRay v3.5.1, as its codebase will (almost certainly) not change.