Page MenuHome

Building Blender - Linking fails with OIDN enabled on Linux Mint 18.3
Closed, ArchivedPublic

Description

System Information
Operating system: Linux Mint 18.3
Graphics card: GTX 780m

Blender Version
Broken: 2.81 master d5192d6fd64959ccede2b9a0014f8b411dec225c 28/08/2019 17:44 +3GMT

Short description of error
Blender fails to link when OIDN is enabled producing the following error messages:

[100%] Building C object source/creator/CMakeFiles/blender.dir/buildinfo.c.o
[100%] Linking CXX executable ../../bin/blender
/opt/lib/oidn/lib/libOpenImageDenoise.a(device.cpp.o):device.cpp:function oidn::Device::commit(): error: undefined reference to 'tbb::interface7::internal::task_arena_base::internal_max_concurrency(tbb::interface7::task_arena const*)'
/opt/lib/oidn/lib/libmkldnn.a(cpu_engine.cpp.o):cpu_engine.cpp:function mkldnn_status_t mkldnn_primitive_desc::create<mkldnn::impl::cpu::jit_avx512_common_convolution_fwd_t<(mkldnn_data_type_t)1, (mkldnn_data_type_t)1, (mkldnn_data_type_t)1>::pd_t>(mkldnn_primitive_desc**, mkldnn::impl::op_desc_t const*, mkldnn_primitive_attr const*, mkldnn_engine*, mkldnn_primitive_desc const*): error: undefined reference to 'tbb::interface7::internal::task_arena_base::internal_max_concurrency(tbb::interface7::task_arena const*)'
/opt/lib/oidn/lib/libmkldnn.a(cpu_engine.cpp.o):cpu_engine.cpp:function mkldnn_status_t mkldnn_primitive_desc::create<mkldnn::impl::cpu::jit_avx512_common_convolution_winograd_fwd_t::pd_t>(mkldnn_primitive_desc**, mkldnn::impl::op_desc_t const*, mkldnn_primitive_attr const*, mkldnn_engine*, mkldnn_primitive_desc const*): error: undefined reference to 'tbb::interface7::internal::task_arena_base::internal_max_concurrency(tbb::interface7::task_arena const*)'
/opt/lib/oidn/lib/libmkldnn.a(cpu_reorder.cpp.o):cpu_reorder.cpp:function mkldnn::impl::cpu::simple_reorder_impl<(mkldnn_data_type_t)1, (mkldnn_format_tag_t)1, (mkldnn_data_type_t)1, (mkldnn_format_tag_t)1, true, mkldnn::impl::cpu::spec::direct_copy_except_dim_0>::execute(mkldnn::impl::cpu::cpu_reorder_pd_t const*, float const*, float*): error: undefined reference to 'tbb::interface7::internal::task_arena_base::internal_max_concurrency(tbb::interface7::task_arena const*)'
collect2: error: ld returned 1 exit status
source/creator/CMakeFiles/blender.dir/build.make:425: recipe for target 'bin/blender' failed
make[3]: *** [bin/blender] Error 1
CMakeFiles/Makefile2:6578: recipe for target 'source/creator/CMakeFiles/blender.dir/all' failed
make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make[1]: *** [all] Error 2
GNUmakefile:292: recipe for target 'all' failed
make: *** [all] Error 2

Full log is linked here: https://pastebin.com/JwtNPvBe

install_deps.sh completes successfully.

TBB (tbb2019_20190605oss_lin from github) is installed in /opt/tbb2019
Environment variables:

$PATH=/opt/tbb2019/include:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$LD_LIBRARY_PATH=/opt/tbb2019/lib/intel64/gcc4.7
$TBB_ROOT=/opt/tbb2019/

Exact steps for others to reproduce the error

  1. Run install_deps.sh --with-oidn
  2. Compile blender using the command provided in the BUILD_NOTES.txt
  3. Build process stops at linking stage.

Building without OIDN works normally

Event Timeline

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.EditedAug 28 2019, 6:08 PM
Brecht Van Lommel (brecht) claimed this task.

For help building Blender, please use:
https://devtalk.blender.org/c/blender/building-blender

Manually installing another TBB version is likely to give issue like this, normally TBB should be installed through install_deps already.

If you want to build with another TBB version, you need to edit CMakeCache.txt rather than setting environment variables. Setting an include directory in PATH also makes no sense.