Blender 2.90 Local build fails

My last successful build of Blender 2.90 was on Thursday 9 July.
On Friday my build finished with a make error:

make[3]: *** No rule to make target ‘/home/richard/src/blender-git/lib/linux_centos7_x86_64/openimagedenoise/lib/libmkldnn.a’, needed by ‘bin/blender’. Stop.

Coincidentally I had just heard Pablo Vazquez, in his live Q&A stream, say that he had had difficulty compiling Blender too.

I note that Brecht van Lommel committed a change on Saturday which might have fixed the issue:

commit 6fbacd6048c555011b8a75fb5439679366272c0e
Author: Brecht Van Lommel [email protected]
Date: Fri Jul 10 19:56:53 2020 +0200

Fix build error building without OpenImageDenoise

However the make error is still there.

I tried following the advice in the Blender compile HowTo notes which was to clean the build_linux directory and try again before concluding there is a bug.The build still fails, but with linker errors summarised below:

llvm/lib/libLLVMMCJIT.a(MCJIT.cpp.o):MCJIT.cpp
    error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)
llvm/lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o):RuntimeDyld.cpp
    error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)
llvm/lib/libLLVMDebugInfoDWARF.a(DWARFContext.cpp.o):DWARFContext.cpp
    error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)
opencolorio/lib/libOpenColorIO.a(Config.cpp.o):Config.cpp
    error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()
opencolorio/lib/libOpenColorIO.a(OCIOYaml.cpp.o):OCIOYaml.cpp
    error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()
boost/lib/libboost_locale.a(numeric.o):numeric.cpp
    error: undefined reference to 'std::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream()

I have been producing my own daily builds for a couple of weeks and this is the first time I have hit a major stumbling block. I am confused by the changed nature of the linking failure and, incidentally, I am at a loss to understand how or why the failure to detect OPEN_MP has been present since my first successful builds.

The result is I am uncertain which of my link failures represents “the bug” or if there may be two or more bugs (OPEN_MP?) which must be addressed individually. Or is it just that my build environment is somehow flaky? I would be grateful for any help or guidance on how to determine what bug I should perhaps report.

Richard

1 Like

Please rerun make and upload the full crash log https://pastebin.com.
Also, @JuanGea afai-remember, you had the same error. Could you help ?

I have a similar issue and cannot compile/link anymore. The make[3] error message is not the same but the other error messages are similar. I have posted my make output here: https://pasteall.org/rnRp

@ronsn the GCC version, GNU 7.5.0 is below the required 9.3.1 https://wiki.blender.org/wiki/Building_Blender#Compiler_Versions . Also, the c++ version was bumped up to C++17.

Also, later on, if CUDA complains, see this post: Wrong GCC version For CUDA (Linux) -- How to solve

Please rerun make
Thanks ankitm, you neatly illustrate my problem; should I focus on the linker error which cannot find libmkldnn.a from openimagedenoise or on the multiple link failures involving llvm, boost and opencolorio?

The first will be encountered when I ‘make update; make’ starting from the working Thursday 9th July code. The second results from blowing away the build directory and doing the same ‘make update; make’.

The possibly related missing OpenMP issue is present in either course of action. Should I treat that as a separate bug?

I can provide both build histories if you think they would both be useful.

@ankitm Thank you very much! Is that new? I compiled Blender the whole time with that version. I only updated cmake because the new version USD-20.05 was throwing an error.

Edited: Yes it is new, that gcc has to be present in the version 9.3.x . But indeed I have the issue with Cuda:

error: #error – unsupported GNU version! gcc versions later than 8 are not supported!

Is that a joke? :face_with_raised_eyebrow:
:joy::joy:

'fraid not! I am in the middle of reviewing a long thread on the mageia dev mailing list which started on July 4. They are discussing how to handle the problem in the upcoming Mageia 8 release. Mageia 8 will ship with gcc10 (I run the current Mageia 7 with gcc8) and the discussion is whether we should include a gcc9 compat package to support compiling CUDA 10 cubins (apparently is still works when using gcc9.3) or just suck it up and wait for Nvidia and Blender to move to gcc10 - or something like that.

Richard

The openimagedenoise is due to bad cache in cmakecache.txt file. Deleting it is the surefire way to make sure that it doesn’t happen again.

This is something we need to solve. See the log uploaded by ronsn. At the top it mentioned the GCC version which was helpful to narrow down the cause.

I can find this Building Blender on Kubuntu 19.10 - #4 by ideasman42 post from last year. But the advice is still the same. Open cmakecache.txt file, search for openmp, manually enter the path to the lib folder of openmp and rerun make.

No only the openmp + OCIO one is required. Also, upload cmakecache.txt file from the build folder.

Remember to use precompiled libraries: Building Blender/Linux/Ubuntu - Blender Developer Wiki

It happened last month I guess. See the wiki history.

That was almost predictable :wink: there was a conversation about it in blender.chat.

I hope I have everything you need here. I have tried pasting the 1.2MBytes of the build output at pastebin, but it seems it is too big for the account I have just created!

  **System Information**
  Operating system: Linux-5.6.14-desktop-2.mga7-x86_64-with-mageia-7-Official 64 Bits
  Graphics card: AMD KAVERI (DRM 3.36.0, 5.6.14-desktop-2.mga7, LLVM 8.0.0) X.Org 4.6 (Core Profile) Mesa 20.0.7
  GPU rendering on ‎GP107 [GeForce GTX 1050 Ti], NVIDIA GeForce 635 series and later, driver v 430.64 and CUDA toolkit 10.1.168

System gcc is 8.4, llvm and clang are 8.0.0, boost is 1.68.0 and the only reference I can find on my system to OpenMP is in /usr/include/boost, so I suppose the build uses what is provided in my blender-git/lib/linux_centos7_x86_64/boost.

The attached file is the build output which I think you wanted…

build_failure-2020-07-15_20:30.txt (1.2 MB)

Here is the generated cmakecache file:

CMakeCache.txt (118.9 KB)

Richard

Thank you! Sorry for the pastebin thing. you may also use https://developer.blender.org/file/upload/ for files.

The compiler version is still old.

-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0

It seems @ronsn updated the GCC version and overcame OCIO error and then got stuck at the CUDA-GCC problem. Also, Blender Build Problems here, the same OCIO undefined reference problem is solved by removing the older GCC and then OP is stuck at OpenMP problem.

So either you update GCC, or use clang as (this is NOT tested to work):

mkdir build_clang
cd blender
CC=clang CXX=clang++ make -B ../build_clang -S .
cd ../build_clang
make install
I guess you might have to change cmake linker too.

Hmmm. That could be a problem. I am pretty certain my skills are not up to the task of building and installing an optional GCC (9.3 seems the best bet) and then figuring out a way to get CUDA 10 to use my system gcc8.4 (to keep it happy) or even fool it into using the optional gcc9.3 for Blender renders (it is rumoured to work with gcc9.3).

The problem then arises when I update to Mageia 8 in a few weeks and have to contend with a system gcc10. Whether Nvidia’s next CUDA toolkit will be updated to use a more modern gcc is another imponderable and I don’t know if there is anything on the horizon from the Jolly Green Giant.

Too many moving targets for me I’m afraid. When did Blender’s gcc requirement shift to 9.3? I reckon I’ll just hang fire until things calm down a bit and make do with the nightly builds from Blender for the next few months.

Nevertheless, I will give your clang suggestion a try - later - probably much later; more coffee and more reading needed before I would feel up to it.

Richard

GCC required version was bumped on June 18-19 in order to solve a codegen issue.
Developer.blender.org/T76783#956716

@jaywalker What operating system are you using right now? And which of those Links to compile Blender were you following here https://wiki.blender.org/wiki/Building_Blender/Linux ? Ubuntu? Fedora?

