build failure - error: dereferencing pointer to incomplete type
Closed this issue · 6 comments
Hi,
I'm on Manjaro stable and trying to build your package, but it does not work.
The problem is:
error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
Here are the relevant parts of the build output:
Click to expand
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/intern/gpu.c: In function ‘GPU_initPython’:
[ 57%] Building C object source/blender/python/generic/CMakeFiles/bf_python_ext.dir/blf_py_api.c.o
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/intern/gpu.c:326:53: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
326 | PyObject *sys_modules = PyThreadState_GET()->interp->modules;
| ^~
[ 57%] Linking C static library ../../../lib/libbf_avi.a
make[2]: *** [source/blender/python/intern/CMakeFiles/bf_python.dir/build.make:63: source/blender/python/intern/CMakeFiles/bf_python.dir/gpu.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:6292: source/blender/python/intern/CMakeFiles/bf_python.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 57%] Building C object source/blender/python/generic/CMakeFiles/bf_python_ext.dir/bpy_internal_import.c.o
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_sepcombYCCA.c.o
[ 57%] Built target bf_avi
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_sepcombYUVA.c.o
[ 57%] Building C object source/blender/python/generic/CMakeFiles/bf_python_ext.dir/bpy_threads.c.o
[ 57%] Building C object source/blender/python/generic/CMakeFiles/bf_python_ext.dir/idprop_py_api.c.o
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_setalpha.c.o
[ 57%] Linking CXX static library ../../../../../lib/libbf_imbuf_dds.a
[ 57%] Building C object source/blender/python/generic/CMakeFiles/bf_python_ext.dir/py_capi_utils.c.o
[ 57%] Building C object source/blender/modifiers/CMakeFiles/bf_modifiers.dir/intern/MOD_lattice.c.o
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_splitViewer.c.o
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1169:2: warning: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
1169 | NULL, /* printfunc tp_print; */
| ^~~~
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1169:2: note: (near initialization for ‘BPy_IDGroup_Type.tp_vectorcall_offset’)
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1563:2: warning: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
1563 | NULL, /* printfunc tp_print; */
| ^~~~
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1563:2: note: (near initialization for ‘BPy_IDArray_Type.tp_vectorcall_offset’)
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1678:2: warning: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
1678 | NULL, /* printfunc tp_print; */
| ^~~~
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1678:2: note: (near initialization for ‘BPy_IDGroup_Iter_Type.tp_vectorcall_offset’)
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c: In function ‘BPyInit_idprop’:
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/idprop_py_api.c:1795:53: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
1795 | PyObject *sys_modules = PyThreadState_GET()->interp->modules;
| ^~
make[2]: *** [source/blender/python/generic/CMakeFiles/bf_python_ext.dir/build.make:115: source/blender/python/generic/CMakeFiles/bf_python_ext.dir/idprop_py_api.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 57%] Built target bf_imbuf_dds
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_stabilize2d.c.o
[ 57%] Building C object source/blender/bmesh/CMakeFiles/bf_bmesh.dir/tools/bmesh_beautify.c.o
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_sunbeams.c.o
[ 57%] Building C object source/blender/modifiers/CMakeFiles/bf_modifiers.dir/intern/MOD_mask.c.o
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/py_capi_utils.c: In function ‘PyC_DefaultNameSpace’:
/var/tmp/pamac-build-urs/blender-fracture_modifier-git/src/blender/source/blender/python/generic/py_capi_utils.c:643:29: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
643 | PyDict_SetItemString(interp->modules, "__main__", mod_main);
| ^~
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_texture.c.o
make[2]: *** [source/blender/python/generic/CMakeFiles/bf_python_ext.dir/build.make:128: source/blender/python/generic/CMakeFiles/bf_python_ext.dir/py_capi_utils.c.o] Error 1
[ 57%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/composite/nodes/node_composite_tonemap.c.o
[ 61%] Building C object source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/intern/idcode.c.o
make[1]: *** [CMakeFiles/Makefile2:6319: source/blender/python/generic/CMakeFiles/bf_python_ext.dir/all] Error 2
[ 61%] Building C object source/blender/nodes/CMakeFiles/bf_nodes.dir/shader/nodes/node_shader_hueSatVal.c.o
[ 74%] Built target bf_compositor
make: *** [Makefile:163: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
These seem related, but still I have no idea how to solve this:
https://bugzilla.redhat.com/show_bug.cgi?id=1717013
psycopg/psycopg2#854
Please help.
Should be fixed now.
I've updated the non-conflicting workaround, now shares are dumped in to /usr/share/blender/2.79_fracture_modifier
.
Let me know if fracture
is working - I've just tested if it installs, runs, and don't conflict with blender-2.7
btw.
patch was already in `AUR/blender-2.7` just forgot to port it here, thanks for the tip 😏Thank you for looking into it!
Unfortunately, it does not work yet:
Preparing...
Cloning blender-fracture_modifier-git build files...
Checking blender-fracture_modifier-git dependencies...
Resolving dependencies...
Checking inter-conflicts...
Building blender-fracture_modifier-git...
==> Making package: blender-fracture_modifier-git 2.79b.r2169.g233ad61cb8d-1 (Fr 07 Feb 2020 01:06:07 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
-> cuda
==> ERROR: Could not resolve all dependencies.
@Urs11 It works fine, it's a yay
specific quirk. Just install cuda beforehand. There's a disclaimer in the AUR comment.
Sorry, I ignored the disclaimer since I don't have a nvidia card.
No idea how to set an env variables for pamac gui, so I installed it from the terminal with
DISABLE_CUDA=1 pamac install blender-fracture_modifier-git
We are making progress, but it's still not working:
/usr/include/OpenEXR/ImathMatrix.h:425:26: note: ‘OSL_v1_10::Matrix44’ {aka ‘class Imath_2_4::Matrix44<float>’} declared here
425 | template <class T> class Matrix44
| ^~~~~~~~
{standard input}: Assembler messages:
{standard input}:29007: Warning: end of file not at end of a line; newline inserted
{standard input}:29008: Error: number of operands mismatch for `movss'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[ 26% | 830<6<2356 | 0.2bps ] Building CXX object intern/cycles/kernel/CMakeFiles/cycles_kernel.dir/kernels/cpu/kernel_split.cpp.o
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
...
ninja: build stopped: subcommand failed.
metric count avg (us) total (ms)
.ninja parse 2 106668.0 213.3
canonicalize str 21331 3.4 73.3
canonicalize path 208623 1.3 279.1
lookup node 208623 1.6 334.1
.ninja_log load 1 20.0 0.0
.ninja_deps load 1 8.0 0.0
node stat 10331 4.6 47.5
StartEdge 837 13387.0 11204.9
FinishCommand 835 1916.2 1600.0
path->node hash load 0.92 (13969 entries / 15173 buckets)
==> ERROR: A failure occurred in build().
Aborting...
Did I make another mistake?
This looks like oom-killer
check in journalctl
for cc1plus invoked oom-killer
gru 18 14:55:54 grafZero kernel: cc1plus invoked oom-killer: gfp_mask=0x100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), order=0, oom_score_adj=0
...
gru 18 14:55:55 grafZero kernel: Out of memory: Killed process 1106550 (cc1plus) total-vm:1924356kB, anon-rss:1852448kB, file-rss:4kB, shmem-rss:27008kB, UID:1000 pgtables:3883008kB oom_score_adj:0
- You should be able to build in the pamac gui, just run
DISABLE_CUDA=1 pamac-manager
🤔 - I'll have to adjust the
PKGBUILD
a bit to handle pamac...
You are right, cc1plus invoked oom-killer - so I was out of memory. Totally my fault, I did not know It uses up to 12,3 GB of RAM. Without a swap I just had to close some programs.
I forgot about "-manager" as I was trying that command - thank you!
So, since it built without further problems, I did some testing of the fracture build:
Fracture helper addon has to be enabled manually, but after that it works. Fracturing works fine.
Now I need to learn the finer art of breaking things ;-)
Thank you so much for your help and for providing this package!