TylerGubala / bpy-build

Python build script for Blender as a python module
GNU General Public License v3.0
40 stars 9 forks source link

Import fails on Debian because of "MEM_JEMALLOC" bug #9

Closed TylerGubala closed 4 years ago

TylerGubala commented 4 years ago

When importing bpy in a Python Debian family linux environment, unless the cmake variable -DWITH_MEM_JEMALLOC=OFF is set during build the import segfaults with the following message:

import bpy
Traceback (most recent call last):
ImportError: /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block

The distro module should be able to detect the Linux distribution we are currently on. It returns raspbian on a Raspberry Pi (have not tested on a full fat Debian Desktop). After detecting the OS is Debian or Raspbian, it should be easy enough to add -DWITH_MEM_JEMALLOC=OFF to the list of OS build args.

See Kuro-Maii's fix