Warnings and errors after adding patches 855 to 861 (incl. fatal error in Tiny build)

57 views
Skip to first unread message

Tony Mechelynck

unread,
Sep 8, 2015, 6:46:40 PM9/8/15
to vim_dev, Bram Moolenaar
After adding patches 855 to 861, plus runtime files changeset after patch 861 (from Mercurial mirror https://bitbucket.org/vim-mirror/vim):

In Huge build:
[...]
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1 -o objects/ex_cmds2.o ex_cmds2.c
ex_cmds2.c: In function ‘ex_listdo’:
ex_cmds2.c:2630:6: warning: ‘qf_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (i >= qf_size || i >= eap->line2)
^
[...]
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1 -o objects/gui_gtk.o gui_gtk.c
gui_gtk.c: In function ‘add_stock_icon’:
gui_gtk.c:152:5: warning: ‘gdk_pixbuf_new_from_inline’ is deprecated (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:314) [-Wdeprecated-declarations]
pixbuf = gdk_pixbuf_new_from_inline(data_length, inline_data, FALSE, NULL);
^
[...]
Huge build links OK

In Tiny build:
[...]
gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/ex_docmd.o ex_docmd.c
ex_docmd.c: In function ‘do_one_cmd’:
ex_docmd.c:2177:3: warning: implicit declaration of function ‘qf_get_cur_valid_idx’ [-Wimplicit-function-declaration]
ea.line2 = qf_get_cur_valid_idx(&ea);
^
ex_docmd.c:2241:4: warning: implicit declaration of function ‘qf_get_size’ [-Wimplicit-function-declaration]
ea.line2 = qf_get_size(&ea);
^
[...]
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
gcc -L/usr/local/lib -Wl,--as-needed -o vi objects/buffer.o objects/blowfish.o objects/charset.o objects/crypt.o objects/crypt_zip.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o objects/if_cscope.o objects/if_xcmdsrv.o objects/mark.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o objects/window.o objects/netbeans.o objects/main.o objects/memfile.o -lm -ltinfo -lnsl -lgpm -ldl
objects/ex_docmd.o: In function `invalid_range':
ex_docmd.c:(.text+0x1e1): undefined reference to `qf_get_size'
objects/ex_docmd.o: In function `get_address':
ex_docmd.c:(.text+0xd3d): undefined reference to `qf_get_cur_valid_idx'
ex_docmd.c:(.text+0xdb6): undefined reference to `qf_get_size'
ex_docmd.c:(.text+0xebf): undefined reference to `qf_get_cur_valid_idx'
objects/ex_docmd.o: In function `do_cmdline':
ex_docmd.c:(.text+0x4566): undefined reference to `qf_get_cur_valid_idx'
ex_docmd.c:(.text+0x48f2): undefined reference to `qf_get_size'
ex_docmd.c:(.text+0x5830): undefined reference to `qf_get_size'
objects/move.o: In function `scroll_cursor_top':
move.c:(.text+0x9c0): undefined reference to `plines_nofill'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
Makefile:1756: recipe for target 'vi' failed
make: *** [vi] Error 1

Tiny build fails to link, as seen above.


Best regards,
Tony.

Yegappan Lakshmanan

unread,
Sep 8, 2015, 9:48:26 PM9/8/15
to vim_dev
Hi,

The patch to fix the build problems with the tiny build is attached.

- Yegappan
tiny_build.diff

Tony Mechelynck

unread,
Sep 8, 2015, 10:24:19 PM9/8/15
to vim_dev
On Wednesday, September 9, 2015 at 3:48:26 AM UTC+2, yega...@gmail.com wrote:
> Hi,
>
> The patch to fix the build problems with the tiny build is attached.
>
> - Yegappan
>

With this patch, the tiny build succeeds, with the following warning:

gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/move.o move.c
move.c: In function ‘scroll_cursor_top’:
move.c:1775:7: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized]
used += i;
^

