Bug 1970330
| Summary: | Vim fails to build with Python3.10 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Zdenek Dohnal <zdohnal> |
| Component: | vim | Assignee: | Karsten <karsten> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | gchamoul, karsten, zdohnal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | vim-8.2.2956-2.fc35 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-06-14 14:30:39 UTC | Type: | Bug |
| 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: | |||
| Bug Blocks: | 1969936 | ||
Fix for the warning:
diff --git a/src/configure.ac b/src/configure.ac
index 2db04496f..9810ea1fc 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1487,7 +1487,10 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
[
vi_cv_path_python3_conf=
config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
- d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+ d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
+ if test "x$d" = "x"; then
+ d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+ fi
if test -d "$d" && test -f "$d/config.c"; then
vi_cv_path_python3_conf="$d"
else
=====================================================================================
Result during building:
checking Python's execution prefix... /usr
checking Python's configuration directory... /usr/lib64/python3.10/config-3.10-x86_64-linux-gnu
Fix for the warning reported upsteam https://github.com/vim/vim/pull/8354 . FTBFS reported upstream as https://github.com/vim/vim/issues/8356 . The final PR sent upstream as https://github.com/vim/vim/pull/8381 . The previous PR - #8354 is already merged upstream. |
Error: gcc -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -o vim objects/arabic.o objects/arglist.o objects/autocmd.o objects/beval.o objects/buffer.o objects/change.o objects/blob.o objects/blowfish.o objects/cindent.o objects/clientserver.o objects/clipboard.o objects/cmdexpand.o objects/cmdhist.o objects/crypt.o objects/crypt_zip.o objects/debugger.o objects/dict.o objects/diff.o objects/digraph.o objects/drawline.o objects/drawscreen.o objects/edit.o objects/eval.o objects/evalbuffer.o objects/evalfunc.o objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/filepath.o objects/findfile.o objects/float.o objects/fold.o objects/getchar.o objects/gui_xim.o objects/hardcopy.o objects/hashtab.o objects/help.o objects/highlight.o objects/if_cscope.o objects/if_xcmdsrv.o objects/indent.o objects/insexpand.o objects/list.o objects/locale.o objects/map.o objects/mark.o objects/match.o objects/mbyte.o objects/memline.o objects/menu.o objects/misc1.o objects/misc2.o objects/mouse.o objects/move.o objects/normal.o objects/ops.o objects/option.o objects/optionstr.o objects/os_unix.o objects/pathdef.o objects/popupmenu.o objects/popupwin.o objects/profiler.o objects/pty.o objects/quickfix.o objects/regexp.o objects/register.o objects/screen.o objects/scriptfile.o objects/search.o objects/session.o objects/sha256.o objects/sign.o objects/sound.o objects/spell.o objects/spellfile.o objects/spellsuggest.o objects/syntax.o objects/tag.o objects/term.o objects/terminal.o objects/testing.o objects/textformat.o objects/textobject.o objects/textprop.o objects/time.o objects/typval.o objects/ui.o objects/undo.o objects/usercmd.o objects/userfunc.o objects/version.o objects/vim9compile.o objects/vim9execute.o objects/vim9script.o objects/vim9type.o objects/viminfo.o objects/window.o objects/bufwrite.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/gui_gtk_f.o objects/gui_beval.o objects/gui_gtk_gresources.o objects/vterm_encoding.o objects/vterm_keyboard.o objects/vterm_mouse.o objects/vterm_parser.o objects/vterm_pen.o objects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o objects/if_lua.o objects/if_perl.o objects/if_perlsfio.o objects/if_python3.o objects/if_ruby.o objects/netbeans.o objects/job.o objects/channel.o objects/xdiffi.o objects/xemit.o objects/xprepare.o objects/xutils.o objects/xhistogram.o objects/xpatience.o objects/charset.o objects/json.o objects/main.o objects/memfile.o objects/message.o -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lselinux -lncurses -lcanberra -lacl -lattr -lgpm -ldl -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc /usr/bin/ld: /usr/bin/ld: DWARF error: invalid abstract instance DIE ref /tmp/cckNsDdv.ltrans62.ltrans.o: in function `ConvertFromPySequence.lto_priv.0': <artificial>:(.text+0x67cc): undefined reference to `PyIter_Check' /usr/bin/ld: /tmp/cckNsDdv.ltrans62.ltrans.o: in function `_ConvertFromPyObject.part.0.lto_priv.0': <artificial>:(.text+0x7b0a): undefined reference to `PyType_IsSubtype' /usr/bin/ld: <artificial>:(.text+0x7b32): undefined reference to `PyIter_Check' collect2: error: ld returned 1 exit status link.sh: Linking failed make: *** [Makefile:2142: vim] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.iiP8AZ (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.iiP8AZ (%build) Child return code was: 1 =============================================================================== And there is a deprecation warning about distutils in configure: checking Python's execution prefix... /usr checking Python's configuration directory... <string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives <string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead /usr/lib64/python3.10/config-3.10-x86_64-linux-gnu