1

I cloned Vim from the GitHub repo and then run

./configure --with-features=huge \
            --enable-multibyte \
            --enable-rubyinterp=yes \
            --enable-python3interp=yes \
            --with-python3-config-dir=$(python3-config --configdir) \
            --enable-perlinterp=yes \
            --enable-luainterp=yes \
            --enable-cscope \
            --prefix=/usr/local

which seems all fine, but then make fails:

$ make -j8
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
make[1]: Entering directory '/home/enrico/vim/src'
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_ATHENA     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        version.c -o objects/version.o
make[2]: Entering directory '/home/enrico/vim/src/po'
make[2]: Nothing to be done for 'first'.
make[2]: Leaving directory '/home/enrico/vim/src/po'
make[2]: Entering directory '/home/enrico/vim/src/po'
make[2]: Nothing to be done for 'converted'.
make[2]: Leaving directory '/home/enrico/vim/src/po'
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.32/core_perl/CORE   -L/usr/local/lib -Wl,--as-needed     -o vim 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/fold.o objects/getchar.o objects/gui_xim.o objects/hardcopy.o objects/hashtab.o objects/highlight.o objects/if_cscope.o objects/if_xcmdsrv.o objects/indent.o objects/insexpand.o objects/list.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/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/viminfo.o objects/window.o objects/bufwrite.o objects/gui.o objects/gui_athena.o objects/gui_x11.o objects/gui_beval.o objects/gui_at_sb.o objects/gui_at_fs.o objects/vterm_encoding.o objects/vterm_keyboard.o objects/vterm_mouse.o objects/vterm_parser.o objects/vterm_pen.o objects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o   objects/if_perl.o objects/if_perlsfio.o  objects/if_python3.o    objects/netbeans.o objects/channel.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 -lXaw -lXmu -lXext -lXt -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -ldl  -lm -ltinfo -lelf   -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.32/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.32/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc  -L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -lpython3.8      
/usr/bin/ld: /tmp/vim.rEMMnl.ltrans46.ltrans.o: in function `os_openpty.lto_priv.0':
/home/enrico/vim/src/./Modules/posixmodule.c:6683: undefined reference to `openpty'
/usr/bin/ld: /tmp/vim.rEMMnl.ltrans46.ltrans.o: in function `os_forkpty.lto_priv.0':
/home/enrico/vim/src/./Modules/posixmodule.c:6784: undefined reference to `forkpty'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [Makefile:2137: vim] Error 1
make[1]: Leaving directory '/home/enrico/vim/src'
make: *** [Makefile:29: first] Error 2

I have verified that removing the two options relative to python (--enable-python3interp=yes --with-python3-config-dir=$(python3-config --configdir)), make succeeds.

4
  • 1
    Why not use Vim from your distribution? You tagger Arch, which means you'll get a pretty recent Vim and you should be able to get one with all the features you need... Even if you need to build from source for some reason, I'd probably recommend starting from the Arch build for Vim and then customize that, rather than roll your own from scratch... They'll have figured out how to solve this kind of issues already. – filbranden Jul 16 '20 at 20:06
  • 1
    After a long long time since the last time I installed Vim on Arch, I actually don't even remember if I installed it from source code or with pacman. However your comment prompted me to check Arch's wiki on Vim, which specifies that installing gvim provides the features that I was trying to pick with configure. – Enlico Jul 16 '20 at 20:27
  • Feel free to post a self answer with what worked for you! – filbranden Jul 16 '20 at 20:32
  • 1
    Not yet, I'm installing all the plugins I need, and I have the feeling that something is not quite right with a plugin which requires Ruby... I'll update – Enlico Jul 16 '20 at 20:34
2

As suggested by filbranden in the comments, I workarounded the issue by installing Vim from Arch package repository.

Not that I had not tried, but the package vim, as you can read here, does not come with the +clipboard feature, hence my attempt to build it from source.

It truns out that the package gvim does come with that feature, so installing it solved the issue. (Even if I'll never use gvim).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.