The short answer is Mageia release 7 (Official) for x86_64 and I used the “Generic Distro” instructions.

The long answer? Mageia is derived from the Red Hat->Mandrake->Mandriva line. The most relevant deviation from its Red Hat ancestor is the attention given to “standardising” package naming in a way which can make it awkward to use if only Red Hat/Fedora package names are available in, for example, the Blender install_deps.sh script.

My first attempt at building Blender locally was about a year ago. At that time I wanted to use as many system libraries as possible so I had a go at providing a Mageia section in install_deps.sh but it proved to be easier to use our Mageia Blender 2.79 source package and convert the spec file to build 2.80 (with LOTS of help from Mageia devs!).

I came back to trying to build from sources a few weeks ago when I was inspired by Pablo Vazquez’s video on building Blender and it didn’t take long to have my first
build running using the centos7_x86_64 static libraries.

A week or so later I encountered a bug in AMD’s interpretaion of OpenGL defaults which prevented Blender 2.90 from starting. The bug has been fixed, but I still build (built) locally for the fun of it :~)

I’ve got the same issue (edit: apparently not, simple fix below, thanks @ankitm ) on MacOS Mojave. Disabling OIDN makes the build succeed, even with Embree and OpenMP.

Build fails at the end when OIDN is enabled:

[100%] Built target bf_compositor
Scanning dependencies of target blender
make[3]: *** No rule to make target /blender/lib/darwin/openimagedenoise/lib/libmkldnn.a', needed by `bin/Blender.app/Contents/MacOS/Blender'.  Stop.
make[3]: *** Waiting for unfinished jobs....

That is different and you can either delete the CMakeCache.txt file in the build folder, or delete the build folder itself, to fix it.

Thanks! Deleting CMakeCache.txt wasn’t enough but clearing the whole build folder and recompiling did it.

I have probably the same issue with the master branch head. My setup worked perfectly in June, but at some point in July linking started to crash. I always build from scratch in a clean container.