Best regards,
Tony.

h_east

unread,
Sep 8, 2015, 11:30:22 PM9/8/15
to vim_dev
Hi Tony and Yegappan!

2015-9-9(Wed) 11:24:19 UTC+9 Tony Mechelynck:
I think src/move.c may be modified as below.
What do you think?

********
diff -r f717d96a39b3 src/move.c
--- a/src/move.c Tue Sep 08 23:45:05 2015 +0200
+++ b/src/move.c Wed Sep 09 12:23:54 2015 +0900
@@ -1769,7 +1769,11 @@
i = 1;
else
#endif
+#ifdef FEAT_DIFF
i = plines_nofill(top);
+#else
+ i = plines(top);
+#endif
used += i;
if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
{

********


--
Best regards,
Hirohito Higashi (a.k.a h_east)

Yegappan Lakshmanan

unread,
Sep 9, 2015, 1:59:04 AM9/9/15
to vim_dev
Hi,

On Tue, Sep 8, 2015 at 8:30 PM, h_east <h.eas...@gmail.com> wrote:
> Hi Tony and Yegappan!
>
> 2015-9-9(Wed) 11:24:19 UTC+9 Tony Mechelynck:
>> On Wednesday, September 9, 2015 at 3:48:26 AM UTC+2, yega...@gmail.com wrote:
>> > Hi,
>> >
>> > The patch to fix the build problems with the tiny build is attached.
>> >
>> > - Yegappan
>> >
>>
>> With this patch, the tiny build succeeds, with the following warning:
>>
>> gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/move.o move.c
>> move.c: In function ‘scroll_cursor_top’:
>> move.c:1775:7: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> used += i;
>> ^
>
> I think src/move.c may be modified as below.
> What do you think?
>

Yes. I agree. Your change is the correct fix for this build issue
with move.c.

- Yegappan

Ike Devolder

unread,
Sep 9, 2015, 3:29:52 AM9/9/15
to vim...@googlegroups.com
> --
> --
> You received this message from the "vim_dev" 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_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

oops, only reading this thread now, to fix the tiny build fail after 856
I've also created a PR #416. Anyhow, also thanks for the fix for the
tiny build fail introduced by 858.

--
Ike

Yegappan Lakshmanan

unread,
Sep 9, 2015, 10:35:32 AM9/9/15
to vim_dev
Hi,

On Tue, Sep 8, 2015 at 10:59 PM, Yegappan Lakshmanan
<yega...@gmail.com> wrote:
> Hi,
>
> On Tue, Sep 8, 2015 at 8:30 PM, h_east <h.eas...@gmail.com> wrote:
>> Hi Tony and Yegappan!
>>
>> 2015-9-9(Wed) 11:24:19 UTC+9 Tony Mechelynck:
>>> On Wednesday, September 9, 2015 at 3:48:26 AM UTC+2, yega...@gmail.com wrote:
>>> > Hi,
>>> >
>>> > The patch to fix the build problems with the tiny build is attached.
>>> >
>>> > - Yegappan
>>> >
>>>
>>> With this patch, the tiny build succeeds, with the following warning:
>>>
>>> gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/move.o move.c
>>> move.c: In function ‘scroll_cursor_top’:
>>> move.c:1775:7: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>> used += i;
>>> ^
>>
>> I think src/move.c may be modified as below.
>> What do you think?
>>
>
> Yes. I agree. Your change is the correct fix for this build issue
> with move.c.
>
> - Yegappan
>

To make it easier for Bram to apply the patch, the combined patch to
ex_docmd.c and
move.c to fix the tiny build breakage is attached.

- Yegappan
tiny_build.diff

h_east

unread,
Sep 9, 2015, 11:12:48 AM9/9/15
to vim_dev
Hi Yegappan,

2015-9-9(Wed) 23:35:32 UTC+9 yega...@gmail.com:
+1
Nice works!
Reply all
Reply to author
Forward
0 new messages