mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.1k stars 249 forks source link

Compile error with the latest code #1247

Closed LuigiNixy closed 3 months ago

LuigiNixy commented 3 months ago

Summary

When trying to build the latest code https://github.com/mitsuba-renderer/mitsuba3/pull/1238, some errors have emerged. I have compiled previous versions successfully several times before.

System configuration

System information:

OS: Linux Mint 21.3 CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz GPU: Quadro P5000 Python: 3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0] NVidia driver: 535.161.07 LLVM: 13.0.1 cmake version 3.22.1

Compiled with: Clang 13.0.1 Variants compiled: [ "scalar_rgb", "cuda_ad_rgb", "llvm_ad_rgb", "scalar_rgb_polarized", "scalar_mono_polarized", "cuda_ad_mono_polarized", "llvm_ad_mono_polarized", "cuda_mono_polarized", "llvm_mono_polarized", "llvm_ad_spectral_polarized", "cuda_ad_spectral_polarized" ]

I use the git clone command with recursive flag to get mitsuba and drjit.

Description

I have met lots of errors. Most of them are similar. I show one as an example below:

In file included from /home/luiginixy/mitsuba/mitsuba3/src/core/class.cpp:1:
In file included from /home/luiginixy/mitsuba/mitsuba3/include/mitsuba/core/class.h:5:
In file included from /home/luiginixy/mitsuba/mitsuba3/include/mitsuba/mitsuba.h:30:
/home/luiginixy/mitsuba/mitsuba3/build/include/mitsuba/core/config.h:121:61: error: template argument for non-type template parameter must be an expression
    else if constexpr (std::is_same_v<Float_, dr::DiffArray<dr::CUDAArray<float>>> &&
                                                            ^~~~~~~~~~~~~~~~~~~~
/home/luiginixy/mitsuba/mitsuba3/ext/drjit/include/drjit/autodiff.h:65:22: note: template parameter is declared here
template <JitBackend Backend_, typename Value_>

For more error information plaese see this file: error.txt

Steps to reproduce

Just follow the steps on https://mitsuba.readthedocs.io/en/stable/src/developer_guide/compiling.html.

Could anyone who has successfully compiled the latest code tell me the system info? I would appreciate that.

rtabbara commented 3 months ago

Hi @LuigiNixy ,

I've cloned Mitsuba 3 again and built with the variants you've listed and am unable to reproduce the compilation errors you've encountered. My OS is Ubuntu 22.04.4 LTS and I was compiling with Clang as well.

It might be worth deleting your build directory and again walking through the build steps to regenerate the config header.

LuigiNixy commented 3 months ago

Thank you for your assistance. I discovered that the issue was related to my global configuration settings. Mitsuba is working perfectly. Apologies for any inconvenience caused.