From 0a54604e057cc90d77adb3a3ec49a58b31820e33 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 1 Feb 2016 23:14:53 +0100 Subject: [PATCH] add the lualib patch in our tarball, and update the corresponding doc --- README.lua | 13 +++++++------ tools/cmake/DefinePackages.cmake | 1 + {contrib/lua => tools}/lualib.patch | 8 ++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) rename {contrib/lua => tools}/lualib.patch (81%) diff --git a/README.lua b/README.lua index ef0d701ad5..8b1a3ad646 100644 --- a/README.lua +++ b/README.lua @@ -1,7 +1,8 @@ SimGrid requires Lua 5.3; it will not work with Lua 5.2 or Lua 5.1, -as Lua 5.3 breaks backwards compatibility. +as Lua 5.3 breaks backwards compatibility. +Version 5.3.2, 5.3.3 or any 5.3.X are ok, though. -However, installing Lua 5.3 is easy. (If you're an administrator) +However, installing Lua 5.3 is easy. (If you are an administrator of your machine) Step 1: Go to http://www.lua.org/download.html and download the 5.3 package. @@ -9,18 +10,18 @@ Step 2: Untar the package: tar xvfz lua-5.3.*.tar.gz Step 3: cd into the new directory -Step 4: Apply the patch in "/contrib/lua/lualib.patch" to the +Step 4: Apply the patch in "/tool/lualib.patch" to the lua source: For instance, if you unpacked the lua sourcecode to /tmp/lua-5.3.1, use the following commands: - cp contrib/lua/lualib.patch /tmp/lua-5.3.1 + cp tools/lualib.patch /tmp/lua-5.3.1 cd /tmp/lua-5.3.1/ patch -p1 < lualib.patch -Step 5: make , for instance "make linux" +Step 5: make linux Step 6: sudo make install -Step 7: Run ccmake (or supply the config option to cmake) to enable Lua in SimGrid. Done! +Step 7: Go back to the SimGrid source, and run ccmake again. Try removing CMakeCache.txt if it still complains about Lua being not found. diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index d7b19a9fad..ee75b3d125 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -121,6 +121,7 @@ set(EXTRA_DIST src/xbt/probes.h src/xbt/win32_ucontext.c tools/tesh/generate_tesh + tools/lualib.patch examples/smpi/mc/only_send_deterministic.tesh examples/smpi/mc/non_deterministic.tesh ) diff --git a/contrib/lua/lualib.patch b/tools/lualib.patch similarity index 81% rename from contrib/lua/lualib.patch rename to tools/lualib.patch index b795d67b66..275caa0f96 100644 --- a/contrib/lua/lualib.patch +++ b/tools/lualib.patch @@ -1,3 +1,11 @@ +This patch is to be applied to the Lua 5.3 source file to get a shared +library. This is because the authors of Lua don't bother distributing +a working build system for their software, so we have to make one... + +As unfortunate as it may be, there is nothing else we can do. + + -- Da SimGrid team. + diff --git a/Makefile b/Makefile index 5ee5601..93830a3 100644 --- a/Makefile -- 2.20.1