dependencies between features

44 views
Skip to first unread message

Kartik Agaram

unread,
Oct 31, 2012, 8:09:36 PM10/31/12
to vim...@googlegroups.com
I was building vim with python support today, and I noticed that it
gives a linker error if multibyte support isn't also enabled. Is that
unexpected, or is the usual model to include features and all their
dependencies?

Tony Mechelynck

unread,
Nov 1, 2012, 3:47:56 AM11/1/12
to vim...@googlegroups.com, Kartik Agaram
I don't know. Python requiring multibyte sounds strange, but Python
certainly requires expression evaluation. Maybe there is something in
the way Vim <=> Python calls are coded which requires UTF-8 or even
UTF-16le strings (which would require +multi_byte), I don't know.

+multi_byte is part of the Big featureset. What exactly does that
contain (in addition to the Normal featureset)? Hm, +arabic
++builtin-terms +conceal +cscope +emacs_tags +farsi +keymap +langmap
+mouse_dec +mouse_netterm +mouse_sgr +multi_byte +rightleft +signs.
Nothing very obvious AFAICT.

OTOH I'd think that the Tiny, Normal and Big featuresets have had more
testing than the rest, with +perl +python etc. usually added to a Big
(or Huge) build. Which platform (W32, W64, Linux, Mac) are you on? Maybe
you've found a bug in the way features are enabled or disabled depending
on each other?


Best regards,
Tony.
--
ARTHUR: Did you say shrubberies?
ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger
the Shrubber. I arrange, design, and sell shrubberies.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

Kartik Agaram

unread,
Nov 1, 2012, 4:19:34 AM11/1/12
to Tony Mechelynck, vim...@googlegroups.com
Thanks, Tony. It seems to be because of a call to mb_string2cells in
if_py_both.h:VimStrWidth. Since python isn't a feature in feature.h
I'm not sure what to check for to enable FEAT_MBYTE..

Tony Mechelynck

unread,
Nov 1, 2012, 6:29:33 AM11/1/12
to Kartik Agaram, vim...@googlegroups.com
A little searching in the source gives:

FEAT_PYTHON
Python2 interface
FEAT_PYTHON3
Python3 interface
DYNAMIC_PYTHON
Python2 support is dynamic
DYNAMIC_PYTHON3
Python3 support is dynamic

Cscope tells me that there are 54 lines (in buffer.c, eval.c,
ex_docmd.c, globals.h, if_python.c, if_python3.c, main.c, proto.h,
structs.h, version.c, vim.h and window.c) which refer to at least one of
these. They are defined (or not) by auto/config.h (at least on Linux,
once configure has run).


Best regards,
Tony.
--
If you're going to do something tonight that you'll be sorry for
tomorrow morning, sleep late.
-- Henny Youngman

Ken Takata

unread,
Nov 3, 2012, 10:41:59 PM11/3/12
to vim...@googlegroups.com, Tony Mechelynck, a...@akkartik.com
Hi Kartik,

2012/11/01 Thu 17:20:14 UTC+9 Kartik Agaram:


> Thanks, Tony. It seems to be because of a call to mb_string2cells in
>
> if_py_both.h:VimStrWidth. Since python isn't a feature in feature.h
>
> I'm not sure what to check for to enable FEAT_MBYTE..

I don't think +python should depends +multi_byte because there are
patches which fix similar problem (7.3.232 and 7.236).
This problem seems to be caused by 7.3.569.
Please try the attached patch.

Best regards,
Ken Takata

fix-python-without-multi_byte.patch

Kartik Agaram

unread,
Nov 3, 2012, 10:58:25 PM11/3/12
to Ken Takata, vim...@googlegroups.com, Tony Mechelynck
Ah thanks for the investigation! I'm going to run with that patch.
Reply all
Reply to author
Forward
0 new messages