Closed 1languan closed 3 months ago
I'm encountering issues while compiling mitsuba3. I followed the steps outlined in the instructions for compilation, but I receive errors when changing the variant. The default variants compile normally.
System information:
OS: Ubuntu 20.04.6 LTS CPU: Intel i5-13600KF GPU: NVIDIA GeForce RTX 4060 Ti Python version: Python 3.8.10 LLVM version: 12.0.0 (output to llvm-config --version command) CUDA version: 10.2, V10.2.89 NVidia driver: 535.183.01
Dr.Jit v0.4.2 Mitsuba version: 3.5.0 Compiled with:clang 10.0.0 Variants compiled: "scalar_rgb", "scalar_spectral", "cuda_spectral", "llvm_spectral"
[947/1241] Linking CXX executable mitsuba FAILED: mitsuba : && /usr/bin/clang++-10 -stdlib=libc++ -D_LIBCPP_VERSION -fcolor-diagnostics -O3 -DNDEBUG -stdlib=libc++ src/mitsuba/CMakeFiles/mitsuba-bin.dir/mitsuba.cpp.o -o mitsuba -Wl,-rpath,/home/cx/mitsuba3/build:/home/cx/mitsuba3/build/ext/drjit/drjit: libmitsuba.so -ldl libasmjit-mitsuba.so -ldl libpng-mitsuba.so /usr/lib/x86_64-linux-gnu/libz.so -lm libpugixml.so libjpeg-mitsuba.so libIlmImf-mitsuba.so libImath-mitsuba.so libHalf-mitsuba.so libIexMath-mitsuba.so libIlmThread-mitsuba.so libIex-mitsuba.so -pthread /usr/lib/x86_64-linux-gnu/libz.so ext/drjit/drjit/libdrjit-core.so libnanothread.so ext/rgb2spec/librgb2spec.a libembree3.so && : /usr/bin/ld: libmitsuba.so: undefined reference to ad_var_inc_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_atanh' /usr/bin/ld: libmitsuba.so: undefined reference to ad_var_dec_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_erf' /usr/bin/ld: libmitsuba.so: undefined reference to jit_var_log' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_acos' /usr/bin/ld: libmitsuba.so: undefined reference to jit_var_exp' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_tan' /usr/bin/ld: libmitsuba.so: undefined reference to jit_var_cosh' /usr/bin/ld: libmitsuba.so: undefined reference toad_loop' /usr/bin/ld: libmitsuba.so: undefined reference to jit_var_asin' /usr/bin/ld: libmitsuba.so: undefined reference toad_call' /usr/bin/ld: libmitsuba.so: undefined reference to jit_var_sincos' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_atan2' clang: error: linker command failed with exit code 1 (use -v to see invocation) [968/1241] Building CXX object src/int...eFiles/volpathmis.dir/volpathmis.cpp.o ninja: build stopped: subcommand failed.
ad_var_inc_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference to
ad_var_dec_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_log' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_exp' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_cosh' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_asin' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_sincos' /usr/bin/ld: libmitsuba.so: undefined reference to
sudo apt install clang-10 libc++-10-dev libc++abi-10-dev cmake ninja-build
sudo apt install libpng-dev libjpeg-dev
sudo apt install libpython3-dev python3-distutils
sudo apt install python3-pytest python3-pytest-xdist python3-numpy
mkdir build cd build cmake -GNinja ..
Summary
I'm encountering issues while compiling mitsuba3. I followed the steps outlined in the instructions for compilation, but I receive errors when changing the variant. The default variants compile normally.
System configuration
System information:
OS: Ubuntu 20.04.6 LTS CPU: Intel i5-13600KF GPU: NVIDIA GeForce RTX 4060 Ti Python version: Python 3.8.10 LLVM version: 12.0.0 (output to llvm-config --version command) CUDA version: 10.2, V10.2.89 NVidia driver: 535.183.01
Dr.Jit v0.4.2 Mitsuba version: 3.5.0 Compiled with:clang 10.0.0 Variants compiled: "scalar_rgb", "scalar_spectral", "cuda_spectral", "llvm_spectral"
Description
[947/1241] Linking CXX executable mitsuba FAILED: mitsuba : && /usr/bin/clang++-10 -stdlib=libc++ -D_LIBCPP_VERSION -fcolor-diagnostics -O3 -DNDEBUG -stdlib=libc++ src/mitsuba/CMakeFiles/mitsuba-bin.dir/mitsuba.cpp.o -o mitsuba -Wl,-rpath,/home/cx/mitsuba3/build:/home/cx/mitsuba3/build/ext/drjit/drjit: libmitsuba.so -ldl libasmjit-mitsuba.so -ldl libpng-mitsuba.so /usr/lib/x86_64-linux-gnu/libz.so -lm libpugixml.so libjpeg-mitsuba.so libIlmImf-mitsuba.so libImath-mitsuba.so libHalf-mitsuba.so libIexMath-mitsuba.so libIlmThread-mitsuba.so libIex-mitsuba.so -pthread /usr/lib/x86_64-linux-gnu/libz.so ext/drjit/drjit/libdrjit-core.so libnanothread.so ext/rgb2spec/librgb2spec.a libembree3.so && : /usr/bin/ld: libmitsuba.so: undefined reference to
ad_var_inc_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_atanh' /usr/bin/ld: libmitsuba.so: undefined reference toad_var_dec_ref_impl' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_erf' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_log' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_acos' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_exp' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_tan' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_cosh' /usr/bin/ld: libmitsuba.so: undefined reference to
ad_loop' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_asin' /usr/bin/ld: libmitsuba.so: undefined reference to
ad_call' /usr/bin/ld: libmitsuba.so: undefined reference tojit_var_sincos' /usr/bin/ld: libmitsuba.so: undefined reference to
jit_var_atan2' clang: error: linker command failed with exit code 1 (use -v to see invocation) [968/1241] Building CXX object src/int...eFiles/volpathmis.dir/volpathmis.cpp.o ninja: build stopped: subcommand failed.Steps to reproduce
Install recent versions build tools, including Clang and libc++ (Clang's C++ library)
sudo apt install clang-10 libc++-10-dev libc++abi-10-dev cmake ninja-build
Install libraries for image I/O
sudo apt install libpng-dev libjpeg-dev
Install required Python packages
sudo apt install libpython3-dev python3-distutils
For running tests
sudo apt install python3-pytest python3-pytest-xdist python3-numpy
Create a directory where build products are stored
mkdir build cd build cmake -GNinja ..