Testing build with the upcoming clang v11 and I find that audspace fails. The fail comes from a numpy include so the fix could be in numpy’s court.
error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
Applies to 2.83.5 and master
Tried with numpy v1.16.5 and v1.19.1
I am on freebsd 12.1. using clang v11.0 rc1 - previous clang versions work.
Config build with clang11 by passing cmake options -DCMAKE_C_COMPILER=/usr/local/bin/clang11 -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++11
[ 77%] Building CXX object extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o
[ 78%] Built target cycles_render
[ 78%] Building CXX object source/blender/freestyle/CMakeFiles/bf_freestyle.dir/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp.o
[ 78%] Building CXX object source/blender/freestyle/CMakeFiles/bf_freestyle.dir/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp.o
/home/shane/Projects/blender-bits/blender-trunk-clang11/blender/extern/audaspace/bindings/python/PySound.cpp:2019:2: error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
import_array();
^~~~~~~~~~~~~~
/usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1531:151: note: expanded from macro 'import_array'
#define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL nullptr
^~~~~~~
1 error generated.
--- extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o ---
*** [extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o] Error code 1