Failed to compile vim with lua support.

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Failed to compile vim with lua support.

Hongyi Zhao
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'
/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





--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6PO%2BPUbonpG%3DYpx3krrObSppW%3D3XfmqQJ6LSvHWtcrkU1ZA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
Hi Hongyi Zhao!

On Sat, 18 Apr 2020 08:09:57 +0800
Hongyi Zhao <[hidden email]> 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`?

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 \
    --enable-pythoninterp \
    --enable-rubyinterp \
    --enable-tclinterp \
    --enable-gui=gtk3 \

```

```
[shlomif@telaviv1 vim-git]$ git show | head -3
commit 2695de63e370235c4d3d73e3fe07cc1006de3460
Author: Bram Moolenaar <[hidden email]>
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 and how you ran
`./configure`?



--

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 .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418102014.2b069f37%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午3:20写道:

>
> Hi Hongyi Zhao!
>
> On Sat, 18 Apr 2020 08:09:57 +0800
> Hongyi Zhao <[hidden email]> 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 <[hidden email]>
> Date:   Fri Apr 17 21:13:01 2020 +0200

$ git show | head -3
commit 2695de63e370235c4d3d73e3fe07cc1006de3460
Author: Bram Moolenaar <[hidden email]>
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 <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6POJDhU_jHZqvs5Er2TRf%3Dwwr-ktxrV9poA6UFMuQcB0M8w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
Hi!

CCing the list.

On Sat, 18 Apr 2020 18:02:18 +0800
Hongyi Zhao <[hidden email]> wrote:

> Aonther thing to note: I installed moonjit to substitute the luajit
> which is not-maintained now.
>
> See following:
> $ luajit -v
> moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> https://github.com/moonjit/moonjit
>

With this:

```

./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 \
    --with-features=huge

```

vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr and
using mageia's luajit.

> Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午5:59写道:
> >
> > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午3:20写道:  
> > >
> > > Hi Hongyi Zhao!
> > >
> > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > Hongyi Zhao <[hidden email]> 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 <[hidden email]>
> > > Date:   Fri Apr 17 21:13:01 2020 +0200  
> >
> > $ git show | head -3
> > commit 2695de63e370235c4d3d73e3fe07cc1006de3460
> > Author: Bram Moolenaar <[hidden email]>
> > 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 <[hidden email]>  
>
>
>



--

Shlomi Fish       https://www.shlomifish.org/
https://www.shlomifish.org/humour/bits/Can-I-SCO-Now/ - “Can I SCO Now?”

“My name is Inigo Montoya. You forced my father to write XSLT. Prepare to die!
And be thankful I don’t force you to write XSLT.”
    — https://www.shlomifish.org/humour/bits/facts/XSLT/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418132827.074267e3%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午6:28写道:

>
> Hi!
>
> CCing the list.
>
> On Sat, 18 Apr 2020 18:02:18 +0800
> Hongyi Zhao <[hidden email]> wrote:
>
> > Aonther thing to note: I installed moonjit to substitute the luajit
> > which is not-maintained now.
> >
> > See following:
> > $ luajit -v
> > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > https://github.com/moonjit/moonjit
> >
>
> With this:
>
> ```
>
> ./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 \

No, I use the self compiled lua/moonjit which installed under /usr/local:

werner@ubuntu-01:~$ which lua
/usr/local/bin/lua
werner@ubuntu-01:~$ which luajit
/usr/local/bin/luajit

>     --with-features=huge
>
> ```
>
> vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr and
> using mageia's luajit.
>
> > Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午5:59写道:
> > >
> > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午3:20写道:
> > > >
> > > > Hi Hongyi Zhao!
> > > >
> > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > Hongyi Zhao <[hidden email]> 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 <[hidden email]>
> > > > Date:   Fri Apr 17 21:13:01 2020 +0200
> > >
> > > $ git show | head -3
> > > commit 2695de63e370235c4d3d73e3fe07cc1006de3460
> > > Author: Bram Moolenaar <[hidden email]>
> > > 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 <[hidden email]>
> >
> >
> >
>
>
>
> --
>
> Shlomi Fish       https://www.shlomifish.org/
> https://www.shlomifish.org/humour/bits/Can-I-SCO-Now/ - “Can I SCO Now?”
>
> “My name is Inigo Montoya. You forced my father to write XSLT. Prepare to die!
> And be thankful I don’t force you to write XSLT.”
>     — https://www.shlomifish.org/humour/bits/facts/XSLT/
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply .



--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6PO%2B68-j9N7wS0fpbHJd-0EL2GLORRoDMKtTf0p-f0Y6fnA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
Hi!

On Sat, 18 Apr 2020 18:56:56 +0800
Hongyi Zhao <[hidden email]> wrote:

> Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午6:28写道:
> >
> > Hi!
> >
> > CCing the list.
> >
> > On Sat, 18 Apr 2020 18:02:18 +0800
> > Hongyi Zhao <[hidden email]> wrote:
> >  
> > > Aonther thing to note: I installed moonjit to substitute the luajit
> > > which is not-maintained now.
> > >
> > > See following:
> > > $ luajit -v
> > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > https://github.com/moonjit/moonjit
> > >  
> >
> > With this:
> >
> > ```
> >
> > ./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 \  
>
> No, I use the self compiled lua/moonjit which installed under /usr/local:
>
> werner@ubuntu-01:~$ which lua
> /usr/local/bin/lua
> werner@ubuntu-01:~$ which luajit
> /usr/local/bin/luajit
>

After using this to build moonjit git:

```
#! /bin/sh
#
# moonjit.sh
# Copyright (C) 2020 Shlomi Fish <[hidden email]>
#
# Distributed under terms of the MIT license.
#


make PREFIX="$HOME/apps/to-del-moonjit" all install
```

and this to build vim:

```
luajit_pref="$HOME/apps/to-del-moonjit"
PATH="$luajit_pref/bin:$PATH"
./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="$luajit_pref" \
    --with-features=huge

```

I got:

```
checking for Haiku... no
checking for QNX... no
checking for Darwin (Mac OS X)... no
checking AvailabilityMacros.h usability... no
checking AvailabilityMacros.h presence... no
checking for AvailabilityMacros.h... no
checking --with-local-dir argument... Defaulting to /usr/local
checking --with-vim-name argument... Defaulting to vim
checking --with-ex-name argument... Defaulting to ex
checking --with-view-name argument... Defaulting to view
checking --with-global-runtime argument... no
checking --with-modified-by argument... no
checking if character set is EBCDIC... no
checking --disable-smack argument... no
checking linux/xattr.h usability... yes
checking linux/xattr.h presence... yes
checking for linux/xattr.h... yes
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
checking --disable-selinux argument... no
checking for is_selinux_enabled in -lselinux... yes
checking selinux/selinux.h usability... yes
checking selinux/selinux.h presence... yes
checking for selinux/selinux.h... yes
checking --with-features argument... huge
checking --with-compiledby argument... no
checking --disable-xsmp argument... no
checking --disable-xsmp-interact argument... no
checking --enable-luainterp argument... yes
checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
checking --with-luajit... yes
checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit
developers. https://github.com/moonjit/moonjit checking Lua version of
LuaJIT... 5.1 checking if lua.h can be found in
/home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 -- Copyright (C)
2019-2020 moonjit developers. https://github.com/moonjit/moonjit... checking if
lua.h can be found in /home/shlomif/apps/to-del-moonjit/include... no checking
if lua.h can be found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no
configure: error: could not configure lua [shlomif@telaviv1 vim-git]$
```

So my guess is that vim and moonjit are not compatible with each other.

YOu can try my fix at https://github.com/shlomif/vim/tree/lua-moonjit-support
(note the branch) which seems to work.

> >     --with-features=huge
> >
> > ```
> >
> > vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr and
> > using mageia's luajit.
> >  
> > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午5:59写道:  
> > > >
> > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午3:20写道:
> > > >  
> > > > >
> > > > > Hi Hongyi Zhao!
> > > > >
> > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > >  

--

Shlomi Fish       https://www.shlomifish.org/
https://youtu.be/KxGRhd_iWuE - Never Give Up!!

Sometimes you don’t need to be familiar with a better alternative to know that
something sucks. Take Microsoft Word for example.
    — Shlomi Fish’s friend.

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
No, still failed, see following:

$ git clone https://github.com/shlomif/vim.git vim.git
$ cd vim.git
$ ./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

$ make -j1
[...]
/usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
/home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
undefined reference to `lua_setglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
undefined reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
undefined reference to `lua_rotate'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
undefined reference to `lua_pcallk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
undefined reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
make: *** [Makefile:29: first] Error 2

Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:

