Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1808721 - vim fails to build with Python 3.9: error: '_Py_DEC_REFTOTAL' undeclared
Summary: vim fails to build with Python 3.9: error: '_Py_DEC_REFTOTAL' undeclared
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-02-29 17:26 UTC by Miro Hrončok
Modified: 2020-03-05 10:59 UTC (History)
6 users (show)

Fixed In Version: vim-8.2.356-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-05 09:52:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-29 17:26:42 UTC
vim fails to build with Python 3.9.0a4.

gcc -c -I. -DDYNAMIC_RUBY_DLL=\"libruby.so.2.7\" -I/usr/include -I/usr/include -DRUBY_VERSION=27 -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -pthread    -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        -o objects/if_ruby.o if_ruby.c
if_python3.c: In function 'py3__Py_DECREF':
if_python3.c:606:5: error: '_Py_DEC_REFTOTAL' undeclared (first use in this function); did you mean '_Py_DECREF'?
  606 |     _Py_DEC_REFTOTAL;
      |     ^~~~~~~~~~~~~~~~
      |     _Py_DECREF

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01260461-vim/

For all our attempts to build vim with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/vim/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Zdenek Dohnal 2020-03-02 15:06:13 UTC
Hi Miro,

thank you for reporting the issue and pre-compiling Vim with the newest python ASAP!

_Py_DEC_REFTOTAL was brought in by python3 (was defined at Include/object.h) - any idea why it is removed and if there is a newer function to use instead?

I suppose it is used only for debug purpose in Vim, but I rather ask in case the upstream would want an alternative.

Comment 2 Miro Hrončok 2020-03-02 16:19:21 UTC
_Py_DEC_REFTOTAL starts with an underscore - it can be removed or changed in any update including patch updates, vim should not use it at all. 

I think it could use Py_DECREF instead, but I'm not sure what was the purpose of the code.

Comment 3 Zdenek Dohnal 2020-03-05 09:45:34 UTC
Upstream decided to remove the _Py_DEC_REFTOTAL completely without any substitute. It is removed in patchlevel 8.2.0354, the next Vim build is 8.2.356.

Comment 4 Zdenek Dohnal 2020-03-05 09:52:45 UTC
Built as https://koji.fedoraproject.org/koji/taskinfo?taskID=42210210 .

Comment 5 Zdenek Dohnal 2020-03-05 10:59:37 UTC
Seems koji is overloaded now, because fedpkg build connection got timed out before the build got ppc64le machine. The fix is commited though, so it can stay closed.


Note You need to log in before you can comment on or make changes to this bug.