1
$\begingroup$

I'm asking the same question at https://blenderartists.org/t/cannot-build-blender-from-source-on-ubuntu-16-04-error-at-cmake-compile/1111985

What I tried to do

I'm trying to build blender for the first time and ran into some errors during compiling. I use ubuntu 16.04.

Following the manual, I've ran:

mkdir /media/allosteric/Data/PF/BlenderBuild
cd /media/allosteric/Data//-git
git clone https://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
make update
sudo apt-get update; sudo apt-get install git build-essential
cd ..
./blender/build_files/build_environment/install_deps.sh
cd blender
make

However, this raises errors. Logs are described below. (I ran make clean;make for the second and later runs.)

Logs

Every time the log started with:

Configuring Blender in "/media/allosteric/Data/PF/BlenderBuild/build_linux" ...
-- Could NOT find Spacenav (missing:  SPACENAV_LIBRARY SPACENAV_INCLUDE_DIR) 
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   regex
--   thread
--   date_time
--   locale
--   system
--   chrono
--   atomic
-- Unsupported CFLAG: -Wrestrict
-- Unsupported CXXFLAG: -Wrestrict
-- Blender Skipping: (bf_alembic;bf_collada;bf_intern_ctr;bf_intern_opencl;bf_intern_utfconv;extern_sdlew)
-- Disabling Cycles tests because tests folder does not exist

after so, the compile halts raising errors with some varieties. The followings are some examples.

[ 42%] Building C object source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/intern/navmesh_conversion.c.o
[ 42%] Linking C static library ../../../lib/libbf_blenkernel.a
[ 42%] Built target bf_blenkernel
Makefile:160: recipe for target 'all' failed
make[1]: *** [all] Error 2
GNUmakefile:128: recipe for target 'all' failed
make: *** [all] Error 2

or

[ 35%] Building C object source/blender/windowmanager/CMakeFiles/bf_windowmanager.dir/intern/wm_stereo.c.o
[ 35%] Linking C static library ../../../lib/libbf_windowmanager.a
[ 35%] Built target bf_windowmanager
Makefile:160: recipe for target 'all' failed
make[1]: *** [all] Error 2

or

[ 35%] Building C object source/blender/windowmanager/CMakeFiles/bf_windowmanager.dir/intern/wm_stereo.c.o
[ 35%] Linking C static library ../../../lib/libbf_windowmanager.a
[ 35%] Built target bf_windowmanager
Makefile:160: recipe for target 'all' failed
make[1]: *** [all] Error 2
GNUmakefile:128: recipe for target 'all' failed
make: *** [all] Error 2

and others that I haven't kept track of.

About my PC

The OS I currently use is ubuntu 16.04 LTS. However, this is a dual-boot with a Windows 10.

The /media/allosteric/Data/PF/BlenderBuild, which is the directory I'm currently tring to build blender, is a mount of a Data Driver originally for the Windows.

My CPU is an Intel® Core™ i5-4210H CPU @ 2.90GHz × 4, which is 64-bit and GPU is GeForce GTX 950M. Thanks.

$\endgroup$
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because, unfortunately, due to their complex and unique nature, it was deemed too difficult to successfully answer questions about building Blender. See: blender.meta.stackexchange.com/questions/399/… $\endgroup$ – Ray Mairlot May 20 '18 at 13:10
  • $\begingroup$ @RayMairlot Got it. Should I simply delete this? Or should I vote for close? $\endgroup$ – Allosteric May 20 '18 at 13:14
  • 1
    $\begingroup$ For both ubuntu 14.10 and 18.04 ("bionic beaver") I have found the install_deps script has thrown some errors. Look into the script for options on disabling troublesome deps. I also find cmake_gui handy to generate the makefiles. Unfortunately my old nvidia could be of the variety that doesn't support 3.3 although its driver does, 2.8 builds Ok. but crashes at startup. $\endgroup$ – batFINGER May 20 '18 at 13:36
1
$\begingroup$

I ran sudo apt install libpng16-dev and sudo apt install libjpeg9-dev and blend was successfully compiled.

$\endgroup$
0
$\begingroup$

If you are trying to compile the new blender 2.8, you will encounter errors compiling and/or running if your GPU didn't support >=OpenGL3.3. Other causes of errors usually occur if you have a missing library or hadn't installed them. You can see the requirements at the GitHub page or from the official download site. Try running "blender/build_files/build_environment/install_deps.sh" after cloning the repo.

$\endgroup$
  • $\begingroup$ Thanks for the reply. As for the GPU I use GeForce GTX 950M which supports OpenGL4.5. As for the install._deps.sh, I already tried that several times and still didn't work. $\endgroup$ – Allosteric May 20 '18 at 12:17
  • $\begingroup$ I can see you were missing a couple of libraries $\endgroup$ – Reuben X May 24 '18 at 14:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.