[100%] Linking CXX executable ../../bin/blender
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMMCJIT.a(MCJIT.cpp.o):MCJIT.cpp:function std::_Sp_counted_ptr_inplace<llvm::SectionMemoryManager, std::allocator<llvm::SectionMemoryManager>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o):RuntimeDyld.cpp:function std::_Sp_counted_ptr_inplace<std::__future_base::_State_baseV2, std::allocator<std::__future_base::_State_baseV2>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o):RuntimeDyld.cpp:function std::_Sp_counted_ptr_inplace<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > >, std::allocator<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > > >, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMDebugInfoDWARF.a(DWARFContext.cpp.o):DWARFContext.cpp:function std::_Sp_counted_ptr_inplace<llvm::DWARFContext::DWOFile, std::allocator<llvm::DWARFContext::DWOFile>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function OSL_v1_10::pvt::OSLCompilerImpl::write_oso_const_value(OSL_v1_10::pvt::ConstantSymbol const*) const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function OSL_v1_10::pvt::OSLCompilerImpl::write_oso_const_value(OSL_v1_10::pvt::ConstantSymbol const*) const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function OSL_v1_10::pvt::OSLCompilerImpl::write_oso_const_value(OSL_v1_10::pvt::ConstantSymbol const*) const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function OSL_v1_10::pvt::OSLCompilerImpl::write_oso_const_value(OSL_v1_10::pvt::ConstantSymbol const*) const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function void boost::wave::util::throw_<boost::wave::preprocess_exception, boost::wave::context<__gnu_cxx::__normal_iterator<char*, std::string>, boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::iteration_context_policies::load_file_to_string, boost::wave::context_policies::eat_whitespace<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::this_type>, char const*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > >(boost::wave::context<__gnu_cxx::__normal_iterator<char*, std::string>, boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::iteration_context_policies::load_file_to_string, boost::wave::context_policies::eat_whitespace<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::this_type>&, boost::wave::preprocess_exception::error_code, char const*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > const&): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function void boost::wave::util::throw_<boost::wave::macro_handling_exception, char const*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > >, char const*>(boost::wave::macro_handling_exception::error_code, char const*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > const&, char const*): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function void boost::wave::util::throw_<boost::wave::preprocess_exception, boost::wave::context<__gnu_cxx::__normal_iterator<char*, std::string>, boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::iteration_context_policies::load_file_to_string, boost::wave::context_policies::eat_whitespace<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::this_type>, char*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > >(boost::wave::context<__gnu_cxx::__normal_iterator<char*, std::string>, boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::iteration_context_policies::load_file_to_string, boost::wave::context_policies::eat_whitespace<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::wave::this_type>&, boost::wave::preprocess_exception::error_code, char*, boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > const&): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/osl/lib/liboslcomp.a(oslcomp.cpp.o):oslcomp.cpp:function void boost::wave::cpplexer::impl::validate_literal<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > >(boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > const&, unsigned long, unsigned long, boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > const&): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
collect2: error: ld returned 1 exit status
intern/cycles/app/CMakeFiles/cycles.dir/build.make:356: recipe for target 'bin/cycles' failed
make[3]: *** [bin/cycles] Error 1
CMakeFiles/Makefile2:1137: recipe for target 'intern/cycles/app/CMakeFiles/cycles.dir/all' failed
make[2]: *** [intern/cycles/app/CMakeFiles/cycles.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMMCJIT.a(MCJIT.cpp.o):MCJIT.cpp:function std::_Sp_counted_ptr_inplace<llvm::SectionMemoryManager, std::allocator<llvm::SectionMemoryManager>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o):RuntimeDyld.cpp:function std::_Sp_counted_ptr_inplace<std::__future_base::_State_baseV2, std::allocator<std::__future_base::_State_baseV2>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o):RuntimeDyld.cpp:function std::_Sp_counted_ptr_inplace<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > >, std::allocator<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > > >, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/llvm/lib/libLLVMDebugInfoDWARF.a(DWARFContext.cpp.o):DWARFContext.cpp:function std::_Sp_counted_ptr_inplace<llvm::DWARFContext::DWOFile, std::allocator<llvm::DWARFContext::DWOFile>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&): error: undefined reference to 'std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(Config.cpp.o):Config.cpp:function OpenColorIO::v1::Config::sanityCheck() const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(Config.cpp.o):Config.cpp:function OpenColorIO::v1::Config::sanityCheck() const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(Config.cpp.o):Config.cpp:function OpenColorIO::v1::Config::sanityCheck() const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(Config.cpp.o):Config.cpp:function OpenColorIO::v1::Config::sanityCheck() const: error: undefined reference to 'std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(OCIOYaml.cpp.o):OCIOYaml.cpp:function OpenColorIO::v1::(anonymous namespace)::save(YAML::Emitter&, std::tr1::shared_ptr<OpenColorIO::v1::Transform const>): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(OCIOYaml.cpp.o):OCIOYaml.cpp:function OpenColorIO::v1::(anonymous namespace)::save(YAML::Emitter&, std::tr1::shared_ptr<OpenColorIO::v1::Transform const>): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(OCIOYaml.cpp.o):OCIOYaml.cpp:function OpenColorIO::v1::(anonymous namespace)::save(YAML::Emitter&, std::tr1::shared_ptr<OpenColorIO::v1::Transform const>): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
/content/lib/linux_centos7_x86_64/opencolorio/lib/libOpenColorIO.a(OCIOYaml.cpp.o):OCIOYaml.cpp:function OpenColorIO::v1::(anonymous namespace)::save(YAML::Emitter&, OpenColorIO::v1::Config const*): error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
collect2: error: ld returned 1 exit status
source/creator/CMakeFiles/blender.dir/build.make:429: recipe for target 'bin/blender' failed
make[3]: *** [bin/blender] Error 1
CMakeFiles/Makefile2:7973: 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:308: recipe for target 'all' failed
make: *** [all] Error 2

