Building blender in Ubuntu 18 fails without error output

So I build dependencies with > ./blender/build_files/build_environment/install_deps.sh

Everything goes well, then I run :

make -j12 BUILD_CMAKE_ARGS="-U SNDFILE -U PYTHON* -U BOOST -U Boost -U OPENCOLORIO -U OPENEXR -U OPENIMAGEIO -U LLVM -U CYCLES -U OPENSUBDIV -U OPENVDB -U COLLADA -U FFMPEG -U ALEMBIC -U USD -D WITH_CODEC_SNDFILE=ON -D PYTHON_VERSION=3.7 -D WITH_OPENCOLORIO=ON -D OPENCOLORIO_ROOT_DIR=/opt/lib/ocio -D OPENEXR_ROOT_DIR=/opt/lib/openexr -D WITH_OPENIMAGEIO=ON -D OPENIMAGEIO_ROOT_DIR=/opt/lib/oiio -D WITH_CYCLES_OSL=ON -D WITH_LLVM=ON -D LLVM_VERSION=6.0 -D OSL_ROOT_DIR=/opt/lib/osl -D WITH_OPENSUBDIV=ON -D OPENSUBDIV_ROOT_DIR=/opt/lib/osd -D WITH_OPENVDB=ON -D WITH_OPENVDB_BLOSC=ON -D OPENVDB_ROOT_DIR=/opt/lib/openvdb -D BLOSC_ROOT_DIR=/opt/lib/blosc -D WITH_ALEMBIC=ON -D ALEMBIC_ROOT_DIR=/opt/lib/alembic -D WITH_USD=ON -D USD_ROOT_DIR=/opt/lib/usd -D WITH_CODEC_FFMPEG=ON -D FFMPEG_LIBRARIES=‘avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;theora;theoradec;theoraenc;vorbis;vorbisenc;vorbisfile;ogg;x264;openjp2’ -D WITH_XR_OPENXR=ON -D XR_OPENXR_SDK_ROOT_DIR=/opt/lib/xr-openxr-sdk"

Wich is the recommended cmake output from install_deps.sh, but I get:

[ 53%] Linking C static library …/…/…/lib/libbf_draw.a
[ 53%] Built target bf_draw
[ 53%] Linking CXX static library …/…/lib/libextern_ceres.a
[ 53%] Built target extern_ceres
Makefile:182: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
GNUmakefile:299: recipe for target ‘all’ failed
make: *** [all] Error 2

EDIT: Running it with VERBOSE=1 I get the following output:

