Bug 2291492

Summary: blender, fails to build with Python 3.13: error: ‘_PyLong_AsInt’ was not declared in this scope; did you mean ‘PyLong_AsInt’
Product: [Fedora] Fedora Reporter: Fedora Fails To Install <fti-bugs>
Component: blenderAssignee: Luya Tshimbalanga <luya_tfz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 41CC: awilliam, code, design-devel, epel-packagers-sig, fishpond.kct, kparal, ksurma, kwizart, luya_tfz, mhroncok, negativo17, romulasry
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: blender-4.2.2-10.fc42 blender-4.2.2-10.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-26 03:00:30 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: 2291596, 2292015    
Bug Blocks: 2244836    

Description Fedora Fails To Install 2024-06-12 11:16:47 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

Your package (blender) Fails To Install in Fedora 41:

can't install blender:
  - nothing provides libboost_python312.so.1.83.0()(64bit) needed by blender-1:4.1.1-7.fc41.x86_64
  
If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.


If you don't react accordingly to the policy for FTBFS/FTI bugs (https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/), your package may be orphaned in 8+ weeks.


P.S. The data was generated solely from koji buildroot, so it might be newer than the latest compose or the content on mirrors. To reproduce, use the koji/local repo only, e.g. in mock:

    $ mock -r fedora-41-x86_64 --config-opts mirrored=False install blender


P.P.S. If this bug has been reported in the middle of upgrading multiple dependent packages, please consider using side tags: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#updating-inter-dependent-packages

Thanks!

Comment 1 Fedora Fails To Install 2024-06-19 20:00:26 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 2 romulasry 2024-06-21 22:58:16 UTC
sudo dnf in blender
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem: conflicting requests
  - nothing provides libboost_python312.so.1.83.0()(64bit) needed by blender-1:4.1.1-7.fc41.x86_64 from rawhide
You can try to add to command line:
  --skip-broken to skip uninstallable packages

Comment 3 Ben Beasley 2024-06-22 00:13:16 UTC
This package needs to be rebuilt for Python 3.13. This is blocked by at least the dependency chain blender -> usd -> python-pyopengl.

Comment 4 Adam Williamson 2024-06-26 22:20:23 UTC
All blender build deps are now available, I'm running a scratch build and it has at least reached compilation stage.

Comment 5 Adam Williamson 2024-06-26 23:03:55 UTC
Fixing the _PyLong_AsInt usage was easy enough - https://projects.blender.org/blender/blender/pulls/123800 - but now there's more:

/builddir/build/BUILD/blender-4.1.1-build/blender-4.1.1/source/blender/python/generic/py_capi_rna.cc:85:10: error: ‘_PySet_NextEntry’ was not declared in this scope
   85 |   while (_PySet_NextEntry(value, &pos, &key, &hash)) {

_PySet_NextEntry has not actually *gone*, but I guess it's moved around in the headers or something such that blender is no longer including it in the places it wants to use it. I'll look at this more tomorrow if nobody beats me to it.

Comment 6 Adam Williamson 2024-06-28 01:36:34 UTC
Filed my findings so far as an upstream issue - https://projects.blender.org/blender/blender/issues/123871 . Trying to force a build through using the now-"internal" functions is getting pretty hairy, and I'm not a good enough C coder to port all the cases to public interfaces myself.

Comment 7 Ben Beasley 2024-07-08 15:20:22 UTC
*** Bug 2296296 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Fails To Install 2024-08-26 07:58:57 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 42.

Thanks for taking care of it!

Comment 9 Fedora Fails To Install 2024-08-26 11:00:31 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 41.

Thanks for taking care of it!

Comment 10 Miro Hrončok 2024-08-26 11:06:13 UTC
This was fixed by using Python 3.12 in https://src.fedoraproject.org/rpms/blender/c/c6f582a61590f241697b03ccbc22a5d769d021d5?branch=rawhide

That means Blender now requires:

/usr/bin/python3
libboost_python313.so.1.83.0()(64bit)
libpython3.12.so.1.0()(64bit)
python3dist(cython)
python3dist(numpy)
python3dist(requests)
python3dist(standard)


This seems wrong. numpy and requests are built for Python 3.13. libboost_python313 is Python 3.13. /usr/bin/python3 is Python 3.13. libpython3.12.so.1.0()(64bit) is Python 3.12.

Comment 11 Ben Beasley 2024-08-26 12:18:20 UTC
I agree with https://bugzilla.redhat.com/show_bug.cgi?id=2291492#c10. Using Python 3.12 is not a fix, particularly since Blender has Python dependencies other than the Python interpreter itself.

Comment 13 Ben Beasley 2024-08-26 12:21:27 UTC
(In reply to Ben Beasley from comment #12)
> https://projects.blender.org/blender/blender/issues/123871

Ah, I see Adam already linked this. Apologies for the duplication.

Comment 14 Miro Hrončok 2024-09-17 09:56:11 UTC
What is the current status of blender built with Python 3.12? Does it work properly even with the bogus requirements on Python 3.13 packages?

Comment 15 Luya Tshimbalanga 2024-09-24 23:44:36 UTC
(In reply to Miro Hrončok from comment #14)
> What is the current status of blender built with Python 3.12? Does it work
> properly even with the bogus requirements on Python 3.13 packages?

Blender built with python 3.12 for Fedora 41 and Rawhide works fine as a workaround. Upstream has yet to fix support for python 3.13 as the build fails.

Comment 16 Miro Hrončok 2024-09-25 09:50:52 UTC
In that case, what is the purpose of the following Requires?

python3dist(cython)
python3dist(numpy)
python3dist(requests)
python3dist(standard)

Comment 17 Luya Tshimbalanga 2024-09-28 18:07:39 UTC
(In reply to Miro Hrončok from comment #16)
> In that case, what is the purpose of the following Requires?
> 
> python3dist(cython)
> python3dist(numpy)
> python3dist(requests)
> python3dist(standard)

See https://src.fedoraproject.org/rpms/blender/c/89a994bc8799a4dd5cca3edbf0f18ce2a24bb132?branch=rawhide

Comment 18 Miro Hrončok 2024-10-22 17:29:31 UTC
I'm looking at backporting https://projects.blender.org/blender/blender/pulls/129191

Comment 20 Nicolas Chauvet (kwizart) 2024-10-22 19:29:00 UTC
Looks fine with me on paper to backport upstream commit.

Comment 21 Fedora Update System 2024-10-23 09:51:14 UTC
FEDORA-2024-a226749b6a (blender-4.2.2-10.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-a226749b6a

Comment 22 Fedora Update System 2024-10-23 09:57:03 UTC
FEDORA-2024-e1705d7555 (blender-4.2.2-10.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e1705d7555

Comment 23 Fedora Update System 2024-10-23 10:01:10 UTC
FEDORA-2024-e1705d7555 (blender-4.2.2-10.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2024-10-24 01:57:17 UTC
FEDORA-2024-a226749b6a has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-a226749b6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-a226749b6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Kamil Páral 2024-10-25 09:54:55 UTC
F41 is GO, removing the freeze exception flag.

Comment 26 Fedora Update System 2024-10-26 03:00:30 UTC
FEDORA-2024-a226749b6a (blender-4.2.2-10.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.