Bug 241537 - editors/vim 8.1.2108 fails to build on amd64 due to undefined symbol _PyObject_DebugFree
Summary: editors/vim 8.1.2108 fails to build on amd64 due to undefined symbol _PyObjec...
Status: Closed Not Enough Information
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 12:14 UTC by Dennis Clarke
Modified: 2022-11-04 17:31 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (adamw)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2019-10-28 12:14:30 UTC
Seeing this over and over with stable 12 on tier 1 amd64 :

vesta# uname -apKU
FreeBSD vesta 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC  amd64 amd64 1200086 1200086
vesta# 
vesta# 
vesta# cat /etc/make.conf
DEFAULT_VERSIONS+=ssl=openssl111
DEFAULT_VERSIONS+=perl5=5.28
vesta# 
vesta# pwd
/usr/ports/editors/vim
vesta# 

vesta# 
vesta# make deinstall 
===>  Deinstalling for vim
===>   vim not installed, skipping
vesta# 
vesta# make install 
===>  Building for vim-8.1.2108
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && /usr/bin/make all
cc -c -I. -Iproto -DHAVE_CONFIG_H   -DLIBICONV_PLUG -I/usr/local/include  -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        version.c -o objects/version.o
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  cc   -L.  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -fstack-protector-strong  -rdynamic -Wl,-R/usr/local/lib/perl5/5.28/mach/CORE   -fstack-protector-strong  -L/usr/local/lib -Wl,--as-needed  -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/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/fold.o  objects/getchar.o  objects/hardcopy.o  objects/hashtab.o  objects/highlight.o    objects/if_cscope.o  objects/if_xcmdsrv.o  objects/indent.o  objects/insexpand.o  objects/list.o  objects/map.o  objects/mark.o  objects/memline.o  objects/menu.o  objects/misc1.o  objects/misc2.o  objects/mouse.o  objects/move.o  objects/mbyte.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/scriptfile.o  objects/screen.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/textprop.o  objects/ui.o  objects/undo.o  objects/usercmd.o  objects/userfunc.o  objects/version.o  objects/viminfo.o  objects/window.o  objects/bufwrite.o    objects/encoding.o objects/keyboard.o objects/termmouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o      objects/if_perl.o objects/if_perlsfio.o    objects/if_python3.o    objects/if_ruby.o    objects/netbeans.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               -lm -lelf  -pthread -lncurses  -lintl      -Wl,-R/usr/local/lib/perl5/5.28/mach/CORE -pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/local/lib/perl5/5.28/mach/CORE -lperl -lpthread -lm -lcrypt -lutil    -L/usr/local/lib/python3.7/config-3.7dm -lpython3.7dm -lcrypt -lintl -ldl -L/usr/local/lib -lintl -lutil -lm    -lruby26 -lm -lpthread -L/usr/local/lib -L/usr/local/lib       
/usr/bin/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

Stop.
make[3]: stopped in /usr/ports/editors/vim/work/vim-8.1.2108/src
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/editors/vim/work/vim-8.1.2108
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/vim
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/vim
vesta# 

Have also tried : 

vesta# 
vesta# cat /etc/make.conf
DEFAULT_VERSIONS+=ssl=openssl111
DEFAULT_VERSIONS+=perl5=5.28
DEFAULT_VERSIONS+=python=3.7
vesta# 

Could be due to the horrific and nasty number of versions of 
python that one must have on a system these days to get anything
to attempt to build : 

