LuaDist/Repository — Issue #65: Build fails with inability to find lua interpreter
Author: ttmrichter
Created: 2012-02-06 12:15:52+00:00
State: open

Following the instructions at https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Installation I'm getting the following problem:

…lots of stuff elided…
Linking C executable luac
[100%] Built target luac
[ 0%] Performing install step for 'lua'
[ 47%] Built target liblua
[ 95%] Built target liblua_static
[ 96%] Built target lua
[100%] Built target luac
Install the project...
-- Install configuration: "MinSizeRel"
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/bin/lua
-- Set runtime path of "/home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/bin/lua" to "$ORIGIN/../lib"
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/bin/luac
-- Set runtime path of "/home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/bin/luac" to "$ORIGIN/../lib"
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/lib/liblua.so
-- Set runtime path of "/home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/lib/liblua.so" to "$ORIGIN/../lib"
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/lib/lua/strict.lua
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/include/lua.h
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/include/lualib.h
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/include/lauxlib.h
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/include/lua.hpp
-- Installing: /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/bootstrap/include/luaconf.h
[ 0%] Completed 'lua'
[ 25%] Built target lua
Scanning dependencies of target luafilesystem
[ 25%] Creating directories for 'luafilesystem'
[ 25%] No download step for 'luafilesystem'
[ 25%] No patch step for 'luafilesystem'
[ 25%] No update step for 'luafilesystem'
[ 25%] Performing configure step for 'luafilesystem'
loading initial cache file /home/michael/Development/Lua/LuaDist/bootstrap/_install/tmp/install/config.cmake
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Lua51 (missing: LUA_LIBRARIES)
Call Stack (most recent call first):
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-2.8/Modules/FindLua51.cmake:72 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
dist.cmake:36 (find_package)
CMakeLists.txt:12 (ADD_LUA_MODULE)

-- Configuring incomplete, errors occurred!
make[3]: *** [luafilesystem/src/luafilesystem-stamp/luafilesystem-configure] Error 1
make[2]: *** [CMakeFiles/luafilesystem.dir/all] Error 2
make[1]: *** [CMakeFiles/install.dir/rule] Error 2
make: *** [install] Error 2

When I look for the interpreter to see if it's built:

$ find -iname "lua"
./lua
./_install/tmp/bootstrap/lib/lua
./_install/tmp/bootstrap/bin/lua
./_install/tmp/install/lua
./_install/tmp/install/lua/build/lua
$ find -iname "luac"
./_install/tmp/bootstrap/bin/luac
./_install/tmp/install/lua/build/luac

Both the interpreter and compiler are there.

$ _install/tmp/bootstrap/bin/lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
>

$ _install/tmp/bootstrap/bin/luac
_install/tmp/bootstrap/bin/luac: no input files given
usage: _install/tmp/bootstrap/bin/luac [options] [filenames].
Available options are:
- process stdin
-l list
-o name output to file 'name' (default is "luac.out")
-p parse only
-s strip debug information
-v show version information
-- stop handling options

The both appear to work as well. It seems there's a configuration problem somewhere in the bootstrapping process that's making things fail out of the box.