Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building neovim fails (lua module mpack not found) #4573

Closed
zoqaeski opened this issue Apr 14, 2016 · 23 comments
Closed

Building neovim fails (lua module mpack not found) #4573

zoqaeski opened this issue Apr 14, 2016 · 23 comments
Labels
build building and installing Neovim using the provided scripts

Comments

@zoqaeski
Copy link

  • Neovim version: Current git? (0.1.3.r35.g69d74f5)
  • Operating system/version: Arch Linux x86-64
  • Lua version is 5.3, but I also have 5.1 and 5.2 installed. /usr/bin/lua -v reports version 5.3.2

Actual behaviour

Building the current head of neovim fails because it can't find the 'mpack' lua module. I don't know why it's failing, as I've been regularly building neovim every fortnight or so to keep it up to date, and I've never had this problem before. I've installed the dependencies manually, but for some reason it's not finding them when it was before.

-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2.
-- Performing Test HAS_OG_FLAG
-- Performing Test HAS_OG_FLAG - Success
-- Performing Test HAS_ACCEPTABLE_FORTIFY
-- Performing Test HAS_ACCEPTABLE_FORTIFY - Success
-- Removing --sort-common from linker flags.
-- Performing Test HAS_WVLA_FLAG
-- Performing Test HAS_WVLA_FLAG - Success
-- Performing Test HAS_FSTACK_PROTECTOR_STRONG_FLAG
-- Performing Test HAS_FSTACK_PROTECTOR_STRONG_FLAG - Success
-- Performing Test HAS_FSTACK_PROTECTOR_FLAG
-- Performing Test HAS_FSTACK_PROTECTOR_FLAG - Success
-- Performing Test HAS_DIAG_COLOR_FLAG
-- Performing Test HAS_DIAG_COLOR_FLAG - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for kstat_lookup in kstat
-- Looking for kstat_lookup in kstat - not found
-- Looking for kvm_open in kvm
-- Looking for kvm_open in kvm - not found
-- Looking for gethostbyname in nsl
-- Looking for gethostbyname in nsl - found
-- Looking for perfstat_cpu in perfstat
-- Looking for perfstat_cpu in perfstat - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for sendfile in sendfile
-- Looking for sendfile in sendfile - not found
-- Found LibUV: /usr/lib64/libuv.so
-- Found Msgpack: /usr/lib64/libmsgpackc.so (found suitable version "1.4.1", minimum required is "1.0.0")
-- Found LuaJit: /usr/lib64/libluajit-5.1.so
-- Found unibilium: /usr/lib64/libunibilium.so
-- Found LibTermkey: /usr/lib64/libtermkey.so
-- Found LibVterm: /usr/lib64/libvterm.so
-- Found JeMalloc: /usr/lib64/libjemalloc.so
-- Performing Test HAVE_WORKING_LIBINTL
-- Performing Test HAVE_WORKING_LIBINTL - Success
-- Looking for _nl_msg_cat_cntr
-- Looking for _nl_msg_cat_cntr - found
-- Found Iconv
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Checking Lua interpreter /usr/bin/luajit
-- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim
-- Checking Lua interpreter /usr/bin/lua
-- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim
CMake Error at CMakeLists.txt:390 (message):
  A suitable Lua interpreter was not found.


-- Configuring incomplete, errors occurred!

Expected behaviour

Configure and compilation is successful.

@bendem
Copy link

bendem commented Apr 14, 2016

You can fix this by removing .deps/ and refetching the dependencies using make deps.

@fmoralesc
Copy link
Contributor

This also affects the neovim-git package from the AUR.

@wsdjeg
Copy link
Contributor

wsdjeg commented Apr 14, 2016

I can not reproduce this issue,I am using archlinux,and just run
git pull,make,sudo make install,and everything works well

@bendem
Copy link

bendem commented Apr 14, 2016

I think because for a long time the build process was not make but

mkdir build
cd build
cmake ..
make

@fwalch
Copy link
Member

fwalch commented Apr 14, 2016

@bendem It depends what you want to do: Running just make will perform the steps you mentioned for you, plus download and build the dependencies. Running CMake manually will use systemwide dependencies by default and is what's usually used for packaging.

I'm looking into packaging libmpack (or rather, lua-mpack) for Arch.

@tarruda
Copy link
Member

tarruda commented Apr 14, 2016

@fwalch later today I will release a new libmpack version with a proper makefile for installation as a system library

@fwalch
Copy link
Member

fwalch commented Apr 14, 2016

@tarruda Great! 👍 Thanks for the heads up, then I'll wait for that.

@fwalch
Copy link
Member

fwalch commented Apr 14, 2016

@tarruda Not sure what you have planned, just wanted to say that it would be nice if the Lua module could be easily built/installed without requiring luarocks.

@fwalch
Copy link
Member

fwalch commented Apr 17, 2016

@tarruda Any updates? :-)

@fwalch
Copy link
Member

fwalch commented Apr 18, 2016

I used Luarocks to package libmpack for now, so the Arch Linux package should work again.

