Summary: | editors/vim fails to build with PYTHON3 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Roman Bogorodskiy <novel> |
Component: | Individual Port(s) | Assignee: | Adam Weinberger <adamw> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | python |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Roman Bogorodskiy
2020-01-26 08:58:37 UTC
AFAIK it is in fact related to python being built with DEBUG. Unfortunately, that's all that I know at this moment. Try this: https://github.com/puremourning/vim/blob/master/configure_vimenv#L33 Add those flags to CFLAGS and let me know if it works for you. @Roman Pythons ABI changes when build with/without DEBUG, which can cause issues like these. As far as upstream vim is concerned, its configure should detect the Python ABI and/or the various *FLAGS settings via pkg-config Longer term, unless there's user value in having both Python version bindings installed, the vim port should probably be using USES=python:<version-spec>, declaring the range of versions it supports, and a single PYTHON option instead of dedicated and separate PYTHON2/PYTHON3 options (In reply to Kubilay Kocak from comment #3) I asked about that publicly in the past, and people said that some of their plugins only supported python{2,3}. I've no opposition to it. (In reply to Adam Weinberger from comment #2) That does work. A commit references this bug: Author: adamw Date: Tue Feb 4 14:03:01 UTC 2020 New revision: 525167 URL: https://svnweb.freebsd.org/changeset/ports/525167 Log: vim: Update to patchlevel 205 and add PYTHON option When python is built with DEBUG, vim fails to build. In fixing this case, note that vim will now fail to build if python or vim is build with DEBUG and the other isn't. This also highlighted that python support is being kludged. The PYTHON2 and PYTHON3 options have been combined into a single PYTHON option that builds with the default python. Consequently, it is no longer possible to build vim with both py2 and py3 support. I can't name any modern high-usage python-based plugin that requires 2.7, so hopefully this only messes up things for a very small minority. Thanks to koobs for the prompt to combine these options. I've been wanting to do this for a while now. PR: 243606 Submitted by: novel Changes: head/UPDATING head/editors/vim/Makefile head/editors/vim/distinfo Should be fixed now. Thanks for this PR! It still fails to build for me:
/usr/local/lib -L/usr/local/lib
ld: error: undefined symbol: _PyObject_DebugFree
>>> referenced by if_python3.c
>>> objects/if_python3.o:(call_PyObject_Free)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
link.sh: Linking failed
*** Error code 1
I have the following in make.conf:
#### /usr/local/etc/poudriere.d/current-make.conf ####
OPTIONS_SET= DEBUG
OPTIONS_UNSET= NLS DOCS EXAMPLES TEST MANPAGES CUPS WAYLAND
devel_llvm60_UNSET= DEBUG
devel_llvm70_UNSET= DEBUG
lang_php72_UNSET_FORCE= DEBUG
textproc_php72-xml_UNSET_FORCE= DEBUG
java_openjdk8_UNSET= DEBUG
www_chromium_UNSET= DEBUG
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/root/.ccache
For python37 I have:
---Begin OPTIONS List---
===> The following configuration options are available for python37-3.7.7:
DEBUG=on: Build with debugging support
IPV6=on: IPv6 protocol support
NLS=off: Enable gettext support for the locale module
PYMALLOC=on: Enable specialized mallocs
====> Hash Algorithm (PEP-456): you can only select none or one of them
FNV=off: Modified Fowler-Noll-Vo Algorithm
SIPHASH=off: SipHash24 Algorithm
===> Use 'make config' to modify these settings
---End OPTIONS List---
There seem to be no dedicated DEBUG option however.
(In reply to Roman Bogorodskiy from comment #8) No dedicated DEBUG option for vim* I'm not sure what to do about that. |