>
> Hi!
>
> On Sat, 18 Apr 2020 18:56:56 +0800
> Hongyi Zhao <[hidden email]> wrote:
>
> > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午6:28写道:
> > >
> > > Hi!
> > >
> > > CCing the list.
> > >
> > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > Hongyi Zhao <[hidden email]> wrote:
> > >
> > > > Aonther thing to note: I installed moonjit to substitute the luajit
> > > > which is not-maintained now.
> > > >
> > > > See following:
> > > > $ luajit -v
> > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > https://github.com/moonjit/moonjit
> > > >
> > >
> > > With this:
> > >
> > > ```
> > >
> > > ./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 \
> >
> > No, I use the self compiled lua/moonjit which installed under /usr/local:
> >
> > werner@ubuntu-01:~$ which lua
> > /usr/local/bin/lua
> > werner@ubuntu-01:~$ which luajit
> > /usr/local/bin/luajit
> >
>
> After using this to build moonjit git:
>
> ```
> #! /bin/sh
> #
> # moonjit.sh
> # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> #
> # Distributed under terms of the MIT license.
> #
>
>
> make PREFIX="$HOME/apps/to-del-moonjit" all install
> ```
>
> and this to build vim:
>
> ```
> luajit_pref="$HOME/apps/to-del-moonjit"
> PATH="$luajit_pref/bin:$PATH"
> ./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="$luajit_pref" \
>     --with-features=huge
>
> ```
>
> I got:
>
> ```
> checking for Haiku... no
> checking for QNX... no
> checking for Darwin (Mac OS X)... no
> checking AvailabilityMacros.h usability... no
> checking AvailabilityMacros.h presence... no
> checking for AvailabilityMacros.h... no
> checking --with-local-dir argument... Defaulting to /usr/local
> checking --with-vim-name argument... Defaulting to vim
> checking --with-ex-name argument... Defaulting to ex
> checking --with-view-name argument... Defaulting to view
> checking --with-global-runtime argument... no
> checking --with-modified-by argument... no
> checking if character set is EBCDIC... no
> checking --disable-smack argument... no
> checking linux/xattr.h usability... yes
> checking linux/xattr.h presence... yes
> checking for linux/xattr.h... yes
> checking attr/xattr.h usability... no
> checking attr/xattr.h presence... no
> checking for attr/xattr.h... no
> checking --disable-selinux argument... no
> checking for is_selinux_enabled in -lselinux... yes
> checking selinux/selinux.h usability... yes
> checking selinux/selinux.h presence... yes
> checking for selinux/selinux.h... yes
> checking --with-features argument... huge
> checking --with-compiledby argument... no
> checking --disable-xsmp argument... no
> checking --disable-xsmp-interact argument... no
> checking --enable-luainterp argument... yes
> checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> checking --with-luajit... yes
> checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit
> developers. https://github.com/moonjit/moonjit checking Lua version of
> LuaJIT... 5.1 checking if lua.h can be found in
> /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 -- Copyright (C)
> 2019-2020 moonjit developers. https://github.com/moonjit/moonjit... checking if
> lua.h can be found in /home/shlomif/apps/to-del-moonjit/include... no checking
> if lua.h can be found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no
> configure: error: could not configure lua [shlomif@telaviv1 vim-git]$
> ```
>
> So my guess is that vim and moonjit are not compatible with each other.
>
> YOu can try my fix at https://github.com/shlomif/vim/tree/lua-moonjit-support
> (note the branch) which seems to work.
>
> > >     --with-features=huge
> > >
> > > ```
> > >
> > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr and
> > > using mageia's luajit.
> > >
> > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午5:59写道:
> > > > >
> > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午3:20写道:
> > > > >
> > > > > >
> > > > > > Hi Hongyi Zhao!
> > > > > >
> > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > >
>
> --
>
> Shlomi Fish       https://www.shlomifish.org/
> https://youtu.be/KxGRhd_iWuE - Never Give Up!!
>
> Sometimes you don’t need to be familiar with a better alternative to know that
> something sucks. Take Microsoft Word for example.
>     — Shlomi Fish’s friend.
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply .
>
> --
> --
> 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 [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.



--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6PO%2BDicDKi3rmERAow7Cg5Dxwmna9h%2BcMQVHZn-gtbRurOA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
Hi,

On Sat, 18 Apr 2020 19:51:09 +0800
Hongyi Zhao <[hidden email]> wrote:

> No, still failed, see following:
>
> $ git clone https://github.com/shlomif/vim.git vim.git

You are using the wrong git branch:

https://github.com/shlomif/vim/tree/lua-moonjit-support

execute "git checkout lua-moonjit-support"

> $ cd vim.git
> $ ./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
>
> $ make -j1
> [...]
> /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> undefined reference to `lua_setglobal'
> /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> undefined reference to `lua_getglobal' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> undefined reference to `lua_getglobal' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> undefined reference to `lua_callk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> undefined reference to `lua_getglobal' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> undefined reference to `lua_rotate' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> undefined reference to `lua_pcallk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> undefined reference to `lua_callk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> make: *** [Makefile:29: first] Error 2
>
> Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:
> >
> > Hi!
> >
> > On Sat, 18 Apr 2020 18:56:56 +0800
> > Hongyi Zhao <[hidden email]> wrote:
> >  
> > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午6:28写道:  
> > > >
> > > > Hi!
> > > >
> > > > CCing the list.
> > > >
> > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > Hongyi Zhao <[hidden email]> wrote:
> > > >  
> > > > > Aonther thing to note: I installed moonjit to substitute the luajit
> > > > > which is not-maintained now.
> > > > >
> > > > > See following:
> > > > > $ luajit -v
> > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > https://github.com/moonjit/moonjit
> > > > >  
> > > >
> > > > With this:
> > > >
> > > > ```
> > > >
> > > > ./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 \  
> > >
> > > No, I use the self compiled lua/moonjit which installed under /usr/local:
> > >
> > > werner@ubuntu-01:~$ which lua
> > > /usr/local/bin/lua
> > > werner@ubuntu-01:~$ which luajit
> > > /usr/local/bin/luajit
> > >  
> >
> > After using this to build moonjit git:
> >
> > ```
> > #! /bin/sh
> > #
> > # moonjit.sh
> > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > #
> > # Distributed under terms of the MIT license.
> > #
> >
> >
> > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > ```
> >
> > and this to build vim:
> >
> > ```
> > luajit_pref="$HOME/apps/to-del-moonjit"
> > PATH="$luajit_pref/bin:$PATH"
> > ./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="$luajit_pref" \
> >     --with-features=huge
> >
> > ```
> >
> > I got:
> >
> > ```
> > checking for Haiku... no
> > checking for QNX... no
> > checking for Darwin (Mac OS X)... no
> > checking AvailabilityMacros.h usability... no
> > checking AvailabilityMacros.h presence... no
> > checking for AvailabilityMacros.h... no
> > checking --with-local-dir argument... Defaulting to /usr/local
> > checking --with-vim-name argument... Defaulting to vim
> > checking --with-ex-name argument... Defaulting to ex
> > checking --with-view-name argument... Defaulting to view
> > checking --with-global-runtime argument... no
> > checking --with-modified-by argument... no
> > checking if character set is EBCDIC... no
> > checking --disable-smack argument... no
> > checking linux/xattr.h usability... yes
> > checking linux/xattr.h presence... yes
> > checking for linux/xattr.h... yes
> > checking attr/xattr.h usability... no
> > checking attr/xattr.h presence... no
> > checking for attr/xattr.h... no
> > checking --disable-selinux argument... no
> > checking for is_selinux_enabled in -lselinux... yes
> > checking selinux/selinux.h usability... yes
> > checking selinux/selinux.h presence... yes
> > checking for selinux/selinux.h... yes
> > checking --with-features argument... huge
> > checking --with-compiledby argument... no
> > checking --disable-xsmp argument... no
> > checking --disable-xsmp-interact argument... no
> > checking --enable-luainterp argument... yes
> > checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> > checking --with-luajit... yes
> > checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> > checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit
> > developers. https://github.com/moonjit/moonjit checking Lua version of
> > LuaJIT... 5.1 checking if lua.h can be found in
> > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 -- Copyright
> > (C) 2019-2020 moonjit developers. https://github.com/moonjit/moonjit...
> > checking if lua.h can be found in
> > /home/shlomif/apps/to-del-moonjit/include... no checking if lua.h can be
> > found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no configure:
> > error: could not configure lua [shlomif@telaviv1 vim-git]$ ```
> >
> > So my guess is that vim and moonjit are not compatible with each other.
> >
> > YOu can try my fix at
> > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the branch)
> > which seems to work.
> > > >     --with-features=huge
> > > >
> > > > ```
> > > >
> > > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr
> > > > and using mageia's luajit.
> > > >  
> > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > 下午5:59写道:  
> > > > > >
> > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > 下午3:20写道:
> > > > > > >
> > > > > > > Hi Hongyi Zhao!
> > > > > > >
> > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > >  
> >
> > --
> >
> > Shlomi Fish       https://www.shlomifish.org/
> > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> >
> > Sometimes you don’t need to be familiar with a better alternative to know
> > that something sucks. Take Microsoft Word for example.
> >     — Shlomi Fish’s friend.
> >
> > Please reply to list if it's a mailing list post - https://shlom.in/reply .
> >
> > --
> > --
> > 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 [hidden email]. To view
> > this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> >  
>
>
>



--

Shlomi Fish       https://www.shlomifish.org/
https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job

He has a high degree of idealism, a high degree of stubbornness, and an even
higher degree of inability to distiniguish between the two.
    — https://www.shlomifish.org/humour.html

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418151829.748b7ccc%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:

>
> Hi,
>
> On Sat, 18 Apr 2020 19:51:09 +0800
> Hongyi Zhao <[hidden email]> wrote:
>
> > No, still failed, see following:
> >
> > $ git clone https://github.com/shlomif/vim.git vim.git
>
> You are using the wrong git branch:
>
> https://github.com/shlomif/vim/tree/lua-moonjit-support
>
> execute "git checkout lua-moonjit-support"

Failed, see following:

$ git clean -xdf
$ git checkout lua-moonjit-support
$ git branch
* lua-moonjit-support
  master
[...]
$ make -j1
[...]
/usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
/home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
undefined reference to `lua_setglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
undefined reference to `luaL_prepbuffsize'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
undefined reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
undefined reference to `lua_getglobal'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
undefined reference to `lua_rotate'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
undefined reference to `lua_pcallk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
undefined reference to `lua_callk'
/usr/bin/ld: /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
make: *** [Makefile:29: first] Error 2




>
> > $ cd vim.git
> > $ ./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
> >
> > $ make -j1
> > [...]
> > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > undefined reference to `lua_setglobal'
> > /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > undefined reference to `lua_callk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > undefined reference to `lua_rotate' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > undefined reference to `lua_pcallk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > undefined reference to `lua_callk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > make: *** [Makefile:29: first] Error 2
> >
> > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:
> > >
> > > Hi!
> > >
> > > On Sat, 18 Apr 2020 18:56:56 +0800
> > > Hongyi Zhao <[hidden email]> wrote:
> > >
> > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午6:28写道:
> > > > >
> > > > > Hi!
> > > > >
> > > > > CCing the list.
> > > > >
> > > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > >
> > > > > > Aonther thing to note: I installed moonjit to substitute the luajit
> > > > > > which is not-maintained now.
> > > > > >
> > > > > > See following:
> > > > > > $ luajit -v
> > > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > > https://github.com/moonjit/moonjit
> > > > > >
> > > > >
> > > > > With this:
> > > > >
> > > > > ```
> > > > >
> > > > > ./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 \
> > > >
> > > > No, I use the self compiled lua/moonjit which installed under /usr/local:
> > > >
> > > > werner@ubuntu-01:~$ which lua
> > > > /usr/local/bin/lua
> > > > werner@ubuntu-01:~$ which luajit
> > > > /usr/local/bin/luajit
> > > >
> > >
> > > After using this to build moonjit git:
> > >
> > > ```
> > > #! /bin/sh
> > > #
> > > # moonjit.sh
> > > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > > #
> > > # Distributed under terms of the MIT license.
> > > #
> > >
> > >
> > > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > > ```
> > >
> > > and this to build vim:
> > >
> > > ```
> > > luajit_pref="$HOME/apps/to-del-moonjit"
> > > PATH="$luajit_pref/bin:$PATH"
> > > ./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="$luajit_pref" \
> > >     --with-features=huge
> > >
> > > ```
> > >
> > > I got:
> > >
> > > ```
> > > checking for Haiku... no
> > > checking for QNX... no
> > > checking for Darwin (Mac OS X)... no
> > > checking AvailabilityMacros.h usability... no
> > > checking AvailabilityMacros.h presence... no
> > > checking for AvailabilityMacros.h... no
> > > checking --with-local-dir argument... Defaulting to /usr/local
> > > checking --with-vim-name argument... Defaulting to vim
> > > checking --with-ex-name argument... Defaulting to ex
> > > checking --with-view-name argument... Defaulting to view
> > > checking --with-global-runtime argument... no
> > > checking --with-modified-by argument... no
> > > checking if character set is EBCDIC... no
> > > checking --disable-smack argument... no
> > > checking linux/xattr.h usability... yes
> > > checking linux/xattr.h presence... yes
> > > checking for linux/xattr.h... yes
> > > checking attr/xattr.h usability... no
> > > checking attr/xattr.h presence... no
> > > checking for attr/xattr.h... no
> > > checking --disable-selinux argument... no
> > > checking for is_selinux_enabled in -lselinux... yes
> > > checking selinux/selinux.h usability... yes
> > > checking selinux/selinux.h presence... yes
> > > checking for selinux/selinux.h... yes
> > > checking --with-features argument... huge
> > > checking --with-compiledby argument... no
> > > checking --disable-xsmp argument... no
> > > checking --disable-xsmp-interact argument... no
> > > checking --enable-luainterp argument... yes
> > > checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> > > checking --with-luajit... yes
> > > checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> > > checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit
> > > developers. https://github.com/moonjit/moonjit checking Lua version of
> > > LuaJIT... 5.1 checking if lua.h can be found in
> > > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 -- Copyright
> > > (C) 2019-2020 moonjit developers. https://github.com/moonjit/moonjit...
> > > checking if lua.h can be found in
> > > /home/shlomif/apps/to-del-moonjit/include... no checking if lua.h can be
> > > found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no configure:
> > > error: could not configure lua [shlomif@telaviv1 vim-git]$ ```
> > >
> > > So my guess is that vim and moonjit are not compatible with each other.
> > >
> > > YOu can try my fix at
> > > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the branch)
> > > which seems to work.
> > > > >     --with-features=huge
> > > > >
> > > > > ```
> > > > >
> > > > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to /usr
> > > > > and using mageia's luajit.
> > > > >
> > > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > > 下午5:59写道:
> > > > > > >
> > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > 下午3:20写道:
> > > > > > > >
> > > > > > > > Hi Hongyi Zhao!
> > > > > > > >
> > > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > >
> > >
> > > --
> > >
> > > Shlomi Fish       https://www.shlomifish.org/
> > > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> > >
> > > Sometimes you don’t need to be familiar with a better alternative to know
> > > that something sucks. Take Microsoft Word for example.
> > >     — Shlomi Fish’s friend.
> > >
> > > Please reply to list if it's a mailing list post - https://shlom.in/reply .
> > >
> > > --
> > > --
> > > 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 [hidden email]. To view
> > > this discussion on the web visit
> > > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> > >
> >
> >
> >
>
>
>
> --
>
> Shlomi Fish       https://www.shlomifish.org/
> https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job
>
> He has a high degree of idealism, a high degree of stubbornness, and an even
> higher degree of inability to distiniguish between the two.
>     — https://www.shlomifish.org/humour.html
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply .



--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6POL_cvMny5vYqNj1yjVq8qXYitR%3DeFJ%2BObxZwOV3QVghKA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
Hi,

On Sat, 18 Apr 2020 20:42:38 +0800
Hongyi Zhao <[hidden email]> wrote:

> Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:
> >
> > Hi,
> >
> > On Sat, 18 Apr 2020 19:51:09 +0800
> > Hongyi Zhao <[hidden email]> wrote:
> >  
> > > No, still failed, see following:
> > >
> > > $ git clone https://github.com/shlomif/vim.git vim.git  
> >
> > You are using the wrong git branch:
> >
> > https://github.com/shlomif/vim/tree/lua-moonjit-support
> >
> > execute "git checkout lua-moonjit-support"  
>
> Failed, see following:
>
> $ git clean -xdf
> $ git checkout lua-moonjit-support
> $ git branch
> * lua-moonjit-support
>   master
> [...]
> $ make -j1
> [...]
> /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> undefined reference to `lua_setglobal'
> /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> undefined reference to `lua_getglobal' /usr/bin/ld:

First of all, I suggest removing moonjit out of /usr/local and installing it to
its own path (say "/opt/moonjit" or "/usr/local/apps/moonjit"). After that [and
after fixing the "./configure" invocation], try playing with these:

https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

As well as
https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux

Good luck!

> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> undefined reference to `lua_getglobal' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> undefined reference to `lua_callk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> undefined reference to `lua_getglobal' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> undefined reference to `lua_rotate' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> undefined reference to `lua_pcallk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> undefined reference to `lua_callk' /usr/bin/ld:
> /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> make: *** [Makefile:29: first] Error 2
>
>
>
>
> >  
> > > $ cd vim.git
> > > $ ./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
> > >
> > > $ make -j1
> > > [...]
> > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > undefined reference to `lua_setglobal'
> > > /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > undefined reference to `lua_callk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > undefined reference to `lua_callk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > make: *** [Makefile:29: first] Error 2
> > >
> > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:  
> > > >
> > > > Hi!
> > > >
> > > > On Sat, 18 Apr 2020 18:56:56 +0800
> > > > Hongyi Zhao <[hidden email]> wrote:
> > > >  
> > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > 下午6:28写道:  
> > > > > >
> > > > > > Hi!
> > > > > >
> > > > > > CCing the list.
> > > > > >
> > > > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > >  
> > > > > > > Aonther thing to note: I installed moonjit to substitute the
> > > > > > > luajit which is not-maintained now.
> > > > > > >
> > > > > > > See following:
> > > > > > > $ luajit -v
> > > > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > > > https://github.com/moonjit/moonjit
> > > > > > >  
> > > > > >
> > > > > > With this:
> > > > > >
> > > > > > ```
> > > > > >
> > > > > > ./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 \  
> > > > >
> > > > > No, I use the self compiled lua/moonjit which installed under
> > > > > /usr/local:
> > > > >
> > > > > werner@ubuntu-01:~$ which lua
> > > > > /usr/local/bin/lua
> > > > > werner@ubuntu-01:~$ which luajit
> > > > > /usr/local/bin/luajit
> > > > >  
> > > >
> > > > After using this to build moonjit git:
> > > >
> > > > ```
> > > > #! /bin/sh
> > > > #
> > > > # moonjit.sh
> > > > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > > > #
> > > > # Distributed under terms of the MIT license.
> > > > #
> > > >
> > > >
> > > > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > > > ```
> > > >
> > > > and this to build vim:
> > > >
> > > > ```
> > > > luajit_pref="$HOME/apps/to-del-moonjit"
> > > > PATH="$luajit_pref/bin:$PATH"
> > > > ./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="$luajit_pref" \
> > > >     --with-features=huge
> > > >
> > > > ```
> > > >
> > > > I got:
> > > >
> > > > ```
> > > > checking for Haiku... no
> > > > checking for QNX... no
> > > > checking for Darwin (Mac OS X)... no
> > > > checking AvailabilityMacros.h usability... no
> > > > checking AvailabilityMacros.h presence... no
> > > > checking for AvailabilityMacros.h... no
> > > > checking --with-local-dir argument... Defaulting to /usr/local
> > > > checking --with-vim-name argument... Defaulting to vim
> > > > checking --with-ex-name argument... Defaulting to ex
> > > > checking --with-view-name argument... Defaulting to view
> > > > checking --with-global-runtime argument... no
> > > > checking --with-modified-by argument... no
> > > > checking if character set is EBCDIC... no
> > > > checking --disable-smack argument... no
> > > > checking linux/xattr.h usability... yes
> > > > checking linux/xattr.h presence... yes
> > > > checking for linux/xattr.h... yes
> > > > checking attr/xattr.h usability... no
> > > > checking attr/xattr.h presence... no
> > > > checking for attr/xattr.h... no
> > > > checking --disable-selinux argument... no
> > > > checking for is_selinux_enabled in -lselinux... yes
> > > > checking selinux/selinux.h usability... yes
> > > > checking selinux/selinux.h presence... yes
> > > > checking for selinux/selinux.h... yes
> > > > checking --with-features argument... huge
> > > > checking --with-compiledby argument... no
> > > > checking --disable-xsmp argument... no
> > > > checking --disable-xsmp-interact argument... no
> > > > checking --enable-luainterp argument... yes
> > > > checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> > > > checking --with-luajit... yes
> > > > checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> > > > checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020
> > > > moonjit developers. https://github.com/moonjit/moonjit checking Lua
> > > > version of LuaJIT... 5.1 checking if lua.h can be found in
> > > > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 --
> > > > Copyright (C) 2019-2020 moonjit developers.
> > > > https://github.com/moonjit/moonjit... checking if lua.h can be found in
> > > > /home/shlomif/apps/to-del-moonjit/include... no checking if lua.h can be
> > > > found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no
> > > > configure: error: could not configure lua [shlomif@telaviv1 vim-git]$
> > > > ```
> > > >
> > > > So my guess is that vim and moonjit are not compatible with each other.
> > > >
> > > > YOu can try my fix at
> > > > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the
> > > > branch) which seems to work.  
> > > > > >     --with-features=huge
> > > > > >
> > > > > > ```
> > > > > >
> > > > > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to
> > > > > > /usr and using mageia's luajit.
> > > > > >  
> > > > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > > > 下午5:59写道:  
> > > > > > > >
> > > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > > 下午3:20写道:  
> > > > > > > > >
> > > > > > > > > Hi Hongyi Zhao!
> > > > > > > > >
> > > > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > > >  
> > > >
> > > > --
> > > >
> > > > Shlomi Fish       https://www.shlomifish.org/
> > > > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> > > >
> > > > Sometimes you don’t need to be familiar with a better alternative to
> > > > know that something sucks. Take Microsoft Word for example.
> > > >     — Shlomi Fish’s friend.
> > > >
> > > > Please reply to list if it's a mailing list post -
> > > > https://shlom.in/reply .
> > > >
> > > > --
> > > > --
> > > > 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
> > > > [hidden email]. To view this discussion on the
> > > > web visit
> > > > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> > >
> > >
> > >  
> >
> >
> >
> > --
> >
> > Shlomi Fish       https://www.shlomifish.org/
> > https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job
> >
> > He has a high degree of idealism, a high degree of stubbornness, and an even
> > higher degree of inability to distiniguish between the two.
> >     — https://www.shlomifish.org/humour.html
> >
> > Please reply to list if it's a mailing list post - https://shlom.in/reply .
> >  
>
>
>