[ 48%] Built target bf_blenkernel
make -f source/blender/blenlib/CMakeFiles/bf_blenlib.dir/build.make source/blender/blenlib/CMakeFiles/bf_blenlib.dir/depend
make[2]: Entering directory ‘/home/xavier/blender-git/build_linux’
cd /home/xavier/blender-git/build_linux && /usr/bin/cmake -E cmake_depends “Unix Makefiles” /home/xavier/blender-git/blender /home/xavier/blender-git/blender/source/blender/blenlib /home/xavier/blender-git/build_linux /home/xavier/blender-git/build_linux/source/blender/blenlib /home/xavier/blender-git/build_linux/source/blender/blenlib/CMakeFiles/bf_blenlib.dir/DependInfo.cmake --color=
make[2]: Leaving directory ‘/home/xavier/blender-git/build_linux’
make -f source/blender/blenlib/CMakeFiles/bf_blenlib.dir/build.make source/blender/blenlib/CMakeFiles/bf_blenlib.dir/build
make[2]: Entering directory ‘/home/xavier/blender-git/build_linux’
[ 48%] Building CXX object source/blender/blenlib/CMakeFiles/bf_blenlib.dir/intern/task_pool.cc.o
cd /home/xavier/blender-git/build_linux/source/blender/blenlib && /usr/bin/c++ -DNDEBUG -DWITH_ASSERT_ABORT -DWITH_OPENGL -DWITH_TBB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/home/xavier/blender-git/blender/source/blender/blenlib -I/home/xavier/blender-git/blender/source/blender/makesdna -I/home/xavier/blender-git/blender/intern/atomic -I/home/xavier/blender-git/blender/intern/eigen -I/home/xavier/blender-git/blender/intern/guardedalloc -I/home/xavier/blender-git/blender/intern/numaapi/include -I/home/xavier/blender-git/blender/extern/wcwidth -isystem /usr/include/freetype2 -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wuninitialized -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -fuse-ld=gold -fopenmp -std=c++11 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -msse2 -O2 -DNDEBUG -o CMakeFiles/bf_blenlib.dir/intern/task_pool.cc.o -c /home/xavier/blender-git/blender/source/blender/blenlib/intern/task_pool.cc
In file included from /usr/include/tbb/flow_graph.h:30:0,
from /usr/include/tbb/tbb.h:53,
from /home/xavier/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:39:
/usr/include/tbb/task.h: In instantiation of ‘tbb::internal::function_task::function_task(const F&) [with F = Task]’:
/usr/include/tbb/task_group.h:100:25: required from ‘void tbb::internal::task_group_base::internal_run(F&) [with F = const Task; Task = tbb::internal::function_task]’
/usr/include/tbb/task_group.h:179:60: required from ‘void tbb::task_group::run(const F&) [with F = Task]’
/home/xavier/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:198:40: required from here
/usr/include/tbb/task.h:930:48: error: use of deleted function ‘Task::Task(const Task&)’
function_task( const F& f ) : my_func(f) {}
^
/home/xavier/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:97:3: note: declared here
Task(const Task &other) = delete;
^~~~
source/blender/blenlib/CMakeFiles/bf_blenlib.dir/build.make:1109: recipe for target ‘source/blender/blenlib/CMakeFiles/bf_blenlib.dir/intern/task_pool.cc.o’ failed
make[2]: *** [source/blender/blenlib/CMakeFiles/bf_blenlib.dir/intern/task_pool.cc.o] Error 1
make[2]: Leaving directory ‘/home/xavier/blender-git/build_linux’
CMakeFiles/Makefile2:5761: recipe for target ‘source/blender/blenlib/CMakeFiles/bf_blenlib.dir/all’ failed
make[1]: *** [source/blender/blenlib/CMakeFiles/bf_blenlib.dir/all] Error 2
make[1]: Leaving directory ‘/home/xavier/blender-git/build_linux’
Makefile:182: recipe for target ‘all’ failed
make: *** [all] Error 2

I have searched on Google but I can’t find any reference, any help will be appreciated

EDIT: Solved it by building a previous version, following another post on this board

git checkout blender-v2.83-release
make update
make

Thank you

Have come to the same error building head on ubuntu 18. In as much as can checkout and build the 2.83 branch as suggested, would like to know what causes the above error, and how to fix.

Recent changes require TBB version 2018 or newer. We still have the find the right solution for that, either making it work with older TBB or increasing our minimum requirements.

The simple solution for now is to use precompiled libraries, which is the recommended way to build Blender when possible:
https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu

Building with install_deps.sh and TBB version 2017 should work again now.

1 Like

Thankyou for the quick reply. Can confirm all good building against tbb_2017 (ubuntu default) as well as with https://github.com/oneapi-src/oneTBB/archive/tbb_2018.zip added to blender_deps and built in /opt

Will try getting “ahead of the game” with 2020 later.

For others that may have come up against this and are loath to unleash install_deps again, and who also use cmake:

Suggest build tbb2019 from https://github.com/wjakob/tbb into /opt/lib/tbb Use blosc etc from other built blender deps. Rebuild openvdb using new tbb

Now all is working fine.

Using the tbb precompiled (gcc4.8) libs from official tbb site was a nightmare of cryptic linker messages.

1 Like