Before I get a lot of warnings

-- Using pre-compiled LIBDIR: /content/blender/../lib/linux_centos7_x86_64
CMake Warning at /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  build_files/cmake/platform/platform_unix.cmake:305 (find_package)
  CMakeLists.txt:830 (include)


CMake Warning at /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  build_files/cmake/platform/platform_unix.cmake:305 (find_package)
  CMakeLists.txt:830 (include)

The same as above repeats many times. This is the compiler report:

-- Boost version: 1.70.0
-- Found the following Boost libraries:
--   filesystem
--   regex
--   thread
--   date_time
--   wave
--   iostreams
--   system
--   chrono
--   atomic
--   serialization
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Unsupported CFLAG: -Wabsolute-value
-- CUDA nvcc = /usr/local/cuda/bin/nvcc
-- cycles_cubin_cc not supported for CUDA 10.0+, using nvcc instead.
-- Tests: Using Python executable: /content/lib/linux_centos7_x86_64/python/bin/python3.7m
-- Disabling render tests because tests folder does not exist at /content/blender/../lib/tests
-- Configuring done
-- Generating done
-- Build files have been written to: /content/build_linux

I tried to install gcc-9 and g++9 via package manager as suggested above, but it conflicts with libjpeg and so it won’t install. Perhaps that is due to gcc8 being installed as well, but as far as I know, gcc8 is required for CUDA compilation, so I am stuck.

Can you use clang ? Manually specify the compiler and linker and it may work.

I was discouraged by the need to use a later gcc than my system gcc 8.4 as I have no skills in setting up or trouble-shooting build environments but I gave it a go with a gcc 9.3 which was configured to install, alongside the system gcc, so in a different location.

By trial and error I discovered that I could get a successful build by invoking make with some extra parameters for cmake. It isn’t perfect, there is still a problem for OpenMP, but everything else seems to work and I have been using it for a few days now.

The script I use is crude, but effective. I keep it in my blender-git directory. After doing the usual make update in blender-git/blender, I cd … and execute the script:

#!/bin/sh

Building Blender with optional gcc9 in

/usr/lib/compat-cuda-gcc9/

cd blender

export BUILD_CMAKE_ARGS="-D CMAKE_CXX_COMPILER=/usr/lib/compat-cuda-gcc9/bin/c++
-D CMAKE_CXX_COMPILER_AR=/usr/lib/compat-cuda-gcc9/bin/gcc-ar
-D CMAKE_CXX_COMPILER_RANLIB=/usr/lib/compat-cuda-gcc9/bin/gcc-ranlib
-D CMAKE_C_COMPILER=/usr/lib/compat-cuda-gcc9/bin/gcc
-D CMAKE_C_COMPILER_AR=/usr/lib/compat-cuda-gcc9/bin/gcc-ar
-D CMAKE_C_COMPILER_RANLIB=/usr/lib/compat-cuda-gcc9/bin/gcc-ranlib
-D OpenMP_gomp_LIBRARY=/usr/lib/compat-cuda-gcc9/lib64/libgomp.a "
#echo $BUILD_CMAKE_ARGS
make

As a side-note, the gcc9 package was named compat-cuda because it was created to explore a method, in upcoming Mageia 8, to avoid CUDA issues due to the planned system gcc being 10.1. I suppose any other name would do. Could you extract the necessary bits from your system’s 9.3 package and manually install it somewhere else? Then you could just substitute your path to gcc9 where I have used /usr/lib/compat-cuda-gcc9/

I am still looking for a solution for OpenMP, and, I think, some of the new workspace denoise options, but this definitely gets a usable Blender 2,91 from the the git master sources.

Hope you can get something useful from this.