Bram, Vim's configure script currently extracts the value of MODLIBS from Python's config/Makefile as part of the process for determining which libraries to link against when building if_python.c.
As described below, this is problematic as LOCALMODLIBS (which MODLIBS includes) is only supposed to be used when building the Python interpreter. As such, it may link in extra libraries than are actually needed for Vim's use of Python. I've attached Michael Bienia's patch which updates configure.in to use BASEMODLIBS instead of MODLIBS. On Mon, Jan 25, 2010 at 03:03:51PM +0100, Michael Bienia wrote: > Hello, > > vim's configure script uses MODLIBS from python's config/Makefile to > know to link against which libs. As MODLIBS uses LOCALMODLIBS for it's > value and as I got told that LOCALMODLIBS shouldn't be used for python > extensions (I assume this applies here too as vim links against > libpython2.x like python extensions): > > "LOCALMODLIBS is a macro used to link the python binary against libaries > needed for the binary. It must not used to link extensions." > (from Matthias Klose in an Ubuntu bug) -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
diff --git a/src/configure.in b/src/configure.in --- a/src/configure.in +++ b/src/configure.in @@ -725,7 +725,7 @@ tmp_mkf="$pwd/config-PyMake$$" cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}" __: - @echo "python_MODLIBS='$(MODLIBS)'" + @echo "python_BASEMODLIBS='$(BASEMODLIBS)'" @echo "python_LIBS='$(LIBS)'" @echo "python_SYSLIBS='$(SYSLIBS)'" @echo "python_LINKFORSHARED='$(LINKFORSHARED)'" @@ -742,7 +742,7 @@ else vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" fi - vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" + vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" dnl remove -ltermcap, it can conflict with an earlier -lncurses vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi
signature.asc
Description: Digital signature