--

Shlomi Fish       https://www.shlomifish.org/
My Aphorisms - https://www.shlomifish.org/humour.html

Academic Politics are so vicious precisely because the stakes are so low.
    — https://quoteinvestigator.com/2013/08/18/acad-politics/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418155327.57057920%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:53写道:

>
> Hi,
>
> On Sat, 18 Apr 2020 20:42:38 +0800
> Hongyi Zhao <[hidden email]> wrote:
>
> > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:
> > >
> > > Hi,
> > >
> > > On Sat, 18 Apr 2020 19:51:09 +0800
> > > Hongyi Zhao <[hidden email]> wrote:
> > >
> > > > No, still failed, see following:
> > > >
> > > > $ git clone https://github.com/shlomif/vim.git vim.git
> > >
> > > You are using the wrong git branch:
> > >
> > > https://github.com/shlomif/vim/tree/lua-moonjit-support
> > >
> > > execute "git checkout lua-moonjit-support"
> >
> > Failed, see following:
> >
> > $ git clean -xdf
> > $ git checkout lua-moonjit-support
> > $ git branch
> > * lua-moonjit-support
> >   master
> > [...]
> > $ make -j1
> > [...]
> > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > undefined reference to `lua_setglobal'
> > /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
>
> First of all, I suggest removing moonjit out of /usr/local and installing it to
> its own path (say "/opt/moonjit" or "/usr/local/apps/moonjit"). After that [and
> after fixing the "./configure" invocation], try playing with these:

The only relative moonjit/luajit in "./configure" invocation is as following:

--with-luajit

Which has not location relative argument, so this is no need to fix
anything for my case of the "./configure" options.



>
> https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
>
> As well as
> https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux

It does the trick.  Thanks a lot. But I stilll cannot figure out why
must I install it into separate dirctory otherwise it will failed to
work.

The method I used is as following:

  I prepare a module file and then use lmod to loade it, the file has
the following contents which is used to set the environment variables:


#%Module
setenv CPATH {/home/werner/moonjit/include/moonjit-2.3}
setenv C_INCLUDE_PATH {/home/werner/moonjit/include/moonjit-2.3}
prepend-path LD_LIBRARY_PATH {/home/werner/moonjit/lib}
setenv LIBRARY_PATH {/home/werner/moonjit/lib}
prepend-path PATH {/home/werner/moonjit/bin}


See the final result:
 $ ldd src/vim | grep jit
    libluajit-5.1.so.2 => /home/werner/moonjit/lib/libluajit-5.1.so.2
(0x00007f56f4490000)

$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 18 2020 21:26:42)
Included patches: 1-592
Compiled by werner@ubuntu-01
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       +tcl
+autoservername    +folding           +multi_byte        +termguicolors
+balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
+browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl              +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           +python/dyn        +visual
+conceal           +linebreak         +python3/dyn       +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua               +ruby              +wildmenu
+dialog_con_gui    +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       +X11
+dnd               +mouse             -sound             -xfontset
-ebcdic            +mouseshape        +spell             +xim
+emacs_tags        +mouse_dec         +startuptime       +xpm
+eval              +mouse_gpm         +statusline        +xsmp_interact
+ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid
-I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount
-I/usr/include/blkid -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now
-fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E
-L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3
-lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo
-lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm
-lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux   -lacl -lattr
-lgpm -ldl  -L/usr/local/lib/x86_64-linux-gnu -lluajit-5.1 -Wl,-E
-fstack-protector-strong -L/usr/local/lib
-L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread
-lcrypt   -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
-lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm


Regards


>
> Good luck!
>
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > undefined reference to `lua_callk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > undefined reference to `lua_getglobal' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > undefined reference to `lua_rotate' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > undefined reference to `lua_pcallk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > undefined reference to `lua_callk' /usr/bin/ld:
> > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > make: *** [Makefile:29: first] Error 2
> >
> >
> >
> >
> > >
> > > > $ cd vim.git
> > > > $ ./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
> > > >
> > > > $ make -j1
> > > > [...]
> > > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > > undefined reference to `lua_setglobal'
> > > > /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > > make: *** [Makefile:29: first] Error 2
> > > >
> > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:
> > > > >
> > > > > Hi!
> > > > >
> > > > > On Sat, 18 Apr 2020 18:56:56 +0800
> > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > >
> > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > 下午6:28写道:
> > > > > > >
> > > > > > > Hi!
> > > > > > >
> > > > > > > CCing the list.
> > > > > > >
> > > > > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > >
> > > > > > > > Aonther thing to note: I installed moonjit to substitute the
> > > > > > > > luajit which is not-maintained now.
> > > > > > > >
> > > > > > > > See following:
> > > > > > > > $ luajit -v
> > > > > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > > > > https://github.com/moonjit/moonjit
> > > > > > > >
> > > > > > >
> > > > > > > With this:
> > > > > > >
> > > > > > > ```
> > > > > > >
> > > > > > > ./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 \
> > > > > >
> > > > > > No, I use the self compiled lua/moonjit which installed under
> > > > > > /usr/local:
> > > > > >
> > > > > > werner@ubuntu-01:~$ which lua
> > > > > > /usr/local/bin/lua
> > > > > > werner@ubuntu-01:~$ which luajit
> > > > > > /usr/local/bin/luajit
> > > > > >
> > > > >
> > > > > After using this to build moonjit git:
> > > > >
> > > > > ```
> > > > > #! /bin/sh
> > > > > #
> > > > > # moonjit.sh
> > > > > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > > > > #
> > > > > # Distributed under terms of the MIT license.
> > > > > #
> > > > >
> > > > >
> > > > > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > > > > ```
> > > > >
> > > > > and this to build vim:
> > > > >
> > > > > ```
> > > > > luajit_pref="$HOME/apps/to-del-moonjit"
> > > > > PATH="$luajit_pref/bin:$PATH"
> > > > > ./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="$luajit_pref" \
> > > > >     --with-features=huge
> > > > >
> > > > > ```
> > > > >
> > > > > I got:
> > > > >
> > > > > ```
> > > > > checking for Haiku... no
> > > > > checking for QNX... no
> > > > > checking for Darwin (Mac OS X)... no
> > > > > checking AvailabilityMacros.h usability... no
> > > > > checking AvailabilityMacros.h presence... no
> > > > > checking for AvailabilityMacros.h... no
> > > > > checking --with-local-dir argument... Defaulting to /usr/local
> > > > > checking --with-vim-name argument... Defaulting to vim
> > > > > checking --with-ex-name argument... Defaulting to ex
> > > > > checking --with-view-name argument... Defaulting to view
> > > > > checking --with-global-runtime argument... no
> > > > > checking --with-modified-by argument... no
> > > > > checking if character set is EBCDIC... no
> > > > > checking --disable-smack argument... no
> > > > > checking linux/xattr.h usability... yes
> > > > > checking linux/xattr.h presence... yes
> > > > > checking for linux/xattr.h... yes
> > > > > checking attr/xattr.h usability... no
> > > > > checking attr/xattr.h presence... no
> > > > > checking for attr/xattr.h... no
> > > > > checking --disable-selinux argument... no
> > > > > checking for is_selinux_enabled in -lselinux... yes
> > > > > checking selinux/selinux.h usability... yes
> > > > > checking selinux/selinux.h presence... yes
> > > > > checking for selinux/selinux.h... yes
> > > > > checking --with-features argument... huge
> > > > > checking --with-compiledby argument... no
> > > > > checking --disable-xsmp argument... no
> > > > > checking --disable-xsmp-interact argument... no
> > > > > checking --enable-luainterp argument... yes
> > > > > checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> > > > > checking --with-luajit... yes
> > > > > checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> > > > > checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020
> > > > > moonjit developers. https://github.com/moonjit/moonjit checking Lua
> > > > > version of LuaJIT... 5.1 checking if lua.h can be found in
> > > > > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 --
> > > > > Copyright (C) 2019-2020 moonjit developers.
> > > > > https://github.com/moonjit/moonjit... checking if lua.h can be found in
> > > > > /home/shlomif/apps/to-del-moonjit/include... no checking if lua.h can be
> > > > > found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no
> > > > > configure: error: could not configure lua [shlomif@telaviv1 vim-git]$
> > > > > ```
> > > > >
> > > > > So my guess is that vim and moonjit are not compatible with each other.
> > > > >
> > > > > YOu can try my fix at
> > > > > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the
> > > > > branch) which seems to work.
> > > > > > >     --with-features=huge
> > > > > > >
> > > > > > > ```
> > > > > > >
> > > > > > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to
> > > > > > > /usr and using mageia's luajit.
> > > > > > >
> > > > > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > > > > 下午5:59写道:
> > > > > > > > >
> > > > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > > > 下午3:20写道:
> > > > > > > > > >
> > > > > > > > > > Hi Hongyi Zhao!
> > > > > > > > > >
> > > > > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Shlomi Fish       https://www.shlomifish.org/
> > > > > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> > > > >
> > > > > Sometimes you don’t need to be familiar with a better alternative to
> > > > > know that something sucks. Take Microsoft Word for example.
> > > > >     — Shlomi Fish’s friend.
> > > > >
> > > > > Please reply to list if it's a mailing list post -
> > > > > https://shlom.in/reply .
> > > > >
> > > > > --
> > > > > --
> > > > > 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
> > > > > [hidden email]. To view this discussion on the
> > > > > web visit
> > > > > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Shlomi Fish       https://www.shlomifish.org/
> > > https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job
> > >
> > > He has a high degree of idealism, a high degree of stubbornness, and an even
> > > higher degree of inability to distiniguish between the two.
> > >     — https://www.shlomifish.org/humour.html
> > >
> > > Please reply to list if it's a mailing list post - https://shlom.in/reply .
> > >
> >
> >
> >
>
>
>
> --
>
> Shlomi Fish       https://www.shlomifish.org/
> My Aphorisms - https://www.shlomifish.org/humour.html
>
> Academic Politics are so vicious precisely because the stakes are so low.
>     — https://quoteinvestigator.com/2013/08/18/acad-politics/
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply .



--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6POKG---xD0c3jzbX4WBgKbvm%3Dyo5-AWo7muzS-f0QuTc9Q%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Hongyi Zhao
Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午9:37写道:

>
> Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:53写道:
> >
> > Hi,
> >
> > On Sat, 18 Apr 2020 20:42:38 +0800
> > Hongyi Zhao <[hidden email]> wrote:
> >
> > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:
> > > >
> > > > Hi,
> > > >
> > > > On Sat, 18 Apr 2020 19:51:09 +0800
> > > > Hongyi Zhao <[hidden email]> wrote:
> > > >
> > > > > No, still failed, see following:
> > > > >
> > > > > $ git clone https://github.com/shlomif/vim.git vim.git
> > > >
> > > > You are using the wrong git branch:
> > > >
> > > > https://github.com/shlomif/vim/tree/lua-moonjit-support
> > > >
> > > > execute "git checkout lua-moonjit-support"
> > >
> > > Failed, see following:
> > >
> > > $ git clean -xdf
> > > $ git checkout lua-moonjit-support
> > > $ git branch
> > > * lua-moonjit-support
> > >   master
> > > [...]
> > > $ make -j1
> > > [...]
> > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > undefined reference to `lua_setglobal'
> > > /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> >
> > First of all, I suggest removing moonjit out of /usr/local and installing it to
> > its own path (say "/opt/moonjit" or "/usr/local/apps/moonjit"). After that [and
> > after fixing the "./configure" invocation], try playing with these:
>
> The only relative moonjit/luajit in "./configure" invocation is as following:
>
> --with-luajit
>
> Which has not location relative argument, so this is no need to fix
> anything for my case of the "./configure" options.
>
>
>
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
> >
> > As well as
> > https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux
>
> It does the trick.  Thanks a lot. But I stilll cannot figure out why
> must I install it into separate dirctory otherwise it will failed to
> work.
>
> The method I used is as following:
>
>   I prepare a module file and then use lmod to loade it, the file has
> the following contents which is used to set the environment variables:
>
>
> #%Module
> setenv CPATH {/home/werner/moonjit/include/moonjit-2.3}
> setenv C_INCLUDE_PATH {/home/werner/moonjit/include/moonjit-2.3}
> prepend-path LD_LIBRARY_PATH {/home/werner/moonjit/lib}
> setenv LIBRARY_PATH {/home/werner/moonjit/lib}
> prepend-path PATH {/home/werner/moonjit/bin}
>
>
> See the final result:
>  $ ldd src/vim | grep jit
>     libluajit-5.1.so.2 => /home/werner/moonjit/lib/libluajit-5.1.so.2

Another problem I cannot figure out: the lua version for my case is
5.3, see following:

$ lua -v
Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio

Why the above generated lib version is libluajit-5.1.so.2?

Regards

> (0x00007f56f4490000)
>
> $ vim --version
> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 18 2020 21:26:42)
> Included patches: 1-592
> Compiled by werner@ubuntu-01
> Huge version with GTK3 GUI.  Features included (+) or not (-):
> +acl               -farsi             +mouse_sgr         +tag_binary
> +arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
> +autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
> +autochdir         +float             +mouse_xterm       +tcl
> +autoservername    +folding           +multi_byte        +termguicolors
> +balloon_eval      -footer            +multi_lang        +terminal
> +balloon_eval_term +fork()            -mzscheme          +terminfo
> +browse            +gettext           +netbeans_intg     +termresponse
> ++builtin_terms    -hangul_input      +num64             +textobjects
> +byte_offset       +iconv             +packages          +textprop
> +channel           +insert_expand     +path_extra        +timers
> +cindent           +ipv6              +perl              +title
> +clientserver      +job               +persistent_undo   +toolbar
> +clipboard         +jumplist          +popupwin          +user_commands
> +cmdline_compl     +keymap            +postscript        +vartabs
> +cmdline_hist      +lambda            +printer           +vertsplit
> +cmdline_info      +langmap           +profile           +virtualedit
> +comments          +libcall           +python/dyn        +visual
> +conceal           +linebreak         +python3/dyn       +visualextra
> +cryptv            +lispindent        +quickfix          +viminfo
> +cscope            +listcmds          +reltime           +vreplace
> +cursorbind        +localmap          +rightleft         +wildignore
> +cursorshape       +lua               +ruby              +wildmenu
> +dialog_con_gui    +menu              +scrollbind        +windows
> +diff              +mksession         +signs             +writebackup
> +digraphs          +modify_fname      +smartindent       +X11
> +dnd               +mouse             -sound             -xfontset
> -ebcdic            +mouseshape        +spell             +xim
> +emacs_tags        +mouse_dec         +startuptime       +xpm
> +eval              +mouse_gpm         +statusline        +xsmp_interact
> +ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
> +extra_search      +mouse_netterm     +syntax            -xterm_save
>    system vimrc file: "$VIM/vimrc"
>      user vimrc file: "$HOME/.vimrc"
>  2nd user vimrc file: "~/.vim/vimrc"
>       user exrc file: "$HOME/.exrc"
>   system gvimrc file: "$VIM/gvimrc"
>     user gvimrc file: "$HOME/.gvimrc"
> 2nd user gvimrc file: "~/.vim/gvimrc"
>        defaults file: "$VIMRUNTIME/defaults.vim"
>     system menu file: "$VIMRUNTIME/menu.vim"
>   fall-back for $VIM: "/usr/local/share/vim"
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
> -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0
> -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid
> -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount
> -I/usr/include/blkid -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
> Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now
> -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E
> -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3
> -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo
> -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm
> -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux   -lacl -lattr
> -lgpm -ldl  -L/usr/local/lib/x86_64-linux-gnu -lluajit-5.1 -Wl,-E
> -fstack-protector-strong -L/usr/local/lib
> -L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread
> -lcrypt   -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
> -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm
>
>
> Regards
>
>
> >
> > Good luck!
> >
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > undefined reference to `lua_callk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > undefined reference to `lua_callk' /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > make: *** [Makefile:29: first] Error 2
> > >
> > >
> > >
> > >
> > > >
> > > > > $ cd vim.git
> > > > > $ ./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
> > > > >
> > > > > $ make -j1
> > > > > [...]
> > > > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > > > undefined reference to `lua_setglobal'
> > > > > /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > > > make: *** [Makefile:29: first] Error 2
> > > > >
> > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午7:37写道:
> > > > > >
> > > > > > Hi!
> > > > > >
> > > > > > On Sat, 18 Apr 2020 18:56:56 +0800
> > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > >
> > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > 下午6:28写道:
> > > > > > > >
> > > > > > > > Hi!
> > > > > > > >
> > > > > > > > CCing the list.
> > > > > > > >
> > > > > > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > >
> > > > > > > > > Aonther thing to note: I installed moonjit to substitute the
> > > > > > > > > luajit which is not-maintained now.
> > > > > > > > >
> > > > > > > > > See following:
> > > > > > > > > $ luajit -v
> > > > > > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > > > > > https://github.com/moonjit/moonjit
> > > > > > > > >
> > > > > > > >
> > > > > > > > With this:
> > > > > > > >
> > > > > > > > ```
> > > > > > > >
> > > > > > > > ./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 \
> > > > > > >
> > > > > > > No, I use the self compiled lua/moonjit which installed under
> > > > > > > /usr/local:
> > > > > > >
> > > > > > > werner@ubuntu-01:~$ which lua
> > > > > > > /usr/local/bin/lua
> > > > > > > werner@ubuntu-01:~$ which luajit
> > > > > > > /usr/local/bin/luajit
> > > > > > >
> > > > > >
> > > > > > After using this to build moonjit git:
> > > > > >
> > > > > > ```
> > > > > > #! /bin/sh
> > > > > > #
> > > > > > # moonjit.sh
> > > > > > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > > > > > #
> > > > > > # Distributed under terms of the MIT license.
> > > > > > #
> > > > > >
> > > > > >
> > > > > > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > > > > > ```
> > > > > >
> > > > > > and this to build vim:
> > > > > >
> > > > > > ```
> > > > > > luajit_pref="$HOME/apps/to-del-moonjit"
> > > > > > PATH="$luajit_pref/bin:$PATH"
> > > > > > ./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="$luajit_pref" \
> > > > > >     --with-features=huge
> > > > > >
> > > > > > ```
> > > > > >
> > > > > > I got:
> > > > > >
> > > > > > ```
> > > > > > checking for Haiku... no
> > > > > > checking for QNX... no
> > > > > > checking for Darwin (Mac OS X)... no
> > > > > > checking AvailabilityMacros.h usability... no
> > > > > > checking AvailabilityMacros.h presence... no
> > > > > > checking for AvailabilityMacros.h... no
> > > > > > checking --with-local-dir argument... Defaulting to /usr/local
> > > > > > checking --with-vim-name argument... Defaulting to vim
> > > > > > checking --with-ex-name argument... Defaulting to ex
> > > > > > checking --with-view-name argument... Defaulting to view
> > > > > > checking --with-global-runtime argument... no
> > > > > > checking --with-modified-by argument... no
> > > > > > checking if character set is EBCDIC... no
> > > > > > checking --disable-smack argument... no
> > > > > > checking linux/xattr.h usability... yes
> > > > > > checking linux/xattr.h presence... yes
> > > > > > checking for linux/xattr.h... yes
> > > > > > checking attr/xattr.h usability... no
> > > > > > checking attr/xattr.h presence... no
> > > > > > checking for attr/xattr.h... no
> > > > > > checking --disable-selinux argument... no
> > > > > > checking for is_selinux_enabled in -lselinux... yes
> > > > > > checking selinux/selinux.h usability... yes
> > > > > > checking selinux/selinux.h presence... yes
> > > > > > checking for selinux/selinux.h... yes
> > > > > > checking --with-features argument... huge
> > > > > > checking --with-compiledby argument... no
> > > > > > checking --disable-xsmp argument... no
> > > > > > checking --disable-xsmp-interact argument... no
> > > > > > checking --enable-luainterp argument... yes
> > > > > > checking --with-lua-prefix argument... /home/shlomif/apps/to-del-moonjit
> > > > > > checking --with-luajit... yes
> > > > > > checking for luajit... /home/shlomif/apps/to-del-moonjit/bin/luajit
> > > > > > checking LuaJIT version... moonjit 2.2.0 -- Copyright (C) 2019-2020
> > > > > > moonjit developers. https://github.com/moonjit/moonjit checking Lua
> > > > > > version of LuaJIT... 5.1 checking if lua.h can be found in
> > > > > > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 --
> > > > > > Copyright (C) 2019-2020 moonjit developers.
> > > > > > https://github.com/moonjit/moonjit... checking if lua.h can be found in
> > > > > > /home/shlomif/apps/to-del-moonjit/include... no checking if lua.h can be
> > > > > > found in /home/shlomif/apps/to-del-moonjit/include/lua5.1... no
> > > > > > configure: error: could not configure lua [shlomif@telaviv1 vim-git]$
> > > > > > ```
> > > > > >
> > > > > > So my guess is that vim and moonjit are not compatible with each other.
> > > > > >
> > > > > > YOu can try my fix at
> > > > > > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the
> > > > > > branch) which seems to work.
> > > > > > > >     --with-features=huge
> > > > > > > >
> > > > > > > > ```
> > > > > > > >
> > > > > > > > vim builds fine on mageia v8 x64. But I changed the lua-prefix to
> > > > > > > > /usr and using mageia's luajit.
> > > > > > > >
> > > > > > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > > > > > 下午5:59写道:
> > > > > > > > > >
> > > > > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > > > > 下午3:20写道:
> > > > > > > > > > >
> > > > > > > > > > > Hi Hongyi Zhao!
> > > > > > > > > > >
> > > > > > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Shlomi Fish       https://www.shlomifish.org/
> > > > > > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> > > > > >
> > > > > > Sometimes you don’t need to be familiar with a better alternative to
> > > > > > know that something sucks. Take Microsoft Word for example.
> > > > > >     — Shlomi Fish’s friend.
> > > > > >
> > > > > > Please reply to list if it's a mailing list post -
> > > > > > https://shlom.in/reply .
> > > > > >
> > > > > > --
> > > > > > --
> > > > > > 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
> > > > > > [hidden email]. To view this discussion on the
> > > > > > web visit
> > > > > > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Shlomi Fish       https://www.shlomifish.org/
> > > > https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job
> > > >
> > > > He has a high degree of idealism, a high degree of stubbornness, and an even
> > > > higher degree of inability to distiniguish between the two.
> > > >     — https://www.shlomifish.org/humour.html
> > > >
> > > > Please reply to list if it's a mailing list post - https://shlom.in/reply .
> > > >
> > >
> > >
> > >
> >
> >
> >
> > --
> >
> > Shlomi Fish       https://www.shlomifish.org/
> > My Aphorisms - https://www.shlomifish.org/humour.html
> >
> > Academic Politics are so vicious precisely because the stakes are so low.
> >     — https://quoteinvestigator.com/2013/08/18/acad-politics/
> >
> > Please reply to list if it's a mailing list post - https://shlom.in/reply .
>
>
>
> --
> Hongyi Zhao <[hidden email]>



--
Hongyi Zhao <[hidden email]>

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6PO%2BHUD-qA47badiF5_oTOWSpPBNqBgYcurn7iZ4etPYe1g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
In reply to this post by Hongyi Zhao
CCing the list, see:

https://www.shlomifish.org/philosophy/computers/netiquette/email/reply-to-list.html

On Sat, 18 Apr 2020 21:39:03 +0800
Hongyi Zhao <[hidden email]> wrote:

> Another question: Can this branch be merged into the master?
>

As far as I'm concerned, my changes there are licensed as this:

https://github.com/shlomif/shlomif-computer-settings/blob/2ad7e2335d5c031e930b742760bc215603d658a1/shlomif-settings/git/commit-messages/cc0-copyright-disclaimer.txt

However, the change is hacky and will likely break with a different version of
moonjit. It should be redone using https://en.wikipedia.org/wiki/Find_(Unix) or
similar.

Also note that I cannot push to git master so I'll have to open a pull request.



> Best,
> Regards
>
> Hongyi Zhao <[hidden email]> 于2020年4月18日周六 下午9:37写道:
> >
> > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:53写道:  
> > >
> > > Hi,
> > >
> > > On Sat, 18 Apr 2020 20:42:38 +0800
> > > Hongyi Zhao <[hidden email]> wrote:
> > >  
> > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:
> > > >  
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Sat, 18 Apr 2020 19:51:09 +0800
> > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > >  
> > > > > > No, still failed, see following:
> > > > > >
> > > > > > $ git clone https://github.com/shlomif/vim.git vim.git  
> > > > >
> > > > > You are using the wrong git branch:
> > > > >
> > > > > https://github.com/shlomif/vim/tree/lua-moonjit-support
> > > > >
> > > > > execute "git checkout lua-moonjit-support"  
> > > >
> > > > Failed, see following:
> > > >
> > > > $ git clean -xdf
> > > > $ git checkout lua-moonjit-support
> > > > $ git branch
> > > > * lua-moonjit-support
> > > >   master
> > > > [...]
> > > > $ make -j1
> > > > [...]
> > > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > > undefined reference to `lua_setglobal'
> > > > /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:  
> > >
> > > First of all, I suggest removing moonjit out of /usr/local and installing
> > > it to its own path (say "/opt/moonjit" or "/usr/local/apps/moonjit").
> > > After that [and after fixing the "./configure" invocation], try playing
> > > with these:  
> >
> > The only relative moonjit/luajit in "./configure" invocation is as
> > following:
> >
> > --with-luajit
> >
> > Which has not location relative argument, so this is no need to fix
> > anything for my case of the "./configure" options.
> >
> >
> >  
> > >
> > > https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
> > >
> > > As well as
> > > https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux
> > >  
> >
> > It does the trick.  Thanks a lot. But I stilll cannot figure out why
> > must I install it into separate dirctory otherwise it will failed to
> > work.
> >
> > The method I used is as following:
> >
> >   I prepare a module file and then use lmod to loade it, the file has
> > the following contents which is used to set the environment variables:
> >
> >
> > #%Module
> > setenv CPATH {/home/werner/moonjit/include/moonjit-2.3}
> > setenv C_INCLUDE_PATH {/home/werner/moonjit/include/moonjit-2.3}
> > prepend-path LD_LIBRARY_PATH {/home/werner/moonjit/lib}
> > setenv LIBRARY_PATH {/home/werner/moonjit/lib}
> > prepend-path PATH {/home/werner/moonjit/bin}
> >
> >
> > See the final result:
> >  $ ldd src/vim | grep jit
> >     libluajit-5.1.so.2 => /home/werner/moonjit/lib/libluajit-5.1.so.2
> > (0x00007f56f4490000)
> >
> > $ vim --version
> > VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 18 2020 21:26:42)
> > Included patches: 1-592
> > Compiled by werner@ubuntu-01
> > Huge version with GTK3 GUI.  Features included (+) or not (-):
> > +acl               -farsi             +mouse_sgr         +tag_binary
> > +arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
> > +autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
> > +autochdir         +float             +mouse_xterm       +tcl
> > +autoservername    +folding           +multi_byte        +termguicolors
> > +balloon_eval      -footer            +multi_lang        +terminal
> > +balloon_eval_term +fork()            -mzscheme          +terminfo
> > +browse            +gettext           +netbeans_intg     +termresponse
> > ++builtin_terms    -hangul_input      +num64             +textobjects
> > +byte_offset       +iconv             +packages          +textprop
> > +channel           +insert_expand     +path_extra        +timers
> > +cindent           +ipv6              +perl              +title
> > +clientserver      +job               +persistent_undo   +toolbar
> > +clipboard         +jumplist          +popupwin          +user_commands
> > +cmdline_compl     +keymap            +postscript        +vartabs
> > +cmdline_hist      +lambda            +printer           +vertsplit
> > +cmdline_info      +langmap           +profile           +virtualedit
> > +comments          +libcall           +python/dyn        +visual
> > +conceal           +linebreak         +python3/dyn       +visualextra
> > +cryptv            +lispindent        +quickfix          +viminfo
> > +cscope            +listcmds          +reltime           +vreplace
> > +cursorbind        +localmap          +rightleft         +wildignore
> > +cursorshape       +lua               +ruby              +wildmenu
> > +dialog_con_gui    +menu              +scrollbind        +windows
> > +diff              +mksession         +signs             +writebackup
> > +digraphs          +modify_fname      +smartindent       +X11
> > +dnd               +mouse             -sound             -xfontset
> > -ebcdic            +mouseshape        +spell             +xim
> > +emacs_tags        +mouse_dec         +startuptime       +xpm
> > +eval              +mouse_gpm         +statusline        +xsmp_interact
> > +ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
> > +extra_search      +mouse_netterm     +syntax            -xterm_save
> >    system vimrc file: "$VIM/vimrc"
> >      user vimrc file: "$HOME/.vimrc"
> >  2nd user vimrc file: "~/.vim/vimrc"
> >       user exrc file: "$HOME/.exrc"
> >   system gvimrc file: "$VIM/gvimrc"
> >     user gvimrc file: "$HOME/.gvimrc"
> > 2nd user gvimrc file: "~/.vim/gvimrc"
> >        defaults file: "$VIMRUNTIME/defaults.vim"
> >     system menu file: "$VIMRUNTIME/menu.vim"
> >   fall-back for $VIM: "/usr/local/share/vim"
> > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> > -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
> > -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
> > -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0
> > -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm
> > -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> > -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0
> > -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid
> > -I/usr/include/freetype2 -I/usr/include/libpng16
> > -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount
> > -I/usr/include/blkid -I/usr/include/glib-2.0
> > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2
> > -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
> > Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now
> > -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E
> > -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3
> > -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo
> > -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm
> > -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux   -lacl -lattr
> > -lgpm -ldl  -L/usr/local/lib/x86_64-linux-gnu -lluajit-5.1 -Wl,-E
> > -fstack-protector-strong -L/usr/local/lib
> > -L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread
> > -lcrypt   -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
> > -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm
> >
> >
> > Regards
> >
> >  
> > >
> > > Good luck!
> > >  
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > > make: *** [Makefile:29: first] Error 2
> > > >
> > > >
> > > >
> > > >  
> > > > >  
> > > > > > $ cd vim.git
> > > > > > $ ./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
> > > > > >
> > > > > > $ make -j1
> > > > > > [...]
> > > > > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > > > > undefined reference to `lua_setglobal'
> > > > > > /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:651:
> > > > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:647:
> > > > > > undefined reference to `luaL_prepbuffsize' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1595:
> > > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1600:
> > > > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:1618:
> > > > > > undefined reference to `lua_getglobal' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1620:
> > > > > > undefined reference to `lua_rotate' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:1633:
> > > > > > undefined reference to `lua_pcallk' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src/if_lua.c:2165:
> > > > > > undefined reference to `lua_callk' /usr/bin/ld:
> > > > > > /home/werner/Public/editor/vim/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/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/lua-moongit-support/vim.git/src'
> > > > > > make: *** [Makefile:29: first] Error 2
> > > > > >
> > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > 下午7:37写道:  
> > > > > > >
> > > > > > > Hi!
> > > > > > >
> > > > > > > On Sat, 18 Apr 2020 18:56:56 +0800
> > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > >  
> > > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > > 下午6:28写道:  
> > > > > > > > >
> > > > > > > > > Hi!
> > > > > > > > >
> > > > > > > > > CCing the list.
> > > > > > > > >
> > > > > > > > > On Sat, 18 Apr 2020 18:02:18 +0800
> > > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > > >  
> > > > > > > > > > Aonther thing to note: I installed moonjit to substitute the
> > > > > > > > > > luajit which is not-maintained now.
> > > > > > > > > >
> > > > > > > > > > See following:
> > > > > > > > > > $ luajit -v
> > > > > > > > > > moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit developers.
> > > > > > > > > > https://github.com/moonjit/moonjit
> > > > > > > > > >  
> > > > > > > > >
> > > > > > > > > With this:
> > > > > > > > >
> > > > > > > > > ```
> > > > > > > > >
> > > > > > > > > ./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 \  
> > > > > > > >
> > > > > > > > No, I use the self compiled lua/moonjit which installed under
> > > > > > > > /usr/local:
> > > > > > > >
> > > > > > > > werner@ubuntu-01:~$ which lua
> > > > > > > > /usr/local/bin/lua
> > > > > > > > werner@ubuntu-01:~$ which luajit
> > > > > > > > /usr/local/bin/luajit
> > > > > > > >  
> > > > > > >
> > > > > > > After using this to build moonjit git:
> > > > > > >
> > > > > > > ```
> > > > > > > #! /bin/sh
> > > > > > > #
> > > > > > > # moonjit.sh
> > > > > > > # Copyright (C) 2020 Shlomi Fish <[hidden email]>
> > > > > > > #
> > > > > > > # Distributed under terms of the MIT license.
> > > > > > > #
> > > > > > >
> > > > > > >
> > > > > > > make PREFIX="$HOME/apps/to-del-moonjit" all install
> > > > > > > ```
> > > > > > >
> > > > > > > and this to build vim:
> > > > > > >
> > > > > > > ```
> > > > > > > luajit_pref="$HOME/apps/to-del-moonjit"
> > > > > > > PATH="$luajit_pref/bin:$PATH"
> > > > > > > ./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="$luajit_pref" \
> > > > > > >     --with-features=huge
> > > > > > >
> > > > > > > ```
> > > > > > >
> > > > > > > I got:
> > > > > > >
> > > > > > > ```
> > > > > > > checking for Haiku... no
> > > > > > > checking for QNX... no
> > > > > > > checking for Darwin (Mac OS X)... no
> > > > > > > checking AvailabilityMacros.h usability... no
> > > > > > > checking AvailabilityMacros.h presence... no
> > > > > > > checking for AvailabilityMacros.h... no
> > > > > > > checking --with-local-dir argument... Defaulting to /usr/local
> > > > > > > checking --with-vim-name argument... Defaulting to vim
> > > > > > > checking --with-ex-name argument... Defaulting to ex
> > > > > > > checking --with-view-name argument... Defaulting to view
> > > > > > > checking --with-global-runtime argument... no
> > > > > > > checking --with-modified-by argument... no
> > > > > > > checking if character set is EBCDIC... no
> > > > > > > checking --disable-smack argument... no
> > > > > > > checking linux/xattr.h usability... yes
> > > > > > > checking linux/xattr.h presence... yes
> > > > > > > checking for linux/xattr.h... yes
> > > > > > > checking attr/xattr.h usability... no
> > > > > > > checking attr/xattr.h presence... no
> > > > > > > checking for attr/xattr.h... no
> > > > > > > checking --disable-selinux argument... no
> > > > > > > checking for is_selinux_enabled in -lselinux... yes
> > > > > > > checking selinux/selinux.h usability... yes
> > > > > > > checking selinux/selinux.h presence... yes
> > > > > > > checking for selinux/selinux.h... yes
> > > > > > > checking --with-features argument... huge
> > > > > > > checking --with-compiledby argument... no
> > > > > > > checking --disable-xsmp argument... no
> > > > > > > checking --disable-xsmp-interact argument... no
> > > > > > > checking --enable-luainterp argument... yes
> > > > > > > checking --with-lua-prefix argument...
> > > > > > > /home/shlomif/apps/to-del-moonjit checking --with-luajit... yes
> > > > > > > checking for luajit...
> > > > > > > /home/shlomif/apps/to-del-moonjit/bin/luajit checking LuaJIT
> > > > > > > version... moonjit 2.2.0 -- Copyright (C) 2019-2020 moonjit
> > > > > > > developers. https://github.com/moonjit/moonjit checking Lua
> > > > > > > version of LuaJIT... 5.1 checking if lua.h can be found in
> > > > > > > /home/shlomif/apps/to-del-moonjit/include/luajit-moonjit 2.2.0 --
> > > > > > > Copyright (C) 2019-2020 moonjit developers.
> > > > > > > https://github.com/moonjit/moonjit... checking if lua.h can be
> > > > > > > found in /home/shlomif/apps/to-del-moonjit/include... no checking
> > > > > > > if lua.h can be found in
> > > > > > > /home/shlomif/apps/to-del-moonjit/include/lua5.1... no configure:
> > > > > > > error: could not configure lua [shlomif@telaviv1 vim-git]$ ```
> > > > > > >
> > > > > > > So my guess is that vim and moonjit are not compatible with each
> > > > > > > other.
> > > > > > >
> > > > > > > YOu can try my fix at
> > > > > > > https://github.com/shlomif/vim/tree/lua-moonjit-support (note the
> > > > > > > branch) which seems to work.  
> > > > > > > > >     --with-features=huge
> > > > > > > > >
> > > > > > > > > ```
> > > > > > > > >
> > > > > > > > > vim builds fine on mageia v8 x64. But I changed the
> > > > > > > > > lua-prefix to /usr and using mageia's luajit.
> > > > > > > > >  
> > > > > > > > > > Hongyi Zhao <[hidden email]> 于2020年4月18日周六
> > > > > > > > > > 下午5:59写道:  
> > > > > > > > > > >
> > > > > > > > > > > Shlomi Fish <[hidden email]> 于2020年4月18日周六
> > > > > > > > > > > 下午3:20写道:  
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Hongyi Zhao!
> > > > > > > > > > > >
> > > > > > > > > > > > On Sat, 18 Apr 2020 08:09:57 +0800
> > > > > > > > > > > > Hongyi Zhao <[hidden email]> wrote:
> > > > > > > > > > > >  
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Shlomi Fish       https://www.shlomifish.org/
> > > > > > > https://youtu.be/KxGRhd_iWuE - Never Give Up!!
> > > > > > >
> > > > > > > Sometimes you don’t need to be familiar with a better alternative
> > > > > > > to know that something sucks. Take Microsoft Word for example.
> > > > > > >     — Shlomi Fish’s friend.
> > > > > > >
> > > > > > > Please reply to list if it's a mailing list post -
> > > > > > > https://shlom.in/reply .
> > > > > > >
> > > > > > > --
> > > > > > > --
> > > > > > > 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
> > > > > > > [hidden email]. To view this discussion on
> > > > > > > the web visit
> > > > > > > https://groups.google.com/d/msgid/vim_use/20200418143646.1dc5de35%40telaviv1.shlomifish.org.
> > > > > > >  
> > > > > >
> > > > > >
> > > > > >  
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Shlomi Fish       https://www.shlomifish.org/
> > > > > https://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job
> > > > >
> > > > > He has a high degree of idealism, a high degree of stubbornness, and
> > > > > an even higher degree of inability to distiniguish between the two.
> > > > >     — https://www.shlomifish.org/humour.html
> > > > >
> > > > > Please reply to list if it's a mailing list post -
> > > > > https://shlom.in/reply .
> > > >
> > > >
> > > >  
> > >
> > >
> > >
> > > --
> > >
> > > Shlomi Fish       https://www.shlomifish.org/
> > > My Aphorisms - https://www.shlomifish.org/humour.html
> > >
> > > Academic Politics are so vicious precisely because the stakes are so low.
> > >     — https://quoteinvestigator.com/2013/08/18/acad-politics/
> > >
> > > Please reply to list if it's a mailing list post - https://shlom.in/reply
> > > .  
> >
> >
> >
> > --
> > Hongyi Zhao <[hidden email]>  
>
>
>