vesta# pkg query %n\ %v\ %o | sort | grep -i 'py'
py27-alabaster 0.7.6 textproc/py-alabaster
py27-asn1crypto 0.24.0 devel/py-asn1crypto
py27-Babel 2.7.0 devel/py-babel
py27-beaker 1.11.0 www/py-beaker
py27-certifi 2019.6.16 security/py-certifi
py27-chardet 3.0.4_1 textproc/py-chardet
py27-CommonMark 0.9.0 textproc/py-CommonMark
py27-cryptography 2.6.1 security/py-cryptography
py27-enum34 1.1.6 devel/py-enum34
py27-funcsigs 1.0.2 devel/py-funcsigs
py27-future 0.17.1_1 devel/py-future
py27-idna 2.8 dns/py-idna
py27-ipaddress 1.0.22 net/py-ipaddress
py27-Jinja2 2.10.1 devel/py-Jinja2
py27-mako 1.0.14 textproc/py-mako
py27-MarkupSafe 1.1.1 textproc/py-MarkupSafe
py27-olefile 0.46 devel/py-olefile
py27-pycparser 2.19 devel/py-pycparser
py27-pygments 2.4.1 textproc/py-pygments
py27-pystemmer 1.3.0_2 textproc/py-pystemmer
py27-pytest-runner 2.11.1 devel/py-pytest-runner
py27-recommonmark 0.5.0_1 textproc/py-recommonmark
py27-requests 2.21.0 www/py-requests
py27-setuptools 41.2.0 devel/py-setuptools
py27-setuptools_scm 3.3.3 devel/py-setuptools_scm
py27-six 1.12.0 devel/py-six
py27-sphinx 1.6.5_2,1 textproc/py-sphinx
py27-sphinx_rtd_theme 0.4.3 textproc/py-sphinx_rtd_theme
py27-sphinxcontrib-websupport 1.1.2 textproc/py-sphinxcontrib-websupport
py27-typing 3.7.4 devel/py-typing
py27-urllib3 1.22,1 net/py-urllib3
py37-alabaster 0.7.6 textproc/py-alabaster
py37-asn1crypto 0.24.0 devel/py-asn1crypto
py37-Babel 2.7.0 devel/py-babel
py37-beaker 1.11.0 www/py-beaker
py37-certifi 2019.6.16 security/py-certifi
py37-cffi 1.13.1 devel/py-cffi
py37-chardet 3.0.4_1 textproc/py-chardet
py37-CommonMark 0.9.1 textproc/py-CommonMark
py37-cryptography 2.6.1 security/py-cryptography
py37-cython 0.29.13 lang/cython
py37-docutils 0.15.2 textproc/py-docutils
py37-future 0.17.1_1 devel/py-future
py37-idna 2.8 dns/py-idna
py37-imagesize 1.1.0 graphics/py-imagesize
py37-Jinja2 2.10.1 devel/py-Jinja2
py37-libxml2 2.9.9 textproc/py-libxml2
py37-mako 1.0.14 textproc/py-mako
py37-MarkupSafe 1.1.1 textproc/py-MarkupSafe
py37-olefile 0.46 devel/py-olefile
py37-openssl 19.0.0 security/py-openssl
py37-pillow 6.2.0 graphics/py-pillow
py37-ply 3.11 devel/py-ply
py37-pycparser 2.19 devel/py-pycparser
py37-pygments 2.4.1 textproc/py-pygments
py37-pysocks 1.7.1 net/py-pysocks
py37-pystemmer 1.3.0_2 textproc/py-pystemmer
py37-pytest-runner 2.11.1 devel/py-pytest-runner
py37-pytz 2019.3,1 devel/py-pytz
py37-recommonmark 0.5.0_1 textproc/py-recommonmark
py37-requests 2.21.0 www/py-requests
py37-setuptools 41.4.0 devel/py-setuptools
py37-setuptools_scm 3.3.3 devel/py-setuptools_scm
py37-six 1.12.0 devel/py-six
py37-snowballstemmer 1.2.1 textproc/py-snowballstemmer
py37-sphinx 1.6.5_2,1 textproc/py-sphinx
py37-sphinx_rtd_theme 0.4.3 textproc/py-sphinx_rtd_theme
py37-sphinxcontrib-websupport 1.1.2 textproc/py-sphinxcontrib-websupport
py37-tkinter 3.7.5_6 x11-toolkits/py-tkinter
py37-urllib3 1.22,1 net/py-urllib3
python27 2.7.17 lang/python27
python36 3.6.9 lang/python36
python37 3.7.5 lang/python37
vesta# 


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2019-10-28 12:21:14 UTC
Could you please add in the options you're building vim with, the output of pkg info, and the full build log?
Comment 2 Dennis Clarke 2019-10-28 13:07:27 UTC
Before we go to far we should look at : 

    https://github.com/vim/vim/issues/4813

Wherein we see that vim itself has an issue with Python 3.7.x 
it seems. 

