Add LuaDist integration #225

Closed
pkulchenko opened this Issue Oct 23, 2013 · 2 comments

Comments

Projects
None yet
1 participant
@pkulchenko
Owner

pkulchenko commented Oct 23, 2013

No description provided.

@ghost ghost assigned pkulchenko Oct 23, 2013

@pkulchenko

This comment has been minimized.

Show comment
Hide comment
@pkulchenko

pkulchenko Oct 31, 2013

Owner

@drahosp, @jayachar88, @andrewstarks, I added integration with LuaDist.

You'll need to copy the luadist package to packages/luadist.lua file and then you can run luadist commands from the local console. All luadist commands are supported, but not all of them have been extensively tested.

Usage:

  • luadist.install('lpeg') -- install lpeg binary version for lua 5.1 on Windows/OSX and source version on Linux.
  • luadist.remove('lpeg') -- remove lpeg module (for lua 5.1)
  • luadist.install('lpeg', {source = true}) -- install lpeg source version (will likely get Lua as well)
  • luadist.install('lpeg', {source = true, debug = true}) -- show all cmake commands and verbose output
  • luadist.install('lpeg', {source = true, verbose = true}) -- show verbose output, but not cmake commands
  • luadist.install(5.2, 'lpeg', {source = true}) -- install lpeg source version for Lua 5.2 (will likely get Lua as well)
  • luadist.install('lua-5.1.5') -- install specific Lua version; you may need to remove the current one first using luadist.remove('lua-5.1.5') command.

You can also try other LuaDist commands show, info, search, tree, and so on. All commands that don't include Lua version will work with default Lua 5.1 interpreter and if you include 5.2, the commands will use 5.2 interpreter. All the modules are installed into different folders, so you can use both interpreters without conflicts.

If you get an error during installation, try running the same command with debug=true option to see what the actual cmake error is.

You can also pass CMake parameters; everything that includes uppercase letters and underscore will be handled as a CMake parameter. For example, luadist.install('lpeg', {source = true, CMAKE_FIND_FRAMEWORK = 'NEVER'})

What works:

  • Windows binary installs (where available) and source installations using Lua 5.1 and Lua 5.2. Tested with cmake 2.8.10+ and mingw-tdm
  • OSX source installs using Lua 5.1 and Lua 5.2 (configured to build universal binaries); you'll need CMake 2.8.10+.
  • Linux source installs using Lua 5.1 and Lua 5.2 (both 32bit and 64bit)

What doesn't work:

  • Windows binary install using Lua 5.2 (I get the same module as for Lua 5.1, which doesn't load).
Owner

pkulchenko commented Oct 31, 2013

@drahosp, @jayachar88, @andrewstarks, I added integration with LuaDist.

You'll need to copy the luadist package to packages/luadist.lua file and then you can run luadist commands from the local console. All luadist commands are supported, but not all of them have been extensively tested.

Usage:

  • luadist.install('lpeg') -- install lpeg binary version for lua 5.1 on Windows/OSX and source version on Linux.
  • luadist.remove('lpeg') -- remove lpeg module (for lua 5.1)
  • luadist.install('lpeg', {source = true}) -- install lpeg source version (will likely get Lua as well)
  • luadist.install('lpeg', {source = true, debug = true}) -- show all cmake commands and verbose output
  • luadist.install('lpeg', {source = true, verbose = true}) -- show verbose output, but not cmake commands
  • luadist.install(5.2, 'lpeg', {source = true}) -- install lpeg source version for Lua 5.2 (will likely get Lua as well)
  • luadist.install('lua-5.1.5') -- install specific Lua version; you may need to remove the current one first using luadist.remove('lua-5.1.5') command.

You can also try other LuaDist commands show, info, search, tree, and so on. All commands that don't include Lua version will work with default Lua 5.1 interpreter and if you include 5.2, the commands will use 5.2 interpreter. All the modules are installed into different folders, so you can use both interpreters without conflicts.

If you get an error during installation, try running the same command with debug=true option to see what the actual cmake error is.

You can also pass CMake parameters; everything that includes uppercase letters and underscore will be handled as a CMake parameter. For example, luadist.install('lpeg', {source = true, CMAKE_FIND_FRAMEWORK = 'NEVER'})

What works:

  • Windows binary installs (where available) and source installations using Lua 5.1 and Lua 5.2. Tested with cmake 2.8.10+ and mingw-tdm
  • OSX source installs using Lua 5.1 and Lua 5.2 (configured to build universal binaries); you'll need CMake 2.8.10+.
  • Linux source installs using Lua 5.1 and Lua 5.2 (both 32bit and 64bit)

What doesn't work:

  • Windows binary install using Lua 5.2 (I get the same module as for Lua 5.1, which doesn't load).

pkulchenko added a commit that referenced this issue Dec 3, 2013

Updated OSX executables and added 'fake' proxy for lua-dist support (…
…ref #225).

LuaDist relies on using liblua.dylib for all its modules with the same
name for both Lua 5.1 and Lua 5.2 interpreters. This presents an issue for
ZBS as it needs not only to refer to a proper liblua.dylib, but also to
avoid loading two interpreters as its own interperter loads its own
library.

To resolve this, liblua.dylib doesn't export any symbols (it's a dummy
library), but it needs to be present to satisfy dyld dependency (as some
of the libraries and LuaDist build process are outside of our control).

All the other Lua symbols are already available in memory, but to make
LuaDist libraries to use them, we enforce flat namespace.
@pkulchenko

This comment has been minimized.

Show comment
Hide comment
@pkulchenko

pkulchenko Dec 4, 2013

Owner

These changes have been merged into master (d1c49f0).

Owner

pkulchenko commented Dec 4, 2013

These changes have been merged into master (d1c49f0).

@pkulchenko pkulchenko closed this in 22cf8f8 Dec 6, 2013

pkulchenko added a commit that referenced this issue Jan 31, 2014

Reverted 5268b5f as flat namespace created OSX issues (fix #270, fix #…
…264).

This breaks lua-dist support for Lua 5.2 on OSX (ref #225),
which should be fixed with wxwidgets upgrade (ref #260).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment