lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 25 February 2015 at 23:47, luciano de souza <luchyanus@gmail.com> wrote:
> Hello all,
>
> After some effort, I could compile Luarocks with the following commandlines:
>
> $ ./configure --with-lua-include=./include
> $ sudo make bootstrap
>
> The directory ./include was manually placed in the Luarocks master directory.
>
> So I try to install luasql-sqlite3:
>
> $ sudo luarocks install luasql-sqlite3
>
> I got the following error:
>
> src/luasql.c:8:17: fatal error: lua.h: Arquivo ou diretório não encontrado
>  #include "lua.h"
>                  ^
> compilation terminated.
>
> Error: Build error: Failed compiling object src/luasql.o
>
> The meaning of the error is understandable. When Luarocks compiles the
> sources, it calls GCC and it requires the path of include directory.
>
> But how to explain to luarocks where is it?

Using --with-lua-include. That flag is given to configure is not
intended for use during the build of LuaRocks itself. It is how you
configure LuaRocks to find Lua includes later. For this reason, you
should not give it a temporary directory such as `./include`. The
proper way to do it is to install Lua with its development headers, so
that the include files are installed in a system location such as
/usr/local. That varies according to your OS/distro, but the devel
headers package it's usually called something like liblua52-dev. Once
you have those installed system-wide, give the absolute path to
--with-lua-include. Most likely, however, once the Lua includes are
properly installed in the system, the configure script will find them
by itself.

What OS/distro are you running? Other users of your system may be able
to provide more specific information here.

-- Hisham