We could be chasing our tails here.
Comment 3 Adam Weinberger freebsd_committer freebsd_triage 2019-11-01 16:31:10 UTC
I cannot reproduce this. For me, in poudriere, vim builds fine with python 3.7. I need some more info to be able to reproduce it.
Comment 4 Dennis Clarke 2019-11-01 16:50:09 UTC
(In reply to Adam Weinberger from comment #3)

Yes and only in poudriere which is the only build system left that
actually works. There really seems to be no other way to build anything
in ports anymore. 

Go ahead and close this as "works in poo-der-ee" and that should be a
valid bug status for anything that fails to build in ports.

-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux support
GreyBeard and suspenders optional
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2019-11-02 04:52:10 UTC
We don’t push poudriere because we hate ports, we push it because it avoids triggering the kind of problem you’re reporting. Because ports allow for uncontrolled environment variation, the only way we can fix these kinds of problem is for submitters to work with us to track down the incompatibility. This is not poudriere’s fault, nor does it indicate that vim is somehow incompatible with ports.
Comment 6 Dennis Clarke 2019-11-05 12:14:04 UTC
(In reply to Adam Weinberger from comment #3)

This is a waste of time to even begin to look into. 

Closed as "not anough information" really is not true.

Most likely better to say "builds with poudriere" is a better
status.

Dennis
Comment 7 Joel Rodriguez 2022-11-03 14:08:28 UTC
FreeBSD 12.3-RELEASE-p6 GENERIC
py39-dnspython-2.2.1_1,1           =   up-to-date with index
python38-3.8.15                    =   up-to-date with index
python39-3.9.15                    =   up-to-date with index

I am getting this error too!

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


Any updates on resolution?

Thanks
Joel
Comment 8 Adam Weinberger freebsd_committer freebsd_triage 2022-11-03 16:59:28 UTC
What is your /etc/make.conf?
Comment 9 Joel Rodriguez 2022-11-03 17:39:23 UTC
DEFAULT_VERSIONS+=ssl=openssl
DEFAULT_VERSIONS+=perl5=5.32
DEFAULT_VERSIONS+=python=3.9
# Change default db5 (deprecated and EoL) to db18
# DB5 to DB18 migration
WITH_BDB6_PERMITTED=yes # Needed to use db18!
DEFAULT_VERSIONS+=bdb=18
# postfix
CLAMAVUSER=vscan
CLAMAVGROUP=vscan
# hmmm 12.2 eol 03/31/2022 bah humbug
#ALLOW_UNSUPPORTED_SYSTEM=yes
# per purplehat for postfix/maia
# http://www.purplehat.org/?page_id=16
# disabled for now as we are using X11
#OPTIONS_UNSET= X11 GUI CUPS NLS HAL GSSAPI_BASE KRB_BASE KERBEROS
#OPTIONS_SET=GSSAPI_NONE KRB_NONE
#WITHOUT_X=YES
#WITH_X=NO
#ENABLE_GUI=NO
# mod_php80
WITH_MPM=event
# just in case we need to set this
#CC=clang11
#CXX=clang++11
#CPP=clang-cpp11
Comment 10 Adam Weinberger freebsd_committer freebsd_triage 2022-11-03 17:55:06 UTC
There is probably some combination of PYTHON_LIBS and PYTHON_CFLAGS that makes Vim select the correct python when multiple are installed.
Comment 11 Adam Weinberger freebsd_committer freebsd_triage 2022-11-03 17:56:33 UTC
(In reply to Adam Weinberger from comment #10)
Should have mentioned: I mean in CONFIGURE_ENV. It looks like Vim's src/configure listens to those variables, so the solution might come from there.
Comment 12 Joel Rodriguez 2022-11-04 17:31:14 UTC
OK, I rebuilt 110 ports and deleted python38 and tried to rebuild vim with the same results. So I removed the python bindings option and it built aok.

Since traded in emacs for vi(m) decades ago, vim in my case, is just a backup editor in case emacs goes to pot.

Thanks for the suggestions, I had yet to cleanup the python38 dependencies, so phyton39 is ready to go just in time for phyhon310 and python311:)

Thanks
Joel