Are the --enable-hangulinput and --enable-xim confilct?

23 views
Skip to first unread message

Hongyi Zhao

unread,
Aug 25, 2019, 1:25:53 AM8/25/19
to vim...@googlegroups.com
Hi,

I try to build vim with the --enable-hangulinput and --enable-xim
confilct at the same time, but failed with error:

-------------------------
vim.h:1585:63: error: called object ‘size_t’ is not a function or
function pointer
#define STRNCMP(d, s, n) strncmp((char *)(d), (char *)(s), (size_t)(n))
^
ex_docmd.c:8459:6: note: in expansion of macro ‘STRNCMP’
if (STRNCMP(arg, "FALLBACK ", 9) == 0)
^~~~~~~
In file included from /usr/include/wchar.h:887:0,
from spell.h:250,
from vim.h:2110,
from ex_docmd.c:14:
/usr/include/x86_64-linux-gnu/bits/wchar2.h:507:20: note: declared here
__fortify_function size_t
^~~~~~
Makefile:3059: recipe for target 'objects/ex_docmd.o' failed
make[1]: *** [objects/ex_docmd.o] Error 1
make[1]: Leaving directory '/home/werner/software/editor/vim/vim.git/src'
Makefile:26: recipe for target 'first' failed
make: *** [first] Error 2
-----------------------------

Are these two options conflict?

Regards
--
Hongsheng Zhao <hongy...@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493

Bram Moolenaar

unread,
Aug 25, 2019, 8:49:22 AM8/25/19
to vim...@googlegroups.com, Hongyi Zhao
Looks more like a problem with your wchar.h file. It uses
__fortify_function but it's probably not defined. Perhaps you need to
use another compiler or compilation flags.

--
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
to the teacher you were stuck in Web traffic.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Hongyi Zhao

unread,
Aug 25, 2019, 10:54:33 AM8/25/19
to Bram Moolenaar, vim...@googlegroups.com
Bram Moolenaar <Br...@moolenaar.net> 于2019年8月25日周日 下午8:49写道:
I use gcc for this:

$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

As for others compiler, I don't know which you refer to?

As for the compilation flags, I also have no hints in my mind.

Regards

>
> --
> hundred-and-one symptoms of being an internet addict:
> 115. You are late picking up your kid from school and try to explain
> to the teacher you were stuck in Web traffic.
>
> /// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///



SungHyun Nam

unread,
Aug 25, 2019, 9:28:34 PM8/25/19
to vim...@googlegroups.com, Hongyi Zhao
2019-08-25 오후 2:25에 Hongyi Zhao 이(가) 쓴 글:
Regardless of compilation error, the hangulin feature is for
environments where XIM is not available.

You can find next line with ':help hangul'.
./configure --with-x --enable-multibyte --enable-hangulinput \
--disable-xim

Thanks,
namsh

Hongyi Zhao

unread,
Aug 26, 2019, 3:48:31 AM8/26/19
to SungHyun Nam, vim...@googlegroups.com
SungHyun Nam <gow...@gmail.com> 于2019年8月26日周一 上午9:28写道:
Thanks for clarify this.

>
> Thanks,
> namsh

Bram Moolenaar

unread,
Aug 26, 2019, 3:25:42 PM8/26/19
to vim...@googlegroups.com, SungHyun Nam, Hongyi Zhao
That's a bit of a disadvantage when someone tries to build a version
that works with multiple languages. Can we make this a runtime choice
instead of a compile time choice? No idea how much work that would be.

--
~
~
~
".signature" 4 lines, 50 characters written

SungHyun Nam

unread,
Aug 28, 2019, 9:37:42 PM8/28/19
to vim...@googlegroups.com, Bram Moolenaar
2019-08-27 오전 4:25에 Bram Moolenaar 이(가) 쓴 글:
Here is a minimal patch (no documentation, no indenting to minimize).
If vim supports both xim and hangulinpt and user set 'imdisable',
hangulinput feature is selected.

I tested this patch by adding '--enable-xim --enable-hangulinput' to my
default configure option.
$ auto/configure --enable-perlinterp=no --disable-gpm
--enable-python3interp=dynamic --enable-tclinterp=no --enable-cscope
--with-features=huge --enable-terminal --enable-multibyte --enable-xim
--enable-hangulinput --prefix=/opt/local --with-x --enable-gui=gtk3

While testing this patch, I noticed one glitch.
Though I set 'imdisable' in the vimrc and I confirmed the setting with
':set imdisable?', when I typed S-Space for the first time, vim connects
to XIM. After that, go to english input mode and type S-Space again, vim
enters to hangulinput mode. My system environement may cause this glitch??

Thanks,
namsh



hangulin-with-xim.patch

Bram Moolenaar

unread,
Aug 29, 2019, 1:16:16 PM8/29/19
to vim...@googlegroups.com, SungHyun Nam
Thanks. I think it always creates the "xim" object, also when
'imdisable' is set. Perhaps it starts in the wrong mode? It is
possible that a check for 'imdisable' is missing somewhere.

--
hundred-and-one symptoms of being an internet addict:
129. You cancel your newspaper subscription.

Bram Moolenaar

unread,
Nov 21, 2019, 10:47:07 AM11/21/19
to vim...@googlegroups.com, SungHyun Nam
Now that I try this patch I notice that hangulin.c doesn't build.
Since nobody complained and this input method is unmaintained, let's
just remove it.

I hope someone can re-implement this for utf-8 encoding.

--
hundred-and-one symptoms of being an internet addict:
98. The Alta Vista administrators ask you what sites are missing
in their index files.

Tony Mechelynck

unread,
Nov 21, 2019, 11:40:22 AM11/21/19
to vim_use, SungHyun Nam
IIRC, +hangul_input was incompatible with GTK[1-3]. But don't take my
word for it, I don't speak Korean.

Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages