On Thu, Aug 12, 2010 at 2:44 PM, Tiago Katcipis <[email protected]> wrote: > > > On Thu, Aug 12, 2010 at 2:24 PM, Hisham <[email protected]> wrote: >> >> On Thu, Aug 5, 2010 at 8:39 AM, Tiago Katcipis <[email protected]> >> wrote: >> > Hi all, >> > >> > this mail announces the release of luasofia 0.1.6. >> >> Hi, >> >> I tested your rockspec again and your Makefiles still fail to respect >> --prefix when installing the modules. Please check. >> >> How to reproduce the problem: when running as a regular user, I got >> "cannot create directory `/usr/local/lib/lua/5.1/sofia': Permission >> denied". > > This is expected, we use the variable LUA_CMODULE defined using pkg-config > to find where lua looks for the modules, so you must be sudo do install.
Sorry about the confusion earlier, I should have made this clearer: LuaRocks won't be able to manage modules if it can't choose where to install them. It builds rocks targeting the rock's private directory. For example, a user install builds with $(PREFIX) as $HOME/.luarocks/lib/luarocks/rocks/luasofia/0.1.6-1/ and after completion, it installs modules them to the local tree's lib/ and share/ directories -- $HOME/lib/lua/5.1 and $HOME/share/lua/5.1. Even when running with sudo, $(PREFIX) needs to install all files under /usr/local/lib/luarocks/rocks/luasofia/0.1.6-1/ so that the tool can keep track of which files were installed and then move them to the standard directories /usr/local/lib/lua/5.1 and /usr/local/share/lua/5.1. > prefix only chooses where the liblua5.1sofia.so will be installed, it must > be on a system directory (or in a path that the system will look to find the > shared libraries) because when you use glib the system must find the > liblua5.1sofia.so and load it, the prefix right now has nothing to do to > where the lua modules are going to be installed. liblua5.1sofia.so -- Is this the Lua module? > don't know if changing something will make the manual install of the lib > without luarocks break =/ One suggestion is to add a flag to configure to make it possible to override LUA_CMODULE returned by pkg-config. This will keep the default configuration working as it does now, and then the rockspec can call the flag and direct the installation to the directory it needs. -- Hisham _______________________________________________ Luarocks-developers mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers
