tech-pkg archive

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

Re: Lua modules with differing extensions



On Mon, Aug 22, 2016 at 12:24:48PM -0400, tr%vispaul.me@localhost wrote:
 > > On OS X some Lua modules end up with a .dylib extension, by default
 > > Lua only looks for modules with .so extension in its search path. Can
 > > Lua be set to accommodate native shared library file extensions?
 > 
 > For the lua code that I run on both NetBSD and OS X I set something like
 > this before I do much else:
 > 
 >   package.cpath = package.cpath .. ";/path/to/osx/modules/?.dylib"
 > 
 > It's harmless on NetBSD but allows modules to be picked up on OS X.
 > I believe one can also set this with LUA_INIT or LUA_CPATH but I
 > prefer the above approach as less effort is required to run the
 > scripts elsewhere.
 > 
 > I'm not sure if this is at all helpful but I too would like to
 > know of a cleaner solution, if anyone knows one.

Probably by far the cleanest solution is to just patch it in :-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index