Building blender fails in gentoo linux

I tried to build blender master branch by following instructions on official building blender wiki page on my gentoo linux system.
I ran make in blender directory and i get errors.

compilation terminated.
make[3]: *** [extern/audaspace/CMakeFiles/audaspace-py.dir/build.make:154: extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:2767: extern/audaspace/CMakeFiles/audaspace-py.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs…

make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:278: all] Error 2

can anyone please help me understand what is causing the error.

Hi @sanath,

Welcome!

The part of the log you pasted didn’t contain the actual error message. Please build with one process only (make -j1) and post the entire log if you are unsure what the error is, otherwise post that actual error.

/Nathan

1 Like

thank you, sure i will do that. Currently i’m doing manual cmake setup. I’ll let you know once it is done.

this is the output of make

[ 0%] Built target bf_intern_clog
[ 0%] Built target bf_intern_string
[ 1%] Built target bf_intern_ghost
[ 1%] Built target bf_intern_guardedalloc
[ 2%] Built target bf_intern_libmv
[ 2%] Built target bf_intern_memutil
[ 3%] Built target bf_intern_numaapi
[ 3%] Built target bf_intern_opencolorio
[ 3%] Built target bf_intern_opensubdiv
[ 3%] Built target bf_intern_mikktspace
[ 3%] Built target bf_intern_glew_mx
[ 3%] Built target bf_intern_eigen
[ 4%] Built target bf_intern_audaspace
[ 4%] Built target bf_intern_dualcon
[ 5%] Built target bf_intern_elbeem
[ 5%] Built target bf_intern_smoke
[ 5%] Built target bf_intern_iksolver
[ 6%] Built target bf_intern_itasc
[ 6%] Built target bf_dna_blenlib
[ 7%] Built target makesdna
[ 7%] Built target bf_dna
[ 9%] Built target makesrna
[ 11%] Built target bf_rna
[ 11%] Built target bf_intern_cycles
[ 12%] Built target cycles_render
[ 13%] Built target cycles_bvh
[ 13%] Built target extern_cuew
[ 13%] Built target extern_clew
[ 13%] Built target cycles_device
[ 13%] Built target cycles_graph
[ 14%] Built target cycles_kernel
[ 14%] Built target cycles_subd
[ 14%] Built target cycles_util
[ 14%] Built target bf_intern_locale
[ 14%] Built target bf_intern_rigidbody
[ 15%] Built target extern_curve_fit_nd
[ 15%] Built target extern_rangetree
[ 15%] Built target extern_wcwidth
[ 19%] Built target extern_bullet
[ 21%] Built target dracoenc
[ 21%] Built target extern_draco
[ 21%] Built target extern_binreloc
[ 21%] Built target extern_glew
[ 21%] Built target extern_minilzo
[ 21%] Built target extern_lzma
[ 21%] Built target extern_xdnd
[ 23%] Built target extern_ceres
[ 23%] Built target extern_gflags
[ 23%] Built target extern_glog
[ 25%] Built target audaspace
[ 25%] Building CXX object extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o
cc1plus: warning: /home/sanath.shetty/blender-git/master/blender/extern/audaspace/PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include: No such file or directory [-Wmissing-include-dirs]
/home/sanath.shetty/blender-git/master/blender/extern/audaspace/bindings/python/PySound.cpp:70:33: fatal error: numpy/ndarrayobject.h: No such file or directory
#include <numpy/ndarrayobject.h>
^
compilation terminated.
make[2]: *** [extern/audaspace/CMakeFiles/audaspace-py.dir/build.make:154: extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2767: extern/audaspace/CMakeFiles/audaspace-py.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

The PYTHON_NUMPY_PATH-NOTFOUND part stands out to me. Maybe take a look at your configured make options, specifically the ones for the paths for numpy.

1 Like

Thank you, I changed the python numpy path in CMakeCache.txt to /usr/lib64/python3.6/site-packages and make was sucessfull and then i did make install.
Now when i ran blender from bin directory, i get

Blockquote
/run/user/10048/gvfs/ non-existent directory
Read prefs: /home/sanath.shetty/.config/blender/2.81/config/userpref.blend
found bundled python: /home/sanath.shetty/blender-git/master/build/bin/2.81/python
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named ‘encodings’
Current thread 0x00007f8530a26280 (most recent call first):
Aborted (core dumped)

and blender closes.

Not quite sure. In my 2.8 (not quite master, but close enough), I have a PYTHON_NUMPY_PATH value of /usr/lib/python3/dist-packages, but I also have Python 3.7, not 3.6. I am not familiar enough to know what might be the problem module that you are missing from your system Python to get Blender building. Perhaps wait for a dev to chime in.

1 Like