Hi Blender development forum!
I am trying to build Blender as a Python module. I am also trying to do this on Raspbian.
I know both the environment and the “as a Python module” are unsupported, but I just wanted to document some of the difficulties that I had along the way, and if anyone has any ideas for how to correct the errors, that would be much appreciated!
First off, the whole setup process is manual cmake. I basically went through some of the dependencies and installed what I could, but some functionality will not be compilable due to unavailability of some of the dependencies.
NOTE: I’m unable to build with Cycles since
OpenEXR>=2is not provided in Raspbian
What makes matters more difficult is that compiling with
make install -j 4 is unfeasible due to the low memory of the Pi (I am using Pi3). So the trial and error method is somewhat limited.
mkdir .blenderpy mkdir .blenderpy/master mkdir .blenderpy/master/build_bpy_raspbian cd .blenderpy/master git clone http://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 build_files/build_environment/install_deps.sh cd ../build_bpy_raspbian cmake ../blender -DWITH_CYCLES=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_MODULE=ON make install
[ ...] [ 29%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna.dir/dna_verify.c.o In file included from /home/tylergubala/.blenderpy/master/build_bpy_debian/source/blender/makesdna/intern/dna_verify.c:2: /home/tylergubala/.blenderpy/master/blender/source/blender/blenlib/BLI_assert.h:102:37: error: static assertion failed: "DNA struct size verify" # define BLI_STATIC_ASSERT(a, msg) _Static_assert(a, msg); ^~~~~~~~~~~~~~ /home/tylergubala/.blenderpy/master/build_bpy_debian/source/blender/makesdna/intern/dna_verify.c:6299:1: note: in expansion of macro ‘BLI_STATIC_ASSERT’ BLI_STATIC_ASSERT(sizeof(struct bGPDstroke) == 372, "DNA struct size verify"); ^~~~~~~~~~~~~~~~~ /home/tylergubala/.blenderpy/master/blender/source/blender/blenlib/BLI_assert.h:102:37: error: static assertion failed: "DNA struct size verify" # define BLI_STATIC_ASSERT(a, msg) _Static_assert(a, msg); ^~~~~~~~~~~~~~ /home/tylergubala/.blenderpy/master/build_bpy_debian/source/blender/makesdna/intern/dna_verify.c:8821:1: note: in expansion of macro ‘BLI_STATIC_ASSERT’ BLI_STATIC_ASSERT(sizeof(struct Scene) == 6092, "DNA struct size verify"); ^~~~~~~~~~~~~~~~~ make: *** [source/blender/makesdna/intern/CMakeFiles/bf_dna.dir/build.make:125: source/blender/makesdna/intern/CMakeFiles/bf_dna.dir/dna_verify.c.o] Error 1 make: *** [CMakeFiles/Makefile2:5918: source/blender/makesdna/intern/CMakeFiles/bf_dna.dir/all] Error 2 make: *** [Makefile:163: all] Error 2
I am wondering if maybe this is due to the arm 32-bit platform, and the size of various structures is different…?
Also, this seems very similar.