Vim fails to build with Python3.9

21 views
Skip to first unread message

Zdenek Dohnal

unread,
Mar 3, 2020, 11:14:48 AM3/3/20
to vim_dev
Hi,

our Fedora python team is doing checks of packages which requires python about their issues with new python version - 3.9.

They found out Vim fails to build from source with python3.9 due following error:

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
if_python3.c:606:5: note: each undeclared identifier is reported only once for each function it appears in

_Py_DEC_REFTOTAL macro is no longer available in python3.9 - Python project uses variable decrementing directly now '_Py_RefTotal--;'

Actually, I'm not quite sure Vim defines py3__Py_DECREF function in its python module, when it does the same thing as _Py_DECREF defined in python library.

Bram Moolenaar

unread,
Mar 4, 2020, 4:06:39 PM3/4/20
to vim...@googlegroups.com, Zdenek Dohnal
Looks like it was only defined for debugging. I think we can just drop
that line.

--
hundred-and-one symptoms of being an internet addict:
172. You join listservers just for the extra e-mail.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Zdenek Dohnal

unread,
Mar 5, 2020, 6:04:47 AM3/5/20
to vim_dev
Thank you for the fix!
Reply all
Reply to author
Forward
0 new messages