--

Shlomi Fish       https://www.shlomifish.org/
https://github.com/shlomif/PySolFC - open source Solitaire games

I wish that my words and deeds will carry reality *forward* instead of
preserving the status quo.
    — https://www.shlomifish.org/humour/stories/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418165252.26473f19%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
On Sat, 18 Apr 2020 16:52:52 +0300
Shlomi Fish <[hidden email]> wrote:

> CCing the list, see:
>
> https://www.shlomifish.org/philosophy/computers/netiquette/email/reply-to-list.html
>
> On Sat, 18 Apr 2020 21:39:03 +0800
> Hongyi Zhao <[hidden email]> wrote:
>
> > Another question: Can this branch be merged into the master?
> >  
>
> As far as I'm concerned, my changes there are licensed as this:
>
> https://github.com/shlomif/shlomif-computer-settings/blob/2ad7e2335d5c031e930b742760bc215603d658a1/shlomif-settings/git/commit-messages/cc0-copyright-disclaimer.txt
>
> However, the change is hacky and will likely break with a different version of
> moonjit. It should be redone using https://en.wikipedia.org/wiki/Find_(Unix)
> or similar.
>
> Also note that I cannot push to git master so I'll have to open a pull
> request.
>

See https://github.com/vim/vim/pull/5947 for the cleaned up changeset.