Thanks for reporting!

@fwalch fwalch closed this as completed Apr 18, 2016
@telemachus
Copy link
Contributor

@fwalch I don't know if what you're describing fixes the underlying problem. I still can't build neovim from source because of a failure related to mpack.

-- Checking Lua interpreter /Users/teacher/Downloads/neovim/.deps/usr/bin/luajit
-- [/Users/teacher/Downloads/neovim/.deps/usr/bin/luajit] The 'lpeg' lua package is required for building Neovim
-- Checking Lua interpreter /usr/local/bin/lua
-- [/usr/local/bin/lua] The 'mpack' lua package is required for building Neovim
CMake Error at CMakeLists.txt:390 (message):
  A suitable Lua interpreter was not found.

Admittedly, I'm on OSX not Arch. So I don't mean to add any confusion, but I think there's still a problem related to mpack itself.

@fwalch
Copy link
Member

fwalch commented Apr 19, 2016

You are building manually from the Makefile, right? Did you try make distclean && make?

@telemachus
Copy link
Contributor

@fwalch I'm trying everything: building manually from the Makefile and building via Homebrew (I have a separate issue for homebrew-neovim).

I just tried make distclean && make, and it ends the exact same way as the bit I gisted you above.

@ronisbr
Copy link

ronisbr commented Apr 19, 2016

Hi guys!

I'm packing neovim for openSUSE and I keep a neovim-unstable to track the changes and help to deliver newer versions faster. Since some days ago, I cannot build neovim due to the same problem described here. I also tried to pack libmpack from https://github.com/tarruda/libmpack/ but I couldn't, since I did not find any building instructions and make install is not defined.

@justinmk justinmk reopened this Apr 19, 2016
@justinmk
Copy link
Member

cc @tarruda

@fwalch
Copy link
Member

fwalch commented Apr 19, 2016

@telemachus That's quite peculiar; it works on OSX e.g. on Travis: https://travis-ci.org/neovim/homebrew-neovim/jobs/123250733

@ronisbr Maybe looking at lua51-mpack on AUR or the Ubuntu packaging can help you until a new version with a nicer Makefile is out. On Arch and Ubuntu, building seems to work even with simple make distclean && make.

@fwalch fwalch removed their assignment Apr 19, 2016
@fwalch fwalch changed the title Building neovim on Arch Linux fails (lua module mpack not found) Building neovim fails (lua module mpack not found) Apr 19, 2016
@ronisbr
Copy link

ronisbr commented Apr 19, 2016

Thanks @fwalch. I took a look at the package in AUR and the problem is that it is using luarocks, which is still not available at official openSUSE repository. Do you know if there is a way to install mpack without using luarocks?

@telemachus
Copy link
Contributor

@fwalch Yeah, I see what you mean. The last jobs there seem to have been sometime last Friday. I first began to have this problem late Friday night. I haven't been able to build on OSX since then. Would it be possible (and worth it) to manually trigger a homebrew-neovim build now on Travis and see if anything has changed there since the last build?

@fwalch
Copy link
Member

fwalch commented Apr 19, 2016

@fwalch
Copy link
Member

fwalch commented Apr 19, 2016

@ronisbr Something like the following should work:

gcc -O2 -I/usr/include/lua5.1 -llua5.1 -shared -fPIC -o mpack.so binding/lua/lmpack.c
install -Dm755 mpack.so ${pkgdir}/usr/lib/lua/5.1

Edit: I now changed the Arch PKGBUILD to not depend on Luarocks anymore.

@telemachus
Copy link
Contributor

telemachus commented Apr 20, 2016

@fwalch Well, the Travis build passed, and I'm just very confused. I just can't see what is wrong with my environment.

I regularly uninstall and reinstall neovim using Homebrew in order to track HEAD relatively closely. I've never had any trouble like this. Everything is up-to-date in terms of Xcode, Homebrew, etc. and I can install other software without trouble using brew or luarocks, but I can't install mpack or neovim—not using brew and not building them manually.

If anyone has ideas for other things I can debug, I'd be glad to hear them. A recent verbose failed build log is here: https://gist.github.com/telemachus/fe078934942bdcc2a0e86319de5e1148

EDIT I uninstalled everything related to Lua and was finally able to install neovim. I still have no idea what was wrong, but I suppose it was my problem not neovim's. (I still can't install mpack, but who knows, maybe that's local to me as well.)

@ronisbr
Copy link

ronisbr commented Apr 25, 2016

@fwalch I did exactly what you suggested and I could create the lua51-mpack package. Now, the neovim (git) can be built correctly. Thanks! I will submit this package to openSUSE repositories since it will be needed for future neovim versions.

@justinmk
Copy link
Member

justinmk commented Jul 1, 2016

Is any action required here?

@justinmk justinmk closed this as completed Jul 1, 2016
@justinmk justinmk added the build building and installing Neovim using the provided scripts label Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build building and installing Neovim using the provided scripts
Projects
None yet
Development

No branches or pull requests

9 participants