Blender 2.90 Local build fails

Updates:

  • I managed to install both gcc-8 and gcc-9 (on Ubuntu 18.04). The key was to install gcc-9 first and gcc-8 after that. CUDA requires gcc-8 and fails with a different version, but Blender now requires a different version.

  • The build went better, but it still fails. Now with a different error!

[100%] Built target cycles
../../lib/libbf_intern_eigen.a(linear_solver.cc.o):linear_solver.cc:function Eigen::internal::sparse_time_dense_product_impl<Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> >, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, 1, true>::run(Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1>&, double const&) [clone ._omp_fn.0]: error: undefined reference to 'GOMP_loop_nonmonotonic_dynamic_start'
../../lib/libbf_intern_eigen.a(linear_solver.cc.o):linear_solver.cc:function Eigen::internal::sparse_time_dense_product_impl<Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> >, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, 1, true>::run(Eigen::Transpose<Eigen::SparseMatrix<double, 0, int> > const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1>&, double const&) [clone ._omp_fn.0]: error: undefined reference to 'GOMP_loop_nonmonotonic_dynamic_next'
collect2: error: ld returned 1 exit status
source/creator/CMakeFiles/blender.dir/build.make:428: recipe for target 'bin/blender' failed
make[3]: *** [bin/blender] Error 1
CMakeFiles/Makefile2:7914: 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

It seems to be related to OpenMP. I installed libomp-dev in course of previous clang attempts, but now I will try once again without it.

UPDATE I can happily report that the compilation works now. Here is the script assuming 18.04 with CUDA already installed:

sudo apt-get -qq update && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -qq update && sudo apt-get install -y build-essential git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libglew-dev gcc-9 g++-9 software-properties-common && sudo apt autoremove -y

git clone https://git.blender.org/blender.git

mkdir -p lib && cd lib && svn checkout --quiet https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64

sudo apt install -y gcc-8 g++-8
ln -sf /usr/bin/gcc-8 /usr/local/cuda/bin/gcc && ln -sf /usr/bin/g++-8 /usr/local/cuda/bin/g++

cd blender && make update

CC=gcc-9 CXX=g++-9 make #with whatever arguments 
1 Like