Monday, January 4, 2016

Compile error: error: 'prep' undeclared

When trying to compile vim on Linux (Crux) I get this error:

-----------------------------
gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -march=x86-64 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/charset.o charset.c
charset.c: In function 'vim_str2nr':
charset.c:1973:9: error: 'prep' undeclared (first use in this function)
if (prep != NULL)
^
charset.c:1973:9: note: each undeclared identifier is reported only once for each function it appears in
charset.c:1974:10: error: 'pre' undeclared (first use in this function)
*prep = pre;
^
Makefile:2610: recipe for target 'objects/charset.o' failed
-----------------------------

The problem must have been introduced sometime after patch 1021, which was the last version I could compile successfully. The commands I have been using for years are:

./configure --prefix=/usr \
--mandir=/usr/man \
--with-vim-name=vi \
--with-x=yes \
--disable-gui \
--enable-multibyte \
--disable-gpm \
--disable-nls \
--enable-luainterp=yes

make LD_FLAGS=-Wl,-E VIMRTDIR=

Actually neither 'prep' nor 'pre' are declared in charset.c, but they are also not used anywhere. Deleting these lines makes the compilation go on until some sources later it aborts again:

-----------------------------
gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -march=x86-64 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/ex_cmds.o ex_cmds.c
ex_cmds.c: In function 'ex_sort':
ex_cmds.c:518:29: error: 'sort_oct' undeclared (first use in this function)
vim_str2nr(s, NULL, NULL, sort_oct, sort_hex,
^
ex_cmds.c:518:29: note: each undeclared identifier is reported only once for each function it appears in
ex_cmds.c:518:39: error: 'sort_hex' undeclared (first use in this function)
vim_str2nr(s, NULL, NULL, sort_oct, sort_hex,
^
Makefile:2631: recipe for target 'objects/ex_cmds.o' failed
-----------------------------

Thanks for any hints,
Bernd

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: