Skip to content

Can you build vim with lua interp on? #16

@jchain

Description

@jchain

I tried makepkg several times but failed. I noticed that you provides the patches but it didn't help much. Can you provide one (with lua, perl, python, ruby enabled) to pacman please? Thx a lot!

Activity

Alexpux

Alexpux commented on Jun 18, 2014

@Alexpux
Member

I don't build lua for MSYS, only for MINGW

martell

martell commented on Jun 18, 2014

@martell
Member

@jchain I think you need to use makepkg-mingw not makepkg.
They are two different tools.
makepkg is for building MSYS2-PACKAGES and
makepkg-mingw is for MINGW-PACKAGES

mingwandroid

mingwandroid commented on Jun 18, 2014

@mingwandroid
Member

Well you would probably want vim to be an msys2 program - as it is currently - rather that a native Windows one .. So you'd need to port lua to msys2 as well.. Unless you are site you want a native Windows vim of course.

mingwandroid

mingwandroid commented on Jun 18, 2014

@mingwandroid
Member

Sure.. Not site. Stupid phone keyboard (user).

Haylon

Haylon commented on Aug 27, 2014

@Haylon

you must first build msys2 lua package, you can grab archlinux PKGBUILD, then you should build vim with lua. by the way, you also can build luajit with msvc, then build msys2 vim with luajit(no dynamatic). yes, I use luajit for neocomplete.

Konfekt

Konfekt commented on Nov 21, 2014

@Konfekt

Hello, could you give an address what to grab and by which commands to build lua and vim?

jchain

jchain commented on Nov 25, 2014

@jchain
Author

I confirm that I can build msys-vim with lua support. My successful steps:

  1. Download and make install lua from www.lua.org with command make mingw and make install
  2. Download the source code from www.vim.org. No need to use makepkg. All you need is to patch the source code with pretend_cygwin_msys.patch to enable +clipboard
  3. configure with your options, like --enable-luainterp and --with-lua-prefix=/usr/local. Refer to PKGBUILD for a complete example.
  4. make and make install. Done.
Konfekt

Konfekt commented on Nov 26, 2014

@Konfekt

Thank you, almost worked: make gives

auto/pathdef.c:5:38: error: expected expression before ‘/’ token
 char_u *default_vim_dir = (char_u *)&/usr/share/vim&;
                                      ^
auto/pathdef.c:6:46: error: expected identifier before ‘;’ token
 char_u *default_vimruntime_dir = (char_u *)&&;
                                              ^
auto/pathdef.c:8:33: error: ‘gcc’ undeclared here (not in a function)
 char_u *all_lflags = (char_u *)&gcc   -L. -pipe -fstack-protector  -Wl,--as-needed -o vim.exe        -lm   -lncursesw   -pipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector  -L/usr/lib/perl5/core_perl/CORE -lperl -ldl       &;
                                 ^
auto/pathdef.c:8:40: error: ‘L’ undeclared here (not in a function)
 char_u *all_lflags = (char_u *)&gcc   -L. -pipe -fstack-protector  -Wl,--as-needed -o vim.exe        -lm   -lncursesw   -pipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector  -L/usr/lib/perl5/core_perl/CORE -lperl -ldl       &;
                                        ^
auto/pathdef.c:8:43: error: expected identifier before ‘-’ token
 char_u *all_lflags = (char_u *)&gcc   -L. -pipe -fstack-protector  -Wl,--as-needed -o vim.exe        -lm   -lncursesw   -pipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector  -L/usr/lib/perl5/core_perl/CORE -lperl -ldl       &;
                                           ^
make: *** [objects/pathdef.o] Error 1

Seems to have to do with the msys2 path conversion magic.

Perhaps it is more convient instead of step 2,3,4 to add the missing lines in setp 3. to PKGBuild?

The Pkgbuild already has --enable-luainterp=dynamic. What does this tell configure ?

Alexpux

Alexpux commented on Nov 26, 2014

@Alexpux
Member

Seems you have something bad in configure options.

Konfekt

Konfekt commented on Nov 26, 2014

@Konfekt

Well I tried

  ./configure \
    --prefix=/usr \
    --build=${CHOST} \
    --with-features=huge \
    --with-tlib=ncursesw \
    --enable-cscope \
    --enable-multibyte \
    --enable-perlinterp=dynamic \
    --enable-pythoninterp=dynamic \
    --enable-python3interp=dynamic \
    --enable-rubyinterp=dynamic \
    --disable-tclinterp \
    --disable-gpm --disable-sysmouse \
    --disable-gui --without-x \
    --enable-luainterp \
    --with-lua-prefix=/usr/local
Alexpux

Alexpux commented on Nov 26, 2014

@Alexpux
Member

MSYS2 convert paths only for native Windows applications not MSYS one. So I wonder how build command goes to auto/pathdef.c.

Konfekt

Konfekt commented on Nov 26, 2014

@Konfekt

Well, how could I find out about the build command? Leaving out --with-lua-prefix=/usr/local does not change anything though by the way.

Alexpux

Alexpux commented on Nov 26, 2014

@Alexpux
Member

This:

gcc   -L. -pipe -fstack-protector  -Wl,--as-needed -o vim.exe        -lm   -lncursesw   -pipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector  -L/usr/lib/perl5/core_perl/CORE -lperl -ldl     

is link command.
Need to understand how it go to source.

Konfekt

Konfekt commented on Nov 26, 2014

@Konfekt

So executing the above line gives

$ gcc   -L. -pipe -fstack-protector  -Wl,--as-needed -o vim.exe        -lm   -lncursesw   -pipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector  -L/usr/lib/perl5/core_perl/CORE -lperl -ldl
/usr/lib/gcc/x86_64-pc-msys/4.9.2/../../../../lib/libmsys-2.0.a(libcmain.o): In function `main':
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/lib/libcmain.c:39: undefined reference to `WinMain'
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/lib/libcmain.c:39:(.text.startup+0x7f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `WinMain'
collect2: error: ld returned 1 exit status

9 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @maonx@jchain@Haylon@mingwandroid@joca-bt

        Issue actions

          Can you build vim with lua interp on? · Issue #16 · msys2/MSYS2-packages