lua-users home
lua-l archive

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


Hi.

On 21 Feb 2008, at 12:53, Roger Ivie wrote:
On Thu, 21 Feb 2008, Bru, Pierre wrote:
did anyone already built or is aware of a successful build of Lua 5.1 on
OpemVMS ?

I have built and run Lua 5.1 on OpenVMS/Alpha. I don't recall having any
trouble building it. It's been a while; it was over a year ago and I
did it to fiddle with Lua while I was decided whether to use it for my
current vxWorks project.


Lua indeed builds just fine in OpenVMS. I only had to write a script to build it, because I didn't have a 'make' in the VMS I was using. I also had problems with 'require' due to the peculiar VMS paths:

  http://lua-users.org/lists/lua-l/2007-10/msg00238.html

I followed Roberto's suggestion and applied the following patch to Lua:

--- lua-5.1.2/src/luaconf.h	2007-03-24 00:01:55.000000000 -0300
+++ luaconf.h	2007-10-13 06:32:38.000000000 -0300
@@ -93,6 +93,10 @@
 #define LUA_CPATH_DEFAULT \
 	".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"

+#elif defined(VMS)
+#define LUA_PATH_DEFAULT  "?.lua;[.LUA]?.lua"
+#define LUA_CPATH_DEFAULT "?.so"
+
 #else
 #define LUA_ROOT	"/usr/local/"
 #define LUA_LDIR	LUA_ROOT "share/lua/5.1/"
@@ -112,6 +116,8 @@
 */
 #if defined(_WIN32)
 #define LUA_DIRSEP	"\\"
+#elif defined(VMS)
+#define LUA_DIRSEP	"_"
 #else
 #define LUA_DIRSEP	"/"
 #endif

Unfortunately, I didn't have the time or need to check out how to dynamic load C libraries in OpenVMS, though.

Best regards.

--
Renato Maia
PhD student at PUC-Rio
__________________________
http://www.inf.puc-rio.br/~maia/