Can't compile latest Vim-7.2.166 with +hangul_input feature

16 views
Skip to first unread message

Dominique Pellé

unread,
May 9, 2009, 10:33:48 AM5/9/09
to vim_dev, Nam SungHyun, Chi-Deok Hwang
I notice that I cannot compile latest Vim-7.2.166 with +hangul_input
feature on Linux x86.

In ":help hangul" it says to configure Vim as follows:

./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput

But when doing that, I get a link error when trying to link Vim:

objects/gui.o: In function `gui_update_cursor':
/tmp/vim7/src/gui.c:964: undefined reference to `preedit_get_status'

The code in src/gui.c around line 964 is:

957 #if defined(USE_IM_CONTROL) || defined(FEAT_HANGULIN)
958 {
959 static int iid;
960 guicolor_T fg, bg;
961
962 if (
963 # ifdef HAVE_GTK2
!964 preedit_get_status()
965 # else
966 im_get_status()
967 # endif
968 )
969 {

preedit_get_status() is defined in mbyte.c in between
#if defined(FEAT_XIM)... #endif, whereas call to the function
in gui.c is in between #if defined(FEAT_HANGULIN), which is
inconsistent.

Looking at history of gui.c in CVS, I see that the problem was
introduced in CVS tag 7.2b-000. Tag before that (7.2a-19)
builds fine with +hangul_input feature. Several changes were
introduced in tag 7.2b-000 simultaneously but looking at
":help version-7.2", it is most certainly this change which
breaks linking:

Solution for cursor color not reflecting IM status for GTK 2. Add
preedit_is_active flag. (SungHyun Nam)

Regards
-- Dominique

Bram Moolenaar

unread,
May 9, 2009, 3:20:44 PM5/9/09
to Dominique Pellé, vim_dev, Nam SungHyun, Chi-Deok Hwang

Dominique Pelle wrote:

I suppose this can be fixed with another #ifdef. I'll put it in my todo
list, but hopefully someone can send me a patch. I just installed a new
OS and my "test various combinations of features" script produces too
much noise. I need to fix this before working on other patches.

--
Sorry, no fortune today.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

SungHyun Nam

unread,
May 10, 2009, 8:31:24 PM5/10/09
to vim...@googlegroups.com, Dominique Pellé, Bram Moolenaar, Chi-Deok Hwang
Bram Moolenaar wrote:
>
> Dominique Pelle wrote:
>
>> I notice that I cannot compile latest Vim-7.2.166 with +hangul_input
>> feature on Linux x86.
>>
>> In ":help hangul" it says to configure Vim as follows:
>>
>> ./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput
>>
>> But when doing that, I get a link error when trying to link Vim:
>>
>> objects/gui.o: In function `gui_update_cursor':
>> /tmp/vim7/src/gui.c:964: undefined reference to `preedit_get_status'

Sorry for the regression. The patch below fixes the error.

hangulin.c provides its own im_get_status().

Thanks,
namsh

diff --git a/src/gui.c b/src/gui.c
index bcc3c68..34806e6 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -960,7 +960,7 @@ gui_update_cursor(force, clear_selection)
guicolor_T fg, bg;

if (
-# ifdef HAVE_GTK2
+# if defined(HAVE_GTK2) && !defined(FEAT_HANGULIN)
preedit_get_status()
# else
im_get_status()

Bram Moolenaar

unread,
May 11, 2009, 3:25:11 PM5/11/09
to SungHyun Nam, vim...@googlegroups.com, Dominique Pellé, Bram Moolenaar, Chi-Deok Hwang

SungHyun Nam wrote:

Thanks. I'll include it when my test setup is working again.

--
SIGFUN -- signature too funny (core dumped)

Reply all
Reply to author
Forward
0 new messages