Bug 1734980

Summary: blender: FTBFS in Fedora rawhide/f32
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: blenderAssignee: Luya Tshimbalanga <luya_tfz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: design-devel, kwizart, luya_tfz, mplch, negativo17, promac, pviktori, vstinner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-17 08:59:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1717013, 1735421    
Bug Blocks: 1732841    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2019-07-31 17:53:07 UTC
blender failed to build from source in Fedora rawhide/f31

https://koji.fedoraproject.org/koji/taskinfo?taskID=36632157


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Please fix blender at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
blender will be orphaned. Before branching of Fedora 32,
blender will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2019-07-31 17:53:10 UTC
Created attachment 1595469 [details]
build.log

Comment 2 Fedora Release Engineering 2019-07-31 17:53:12 UTC
Created attachment 1595470 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2019-07-31 17:53:14 UTC
Created attachment 1595471 [details]
state.log

Comment 4 Luya Tshimbalanga 2019-08-02 04:42:07 UTC
Offender are OpenImageIO and OpenCV according to the build.

Comment 5 Ben Cotton 2019-08-13 18:36:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 6 Petr Viktorin (pviktori) 2019-09-19 09:08:30 UTC
The issue Blender hits is:

/builddir/build/BUILD/blender-2.80/source/blender/python/generic/py_capi_utils.c:722:30: erro
r: dereferencing pointer to incomplete type 'PyInterpreterState' {aka 'struct _is'}
  722 |   PyDict_SetItemString(interp->modules, "__main__", mod_main);
      |                              ^~
make[2]: *** [source/blender/python/generic/CMakeFiles/bf_python_ext.dir/build.make:131: sour

This is one of several other attempts to access "interp->modules". The interpreter state is private API, and from Python 3.8 it is an opaque struct.
I haven't followed the interp changes closely enough, and I'm not familiar with this part of CPython.
Victor, you might know: what's the best way to get "sys.modules" from C code? (If you don't know off the top of your head, I can search further.)

Comment 7 Petr Viktorin (pviktori) 2019-09-24 14:43:41 UTC
"interp->modules" should be replaced by the public API function PyImport_GetModuleDict.

Comment 8 Luya Tshimbalanga 2019-10-03 17:57:19 UTC
(In reply to Petr Viktorin from comment #7)
> "interp->modules" should be replaced by the public API function
> PyImport_GetModuleDict.

Can someone create a patch on the issue ready to submit for upstream? Thanks.

Comment 9 Marcel Plch 2019-10-04 12:16:23 UTC
I would be interested in making my first contribution to Blender.
I'll take a look at this.

Comment 10 Marcel Plch 2019-10-16 13:23:55 UTC
I have created an upstream fix and it got merged:
https://developer.blender.org/D6038

Comment 11 Victor Stinner 2019-10-16 15:59:49 UTC
> I have created an upstream fix and it got merged:
> https://developer.blender.org/D6038

Yeah, congrats Marcel ;-)

Comment 12 Luya Tshimbalanga 2019-10-17 03:30:05 UTC
(In reply to Marcel Plch from comment #10)
> I have created an upstream fix and it got merged:
> https://developer.blender.org/D6038

Thank you Marcel for the fix. I added the patch which successfully built Blender with Python 3.8.
https://koji.fedoraproject.org/koji/taskinfo?taskID=38335799

Update will come soon.

Comment 13 Luya Tshimbalanga 2019-10-17 03:44:00 UTC
Remove  F31FTBS tag as build on Python 3.7. and change the title for Rawhide/f32

Comment 14 Luya Tshimbalanga 2019-10-17 08:59:28 UTC
Closing this report as the fix made Blender built with Python 3.8 and ported on other release.