--

Shlomi Fish       https://www.shlomifish.org/
Freecell Solver - https://fc-solve.shlomifish.org/

When Chuck Norris disses your product, it’s not good publicity, even though
you can bet he’ll get the name right.
    — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200418171140.1d32b161%40telaviv1.shlomifish.org.
Reply | Threaded
Open this post in threaded view
|

Re: Failed to compile vim with lua support.

Shlomi Fish-2
In reply to this post by Hongyi Zhao
On Sat, 18 Apr 2020 21:37:10 +0800
Hongyi Zhao <[hidden email]> wrote:

> Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:53写道:
> >
> > Hi,
> >
> > On Sat, 18 Apr 2020 20:42:38 +0800
> > Hongyi Zhao <[hidden email]> wrote:
> >  
> > > Shlomi Fish <[hidden email]> 于2020年4月18日周六 下午8:18写道:  
> > > >
> > > > Hi,
> > > >
> > > > On Sat, 18 Apr 2020 19:51:09 +0800
> > > > Hongyi Zhao <[hidden email]> wrote:
> > > >  
> > > > > No, still failed, see following:
> > > > >
> > > > > $ git clone https://github.com/shlomif/vim.git vim.git  
> > > >
> > > > You are using the wrong git branch:
> > > >
> > > > https://github.com/shlomif/vim/tree/lua-moonjit-support
> > > >
> > > > execute "git checkout lua-moonjit-support"  
> > >
> > > Failed, see following:
> > >
> > > $ git clean -xdf
> > > $ git checkout lua-moonjit-support
> > > $ git branch
> > > * lua-moonjit-support
> > >   master
> > > [...]
> > > $ make -j1
> > > [...]
> > > /usr/bin/ld: objects/if_lua.o: in function `luaopen_vim':
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2011:
> > > undefined reference to `lua_setglobal'
> > > /usr/bin/ld:
> > > /home/werner/Public/editor/vim/lua-moongit-support/vim.git/src/if_lua.c:2013:
> > > undefined reference to `lua_getglobal' /usr/bin/ld:  
> >
> > First of all, I suggest removing moonjit out of /usr/local and installing
> > it to its own path (say "/opt/moonjit" or "/usr/local/apps/moonjit"). After
> > that [and after fixing the "./configure" invocation], try playing with
> > these:  
>
> The only relative moonjit/luajit in "./configure" invocation is as following:
>
> --with-luajit
>
> Which has not location relative argument, so this is no need to fix
> anything for my case of the "./configure" options.
>
>
>
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
> >
> > As well as
> > https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux
> >  
>
> It does the trick.  Thanks a lot. But I stilll cannot figure out why
> must I install it into separate dirctory otherwise it will failed to
> work.
>

There can be a lot of software packages installed under /usr/local/* and some
of them may interfere with the building of vim.

> The method I used is as following:
>
>   I prepare a module file and then use lmod to loade it, the file has
> the following contents which is used to set the environment variables:
>
>
> #%Module
> setenv CPATH {/home/werner/moonjit/include/moonjit-2.3}
> setenv C_INCLUDE_PATH {/home/werner/moonjit/include/moonjit-2.3}
> prepend-path LD_LIBRARY_PATH {/home/werner/moonjit/lib}
> setenv LIBRARY_PATH {/home/werner/moonjit/lib}
> prepend-path PATH {/home/werner/moonjit/bin}
>



--

Shlomi Fish       https://www.shlomifish.org/
https://is.gd/htwEXQ - Integrating GNU Guile into GNU coreutils

Many a man owes his success to his first wife and his second wife to his
success.
    — Jim Backus (unsourced)

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200421164421.1ed6fbae%40telaviv1.shlomifish.org.