Bug: Compilation error in Vim 7.2b.001

29 views
Skip to first unread message

Kana Natsuno

unread,
Jul 14, 2008, 11:00:27 AM7/14/08
to vim_dev
Hello, Vimmers.

I noticed that Vim 7.2b.001 still cannot be compiled with with multi-byte
feature but without GUI or clipboard, because check_col() and check_row() are
missing. The following is a patch to fix this problem:


*** ../vim-7.2b.001/src/ui.c Mon Jul 14 23:48:48 2008
--- src/ui.c Mon Jul 14 23:48:48 2008
***************
*** 1910,1917 ****
}
#endif

- #if defined(FEAT_CLIPBOARD) || defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \
- || defined(PROTO)
/*
* Check bounds for column number
*/
--- 1910,1915 ----
***************
*** 1939,1945 ****
return (int)screen_Rows - 1;
return row;
}
- #endif

/*
* Stuff for the X clipboard. Shared between VMS and Unix.
--- 1937,1942 ----


--
To Vim, or not to Vim.
kana <http://whileimautomaton.net/>

Bram Moolenaar

unread,
Jul 14, 2008, 3:48:17 PM7/14/08
to Kana Natsuno, vim_dev

Kana Natsuno wrote:

> I noticed that Vim 7.2b.001 still cannot be compiled with with multi-byte
> feature but without GUI or clipboard, because check_col() and check_row() are
> missing. The following is a patch to fix this problem:

Darn, I thought my test covered most combinations of features.
Apparently building with +multi_byte but without +rightleft was missing.
I'll add it to my regular tests.

Thanks for the patch. But to avoid including the functions when not
needed FEAT_MBYTE should be added to the list, instead of deleting the
#if completely.


--
The term "free software" is defined by Richard M. Stallman as
being software that isn't necessarily for free. Confusing?
Let's call it "Stallman software" then!
-- Bram Moolenaar

/// 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 ///

Dominique Pelle

unread,
Jul 16, 2008, 4:11:47 PM7/16/08
to vim...@googlegroups.com
On Mon, Jul 14, 2008 at 9:48 PM, Bram Moolenaar wrote:

>
> Kana Natsuno wrote:
>
>> I noticed that Vim 7.2b.001 still cannot be compiled with with multi-byte
>> feature but without GUI or clipboard, because check_col() and check_row() are
>> missing. The following is a patch to fix this problem:
>
> Darn, I thought my test covered most combinations of features.
> Apparently building with +multi_byte but without +rightleft was missing.
> I'll add it to my regular tests.
>
> Thanks for the patch. But to avoid including the functions when not
> needed FEAT_MBYTE should be added to the list, instead of deleting the
> #if completely.


Are all combinations of configure options supposed to build?

After trying some combinations, I see that Vim-7.2.b4 BETA fails
to build with...

$ ./configure --with-features=tiny --enable-perlinterp
$ make
...
objects/if_perl.o: In function `XS_VIM_Windows':
/home/pel/sb/vim7/src/if_perl.xs:1002: undefined reference to `win_count'
/home/pel/sb/vim7/src/if_perl.xs:1014: undefined reference to `win_find_nr'
objects/if_perl.o: In function `XS_VIWIN_DESTROY':
/home/pel/sb/vim7/src/if_perl.xs:1027: undefined reference to `win_valid'
objects/if_perl.o: In function `XS_VIWIN_Buffer':
/home/pel/sb/vim7/src/if_perl.xs:1035: undefined reference to `win_valid'
objects/if_perl.o: In function `XS_VIWIN_SetHeight':
/home/pel/sb/vim7/src/if_perl.xs:1050: undefined reference to `win_valid'
objects/if_perl.o: In function `XS_VIWIN_Cursor':
/home/pel/sb/vim7/src/if_perl.xs:1065: undefined reference to `win_valid'
/home/pel/sb/vim7/src/if_perl.xs:1074: undefined reference to `win_valid'
collect2: ld returned 1 exit status

Is it worth fixing? Does anybody care about building Vim with such odd
combination of features (tiny + perl)?

-- Dominique

Tony Mechelynck

unread,
Jul 16, 2008, 10:57:47 PM7/16/08
to vim...@googlegroups.com

I notice that all these errors are in source module if_perl.xs, for lack
of the +windows feature, which normally requires at least a "small" build.

Maybe adding #ifdef FEAT_WINDOWS where appropriate would be enough?

Best regards,
Tony.
--
A recent study has found that concentrating on difficult off-screen
objects, such as the faces of loved ones, causes eye strain in computer
scientists. Researchers into the phenomenon cite the added
concentration needed to "make sense" of such unnatural three
dimensional objects ...

Patrick Texier

unread,
Jul 17, 2008, 1:06:01 AM7/17/08
to vim...@googlegroups.com
On Mon, 14 Jul 2008 21:48:17 +0200, Bram Moolenaar wrote:

> Apparently building with +multi_byte but without +rightleft was missing.

On Windows, building Vim with +multi_byte and without +diff fails at
main.c:

.\main.c:
Error E2451 .\main.c 2248: Undefined symbol 'diff_mode' in function command_line_scan
*** 1 errors in Compile ***

I'm attaching a patch.
--
Patrick Texier

nodiff.patch

Bram Moolenaar

unread,
Jul 17, 2008, 5:15:07 PM7/17/08
to Patrick Texier, vim...@googlegroups.com

Patrick Texier wrote:

Thanks, I'll include it.

--
hundred-and-one symptoms of being an internet addict:
269. You wonder how you can make your dustbin produce Sesame Street's
Oscar's the Garbage Monster song when you empty it.

Bram Moolenaar

unread,
Jul 17, 2008, 5:15:07 PM7/17/08
to Dominique Pelle, vim...@googlegroups.com

Dominique Pelle wrote:

> On Mon, Jul 14, 2008 at 9:48 PM, Bram Moolenaar wrote:
>
> > Kana Natsuno wrote:
> >
> >> I noticed that Vim 7.2b.001 still cannot be compiled with with multi-byte
> >> feature but without GUI or clipboard, because check_col() and check_row() are
> >> missing. The following is a patch to fix this problem:
> >
> > Darn, I thought my test covered most combinations of features.
> > Apparently building with +multi_byte but without +rightleft was missing.
> > I'll add it to my regular tests.
> >
> > Thanks for the patch. But to avoid including the functions when not
> > needed FEAT_MBYTE should be added to the list, instead of deleting the
> > #if completely.
>
>
> Are all combinations of configure options supposed to build?

No.

> After trying some combinations, I see that Vim-7.2.b4 BETA fails
> to build with...
>
> $ ./configure --with-features=tiny --enable-perlinterp
> $ make
> ...
> objects/if_perl.o: In function `XS_VIM_Windows':
> /home/pel/sb/vim7/src/if_perl.xs:1002: undefined reference to `win_count'
> /home/pel/sb/vim7/src/if_perl.xs:1014: undefined reference to `win_find_nr'
> objects/if_perl.o: In function `XS_VIWIN_DESTROY':
> /home/pel/sb/vim7/src/if_perl.xs:1027: undefined reference to `win_valid'
> objects/if_perl.o: In function `XS_VIWIN_Buffer':
> /home/pel/sb/vim7/src/if_perl.xs:1035: undefined reference to `win_valid'
> objects/if_perl.o: In function `XS_VIWIN_SetHeight':
> /home/pel/sb/vim7/src/if_perl.xs:1050: undefined reference to `win_valid'
> objects/if_perl.o: In function `XS_VIWIN_Cursor':
> /home/pel/sb/vim7/src/if_perl.xs:1065: undefined reference to `win_valid'
> /home/pel/sb/vim7/src/if_perl.xs:1074: undefined reference to `win_valid'
> collect2: ld returned 1 exit status
>
> Is it worth fixing? Does anybody care about building Vim with such odd
> combination of features (tiny + perl)?

I think problems like this should be handled in the configure script
with an error, or by fixing the source code. Whatever is simple.
In this case it's easy to add the missing functions to if_perl.xs.

--
hundred-and-one symptoms of being an internet addict:

269. You receive an e-mail from the wife of a deceased president, offering
to send you twenty million dollar, and you are not even surprised.

Reply all
Reply to author
Forward
0 new messages