On Thu, Jun 28, 2012 at 4:32 AM, Benoit Germain <bnt.germ...@gmail.com> wrote: > 2012/6/27 Hisham <h...@hisham.hm> >> >> On Wed, Jun 27, 2012 at 2:33 PM, Benoit Germain <bnt.germ...@gmail.com> >> wrote: >> > Hello, >> > >> > I am in the process of converting the Lanes rockspec from a "make" build >> > type to a "builtin" build type. >> > >> > Lanes consists of one Lua module lanes.lua, and one C module >> > lua51-lanes.[so|dll]. >> > >> > With the rockspec as follows: >> > >> > ["lanes51"] = >> > { >> > sources = { "src/lanes.c", "src/keeper.c", "src/tools.c", >> > "src/threading.c"}, >> > incdirs = { "src"}, >> > }, >> > >> >> Are you sure the error below corresponds to the snippet above? I don't >> see "lanes51" down there. > > > You're right. This was the "fixed" version of the rockspec, it should read > ["lua51-lanes"] = ... > >> def:write("luaopen_"..name:gsub("%.", "_").."\n") >> >> ...to.. >> >> def:write("luaopen_"..name:gsub("%.", "_"):gsub(".*-", "").."\n") >> >> ...does the trick. > > > Yes it does fix the linker error. > >> >> >> BTW, is naming the module "lua51-lanes" really necessary, given that >> the libraries directory is usually already versioned? (as in >> /lib/lua/5.1/) >> > > Well, all Lanes users don't necessary use LuaRocks, and I don't know where > the installed files will eventually land in every situation. And since I > already have lanes.lua, I can't have lanes.[dll|so]. Historically the name > has always been lua51-lanes, so I just wanted to keep it that way.
Sure, I was referring not to LuaRocks path, but to vanilla Lua locations. As for the library name, a common idiom is to name the .lua module "foo" and the .so module "foo.core" (as for example in socket.core, mime.core, alien.core, ssl.core) leaving the Lua version issue to the installation path. -- Hisham ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers