Saturday, April 18, 2020

Re: Failed to compile vim with lua support.

Shlomi Fish <shlomif@shlomifish.org> 于2020年4月18日周六 下午3:20写道:
>
> Hi Hongyi Zhao!
>
> On Sat, 18 Apr 2020 08:09:57 +0800
> Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> > Hi,
> >
> > Latest git version of vim, see the following:
> >
> > $ make -j24
> > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > /home/werner/Public/editor/vim/vim.git/src/if_lua.c:2011: undefined
> > reference to `lua_setglobal'
>
> Can you try with `make -j1`?

But I previously can make vim with -j > 1.

Failed, see following:

$ make -j1
[...]
/usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2011: undefined
reference to `lua_setglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:2013:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:2054:
undefined reference to `lua_setglobal'
/usr/bin/ld: objects/if_lua.o: in function `luaV_addlstring':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:651: undefined
reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:647:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:649:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: objects/if_lua.o: in function `luaV_setrange':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2071: undefined
reference to `lua_getglobal'
/usr/bin/ld: objects/if_lua.o: in function `luaV_print':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:1595: undefined
reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:1600:
undefined reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:1604:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: objects/if_lua.o: in function `luaV_debug':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:1618: undefined
reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:1620:
undefined reference to `lua_rotate'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:1633:
undefined reference to `lua_pcallk'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:1627:
undefined reference to `lua_callk'
/usr/bin/ld: objects/if_lua.o: in function `luaV_newstate':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2064: undefined
reference to `lua_callk'
/usr/bin/ld: objects/if_lua.o: in function `luaV_luaeval':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:1952: undefined
reference to `lua_pcallk'
/usr/bin/ld: objects/if_lua.o: in function `ex_lua':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2131: undefined
reference to `lua_pcallk'
/usr/bin/ld: objects/if_lua.o: in function `ex_luado':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2165: undefined
reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/vim.git/src/if_lua.c:2176:
undefined reference to `lua_pcallk'
/usr/bin/ld: objects/if_lua.o: in function `ex_luafile':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2208: undefined
reference to `lua_pcallk'
/usr/bin/ld: objects/if_lua.o: in function `set_ref_in_lua':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2247: undefined
reference to `lua_callk'
/usr/bin/ld: objects/if_lua.o: in function `lua_buffer_free':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2223: undefined
reference to `lua_callk'
/usr/bin/ld: objects/if_lua.o: in function `lua_window_free':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2224: undefined
reference to `lua_callk'
/usr/bin/ld: objects/if_lua.o: in function `do_luaeval':
/home/werner/Public/editor/vim/vim.git/src/if_lua.c:2234: undefined
reference to `lua_callk'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [Makefile:2115: vim] Error 1
make[1]: Leaving directory '/home/werner/Public/editor/vim/vim.git/src'
make: *** [Makefile:29: first] Error 2





>
> Note that vim-from-git builds fine here on mageia linux v8 x64, after running
> this script:
>
> https://github.com/shlomif/shlomif-computer-settings/blob/d70ed1eac69f2ae85e1493e2f693b8e2b32d228a/shlomif-settings/build-scripts/build/vim.sh
>
> ```
> #!/usr/bin/env bash
> set -x
> ./configure "$@" --prefix=$HOME/apps/vim \
> --enable-fail-if-missing \
> --with-features=huge \
> --enable-luainterp \
> --enable-perlinterp \
> --enable-perlinterp \

The above two lines are dup.

> --enable-pythoninterp \
> --enable-rubyinterp \
> --enable-tclinterp \
> --enable-gui=gtk3 \
>
> ```
>
> ```
> [shlomif@telaviv1 vim-git]$ git show | head -3
> commit 2695de63e370235c4d3d73e3fe07cc1006de3460
> Author: Bram Moolenaar <Bram@vim.org>
> Date: Fri Apr 17 21:13:01 2020 +0200

$ git show | head -3
commit 2695de63e370235c4d3d73e3fe07cc1006de3460
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 17 21:13:01 2020 +0200



> [shlomif@telaviv1 vim-git]$ ldd src/vim | grep lua
> liblua.so.5.2 => /lib64/liblua.so.5.2 (0x00007fe3c73a3000)
> [shlomif@telaviv1 vim-git]$
> ```
>
> Can you provide more details about your operating system

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan


>and how you ran
> `./configure`?

./configure \
--enable-fail-if-missing \
--enable-autoservername \
--enable-cscope \
--enable-fontset \
--enable-multibyte \
--enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp=yes \
--enable-python3interp=yes \
--enable-rubyinterp \
--enable-tclinterp \
--with-tclsh=/usr/bin/tclsh \
--enable-gui=gtk3 \
--enable-terminal \
--enable-xim \
--with-x \
--with-luajit \
--with-lua-prefix=/usr/local \
--with-features=huge




>
>
>
> --
>
> Shlomi Fish https://www.shlomifish.org/
> https://is.gd/MQHVF3 - The Atom Text Editor edits a 2,000,001B file
>
> I promised, I forgot, I did not keep my promise — just shoot me, and get on
> with it!
> — https://www.shlomifish.org/humour.html
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply .



--
Hongyi Zhao <hongyi.zhao@gmail.com>

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6POJDhU_jHZqvs5Er2TRf%3Dwwr-ktxrV9poA6UFMuQcB0M8w%40mail.gmail.com.

No comments:

Post a Comment