mitsuba-renderer / mitsuba2

Mitsuba 2: A Retargetable Forward and Inverse Renderer
Other
2.05k stars 266 forks source link

[🔨 compilation issue] Building Mitsuba 2 with NanoGUI turned on fails. #340

Closed oroppas closed 3 years ago

oroppas commented 3 years ago

Summary

Building NanoGUI in Mitsuba 2's external module fails with compilation error.

System configuration

Description

ext/nanogui is behind https://github.com/mitsuba-renderer/nanogui and VS2019 fails to compile. I can compile https://github.com/mitsuba-renderer/nanogui successfully.

[  1%] Building CXX object ext_build/nanogui/CMakeFiles/nanogui-obj.dir/src/texture_gl.cpp.obj
texture_gl.cpp
C:\msys64\home\ryuta\packages\mitsuba\mitsuba2\ext\nanogui\include\nanogui/vector.h(342): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\msys64\home\ryuta\packages\mitsuba\mitsuba2\ext\nanogui\src\texture_gl.cpp(79): error C2039: 'runtime_error': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(133): note: see declaration of 'std'
C:\msys64\home\ryuta\packages\mitsuba\mitsuba2\ext\nanogui\src\texture_gl.cpp(79): error C3861: 'runtime_error': identifier not found

Steps to reproduce

  1. git clone --recursive https://github.com/mitsuba-renderer/mitsuba2
  2. mkdir build && cd build
  3. cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DMTS_ENABLE_GUI=ON -DMTS_ENABLE_OPTIX=ON ..\mitsuba2
  4. nmake
merlinND commented 3 years ago

Hi @oroppas,

I don't know about the details of this compilation error, but just so you know, there's currently no functioning GUI for Mitsuba 2, so enabling MTS_ENABLE_GUI probably has no advantage.

Speierers commented 3 years ago

Hi @oroppas ,

@merlinND is correct, the Mitsuba 2 GUI is not functional at the moment and isn't even expected to compile.

Checkout the Blender add-on for Mitsuba 2 if you are looking for something similar to a GUI: https://github.com/mitsuba-renderer/mitsuba2-blender

I will close this as it isn't really an issue.

Cheers!

zalo commented 2 years ago

For what it's worth, I was able to "fix" this error locally by appending #include <stdexcept> to the top of nanogui-obj's common.h, adding it here: https://github.com/wjakob/nanogui/blob/master/include/nanogui/common.h#L32