On Thursday, 7 January 2016 19:18:30 UTC+8, Ken Takata wrote:
> Hi Marslo,
>
> 2016/1/7 Thu 17:40:38 UTC+9 Marslo Jiao wrote:
> > The preinstall (default) and newinstall (2.7.11) are all Py_UNICODE_SIZE ==
> > 2
>
> Oh, really? I think it's very strange.
> BTW, it's not so important.
>
> The problem is why the Vim's configure script misdetected the python's header
> directory. The configure script checks python2 command first, then python
> command. If the preinstalled python has python2 command, and if your self-
> built python doesn't have python2 command, the misdetection might occur.
>
> Maybe we should use INCLUDEPY variable from <python-config-dir>/Makefile?
>
> E.g.:
>
> --- a/src/configure.in
> +++ b/src/configure.in
> @@ -1128,6 +1128,7 @@
> @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
> @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
> @echo "python_INSTSONAME='$(INSTSONAME)'"
> + @echo "python_INCLUDEPY='$(INCLUDEPY)'"
> @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
> @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
> @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
> @@ -1182,9 +1183,9 @@
>
> PYTHON_LIBS="${vi_cv_path_python_plibs}"
> if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
> -
> PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}
> -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
> + PYTHON_CFLAGS="-I${python_INCLUDEPY}
> -I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}
> -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
> else
> -
> PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}
> -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}
> -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
> + PYTHON_CFLAGS="-I${python_INCLUDEPY}
> -I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}
> -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}
> -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
> fi
> PYTHON_SRC="if_python.c"
> PYTHON_OBJ="objects/if_python.o"
>
>
> Sorry, this patch is not tested at all.
> (Maybe a similar patch for python3 is also needed.)
>
>
> Regards,
> Ken TakataHi Ken, Yes, of cause. I'm using script to upgrade my vim version: https://github.com/Marslo/VimConfig/blob/master/Scripts/.upgrade_vim And from the last vim-build.log, I found it find the correct python (/usr/local) after python was built by using --enable-unicode=ucs4 in configure, but use both '/usr' and '/usr/local' as PYTHON_HOME in make: === checking --enable-pythoninterp argument... yes checking for python2... /usr/bin/python2 checking Python version... 2.7 checking Python is 2.3 or better... yep checking Python's install prefix... /usr checking Python's execution prefix... /usr checking Python's configuration directory... (cached) /usr/local/lib/python2.7/config ... checking if -fPIE can be added for Python... yes make: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include/python2.7 -DPYTHON_HOME='"/usr"' -pthread -fPIE -o objects/if_python.o if_python.c ... link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly. gcc -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/local/lib -Wl,--as-needed -o vim objects/buffer.o objects/blowfish.o objects/charset.o objects/crypt.o objects/crypt_zip.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.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/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o objects/if_cscope.o objects/if_xcmdsrv.o objects/mark.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o objects/window.o objects/if_python.o objects/if_ruby.o objects/netbeans.o objects/main.o objects/memfile.o -lm -ltinfo -lnsl -lselinux -ldl -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -lruby -lpthread -lrt -ldl -lcrypt -lm link.sh: Linked fine === Log has been attached. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
vim-build.log
Description: Binary data
