Changes between Initial Version and Version 2 of Ticket #2926
- Timestamp:
- 08/02/2009 06:42:53 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2926
- Property Owner changed from to
- Property Status new → assigned
-
TabularUnified Ticket #2926 – Description
initial v2 1 1 About Lua. 2 2 3 Lua was designed as an extension language and because of this is small. However, this doesn't mean is not rich or it's not expressive (quite the opposite, especially if you know th e roots (1) of Roberto Ierusalimschy (the main Lua author) which is Scheme.3 Lua was designed as an extension language and because of this is small. However, this doesn't mean is not rich or it's not expressive (quite the opposite, especially if you know that Scheme was a source for a major inspiration (1) for Roberto Ierusalimschy (the main Lua author). 4 4 5 5 The Lua project is hosted at http://www.lua.org … … 7 7 Current version is 5.1.4 and it has no dependencies. 8 8 9 The Lua distribution doesn't provide a configure script , so there are just "make" targets.10 To compile Lua we just need to issue, a "make linux" from the top level fromthe distribution.9 The Lua distribution doesn't provide a configure script but just a Makefile, so there are just "make" targets. 10 To compile Lua we just need to issue, a "make linux" from the top level off the distribution. 11 11 12 By default the installation goes into the /usr/local hierarchy, so we need to use the INSTALL_TOP and INSTALL_LIB variables to change that, with 12 By default the installation goes into the /usr/local hierarchy, so we need to use the INSTALL_TOP and INSTALL_LIB variables to change that, with: 13 13 14 14 {{{ … … 16 16 }}} 17 17 18 Lua ships with an etc/lua.pc file, that also needs some fixing 18 Lua ships with an etc/lua.pc file, that also needs some fixing: 19 19 20 20 {{{ … … 25 25 0644 permissions. 26 26 27 That's it. Using those instructions, here is the package provides analytically 28 (not so much as expected) 27 That's it. Using those instructions the package provides (analytically): 29 28 30 29 {{{ … … 41 40 /usr/include/lualib.h 42 41 }}} 42 (not so much as expected) 43 43 44 Now. As it has been said already, Lua is tiny and minimalist so doesn't provides any batteries with it, like the most scripting languages usually do today and developers are used to have. 44 45 45 Now. As it has been said already, Lua is tiny and minimalist yet quite expressive, 46 so doesn't provides any batteries with it, like the most scripting languages usually do 47 today. 48 49 To overcome this, the Lua community created many excellent modules (to complement the Lua core), which they provide specifics functions. 50 Like a socket interface (2), or luaposix(3) or modules that offering various bindings, e.g., gui toolkits. 46 To overcome this, the Lua community had created many excellent modules (to complement the Lua core), which they provide specifics functions; like a socket interface (2), or luaposix(3) or modules that offering various bindings, e.g., gui toolkits. 51 47 52 48 All these modules (usually are hosted at luaforge.net) are not officially supported. 53 49 54 A module system was implemented, which is the LuaRocks (4).50 A package system was implemented, which is the LuaRocks (4). 55 51 The purpose of LuaRocks is to (per word) provide a deployment and management system for Lua modules, 56 52 something like cpan or RubyGems. 57 The current release is in first stable version with minor releases with bug-fixes.58 The LuaRocks team is on a process 53 The current release is in the first stable version, with minor releases that offers mainly bug-fixes but with no visible changes in the functionality. 54 The LuaRocks team is on a process to a 2.* new stable release, with a big difference from current stable. 59 55 60 Currently LuaRocks is installed into /usr/share/lua/5.1/luarocks and by default all the 61 installed modules goes into /usr/lib/luarocks/rocks hierarchy. The user then 62 should include a "include luarocks" on top of the script to start using the modules. 56 Currently LuaRocks is installed into /usr/share/lua/5.1/luarocks and by default all the installed modules goes into /usr/lib/luarocks/rocks hierarchy. The user then should include a require("luarocks")" on top of the script to start using the modules. 63 57 64 58 That is what is going to change. Modules would be installed to the standard locations, 65 59 i.e., LUA_PATH and LUA_CPATH. 66 60 67 Now. The above variables are both paths that Lua is searching for modules.61 Now. The above variables are both paths, that Lua is searching for modules. 68 62 69 The first is the LUA_PATH, that e.g., for the 5.1.4 release is /usr/share/lua/5.1 and the second is 70 the LUA_CPATH that is /usr/lib/lua/5.1 63 LUA_PATH for the 5.1.4 release is /usr/share/lua/5.1 and LUA_CPATH is /usr/lib/lua/5.1 (assuming prefix is /usr). 71 64 72 The simple difference is that in LUA_PATH are located modules which are just plain text files with a .lua extension, and in theUA_CPATH are located modules written in C with embedded Lua code (*.so files).65 The simple difference between those two, is that in LUA_PATH are located modules which are just plain text files with a .lua extension, and in LUA_CPATH are located modules written in C with embedded Lua code (*.so files). 73 66 74 67 Those two variables can be used in runtime, so the user should know about their importance. … … 76 69 There is another approach. 77 70 78 Below are vim sunstitutions to src/luaconf.h which we can applying them before the installation 79 as the very first step (if I remember well, I've adopted them from a gentoo patch), where we 80 are defining where Lua will look for the modules, that means in our case under /usr/{lib,share}/lua/5.1. 71 Below are vim substitutions to "src/luaconf.h" which we can apply them before the installation, as the very first step (if I remember well, I've adopted them from a gentoo patch), where we are defining where Lua will search for modules, that means in our case under /usr/{lib,share}/lua/5.1. 81 72 82 73 … … 93 84 * install and use LuaRocks 94 85 95 * download and install four/five important and popular Lua modules (I do have the instructions and I can provide them when needed)86 * download and install some important and popular Lua modules (I do have the instructions and I can provide them when needed) 96 87 97 88 98 Another thing to know is if we want to build the shared library, liblua.so or just the static liblua.a. If we need to build the shared library we should do a research how the other distributions 99 do build the shared library. There is also a patch written for 5.1.1, which can still be valid, from Luca Piol in 89 Another thing to know is: Do we want to build the shared library, liblua.so or just the static liblua.a? If we need to build the shared library, we should do a research to see how the other distributions do build the (shared) library. There is also a patch written for 5.1.1, which can still be valid, from Luca Piol at: 100 90 101 102 91 http://wiki.linuxfromscratch.org/blfs/attachment/ticket/2173/lua-5.1.1-makeso-1.patch 103 92