Link error (undefined reference to "maketitle" in gui.c) in Small Vim 8.2.3689 with Motif GUI

10 views
Skip to first unread message

Tony Mechelynck

unread,
Nov 28, 2021, 3:34:58 PM11/28/21
to Bram Moolenaar, vim_dev
No error in Tiny with no GUI and no error in Normal to Huge with GTK3
GUI. This build is configured by sourcing the following commands in
the same bash shell:
export CONF_OPT_GUI='--enable-gui=motif'
export CONF_OPT_FEAT='--with-features=small'
export CONF_ARGS2='--with-vim-name=vim-small'
export CONF_OPT_COMPBY='"--with-compiledby=antoine.m...@gmail.com"'

I did not build Vim 8.2.3688 separately. At patchlevel 8.2.3689, the
"make" step proceeds as follows:

linux-tuxedo:~/.build/vim/vim-hg/src/shadow-small # (make || echo
'exit status' $? ; date) 2>&1 |tee -a make.log
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -O2
-fno-strength-reduce -Wall -Wno-deprecated-declarations -D_REENTRANT
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/evalvars.o
evalvars.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -O2
-fno-strength-reduce -Wall -Wno-deprecated-declarations -D_REENTRANT
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/gui.o gui.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -O2
-fno-strength-reduce -Wall -Wno-deprecated-declarations -D_REENTRANT
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 version.c -o
objects/version.o
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
gcc -L/usr/local/lib -Wl,--as-needed -o vim-small
objects/alloc.o objects/arabic.o objects/arglist.o objects/autocmd.o
objects/beval.o objects/buffer.o objects/change.o objects/blob.o
objects/blowfish.o objects/cindent.o objects/clientserver.o
objects/clipboard.o objects/cmdexpand.o objects/cmdhist.o
objects/crypt.o objects/crypt_zip.o objects/debugger.o objects/dict.o
objects/diff.o objects/digraph.o objects/drawline.o
objects/drawscreen.o objects/edit.o objects/eval.o
objects/evalbuffer.o objects/evalfunc.o objects/evalvars.o
objects/evalwindow.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/filepath.o objects/findfile.o objects/float.o
objects/fold.o objects/getchar.o objects/gui_xim.o objects/hardcopy.o
objects/hashtab.o objects/help.o objects/highlight.o
objects/if_cscope.o objects/if_xcmdsrv.o objects/indent.o
objects/insexpand.o objects/list.o objects/locale.o objects/map.o
objects/mark.o objects/match.o objects/mbyte.o objects/memline.o
objects/menu.o objects/misc1.o objects/misc2.o objects/mouse.o
objects/move.o objects/normal.o objects/ops.o objects/option.o
objects/optionstr.o objects/os_unix.o objects/pathdef.o
objects/popupmenu.o objects/popupwin.o objects/profiler.o
objects/pty.o objects/quickfix.o objects/regexp.o objects/register.o
objects/screen.o objects/scriptfile.o objects/search.o
objects/session.o objects/sha256.o objects/sign.o objects/sound.o
objects/spell.o objects/spellfile.o objects/spellsuggest.o
objects/strings.o objects/syntax.o objects/tag.o objects/term.o
objects/terminal.o objects/testing.o objects/textformat.o
objects/textobject.o objects/textprop.o objects/time.o
objects/typval.o objects/ui.o objects/undo.o objects/usercmd.o
objects/userfunc.o objects/version.o objects/vim9compile.o
objects/vim9execute.o objects/vim9script.o objects/vim9type.o
objects/viminfo.o objects/window.o objects/bufwrite.o objects/gui.o
objects/gui_motif.o objects/gui_x11.o objects/gui_beval.o
objects/gui_xmdlg.o objects/gui_xmebw.o objects/xdiffi.o
objects/xemit.o objects/xprepare.o objects/xutils.o
objects/xhistogram.o objects/xpatience.o objects/charset.o
objects/json.o objects/main.o objects/memfile.o objects/message.o
-lXp -lXmu -lXext -lXm -lXt -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
-lICE -ldl -lm -ltinfo -lelf -lselinux -lacl -lattr -lgpm -ldl
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
objects/gui.o: in function `gui_update_scrollbars':
gui.c:(.text+0x2f3e): undefined reference to `maketitle'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make: *** [Makefile:2149: vim-small] Error 1
exit status 2
Sun 28 Nov 21:11:23 CET 2021


Best regards,
Tony.

Dominique Pellé

unread,
Nov 28, 2021, 4:23:52 PM11/28/21
to vim_dev
Tony Mechelynck wrote:

> No error in Tiny with no GUI and no error in Normal to Huge with GTK3
> GUI. This build is configured by sourcing the following commands in
> the same bash shell:
> export CONF_OPT_GUI='--enable-gui=motif'
> export CONF_OPT_FEAT='--with-features=small'
> export CONF_ARGS2='--with-vim-name=vim-small'
> export CONF_OPT_COMPBY='"--with-compiledby=antoine.m...@gmail.com"'

I confirm that vim small with motif gui fails to link.
gui.c is missing #ifdef FEAT_TITLE around the call to maketitle():

diff --git a/src/gui.c b/src/gui.c
index 17f4e9506..616f6022b 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4413,8 +4413,10 @@ gui_update_scrollbars(
}
}

+#ifdef FEAT_TITLE
// update the title, it may show the scroll position
maketitle();
+#endif

prev_curwin = curwin;
--hold_gui_events;
Reply all
Reply to author
Forward
0 new messages