All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] luarocks: fix lua modules building with luajit
@ 2018-07-29  9:44 Francois Perrad
  2018-08-05 10:07 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad @ 2018-07-29  9:44 UTC (permalink / raw)
  To: buildroot

currently, when luajit is selected as luainterpreter,
all lua module fails to build with the message:
    Error: Failed finding Lua library. You may need to configure LUA_LIBDIR.

see http://autobuild.buildroot.net/results/66de049c306d7aff66894d53e2f4fa755fd01594

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 .../0001-allow-libluajit-detection.patch      | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/luarocks/0001-allow-libluajit-detection.patch

diff --git a/package/luarocks/0001-allow-libluajit-detection.patch b/package/luarocks/0001-allow-libluajit-detection.patch
new file mode 100644
index 000000000..c5e52f428
--- /dev/null
+++ b/package/luarocks/0001-allow-libluajit-detection.patch
@@ -0,0 +1,32 @@
+From 961269271134e711bcfffebb0f179ffddcbf3d5a Mon Sep 17 00:00:00 2001
+From: Francois Perrad <francois.perrad@gadz.org>
+Date: Sun, 29 Jul 2018 11:17:34 +0200
+Subject: [PATCH] allow libluajit detection
+
+This detection was done only if luarocks is runned by luajit.
+But on Buildroot, luarocks is always runned by lua.
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+---
+ src/luarocks/deps.lua | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
+index 8403f12..c1c0220 100644
+--- a/src/luarocks/deps.lua
++++ b/src/luarocks/deps.lua
+@@ -511,10 +511,8 @@ function deps.check_lua(vars)
+       "lua-" .. cfg.lua_version,
+       "lua-" .. shortv,
+       "lua",
++      "luajit-" .. cfg.lua_version,
+    }
+-   if cfg.luajit_version then
+-      table.insert(libnames, 1, "luajit-" .. cfg.lua_version)
+-   end
+    for _, libname in ipairs(libnames) do
+       local ok = check_external_dependency("LUA", { library = libname }, vars, "build")
+       if ok then
+-- 
+2.17.1
+
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] luarocks: fix lua modules building with luajit
  2018-07-29  9:44 [Buildroot] [PATCH] luarocks: fix lua modules building with luajit Francois Perrad
@ 2018-08-05 10:07 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-08-05 10:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 29 Jul 2018 11:44:57 +0200, Francois Perrad wrote:
> currently, when luajit is selected as luainterpreter,
> all lua module fails to build with the message:
>     Error: Failed finding Lua library. You may need to configure LUA_LIBDIR.
> 
> see http://autobuild.buildroot.net/results/66de049c306d7aff66894d53e2f4fa755fd01594
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  .../0001-allow-libluajit-detection.patch      | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 package/luarocks/0001-allow-libluajit-detection.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-05 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29  9:44 [Buildroot] [PATCH] luarocks: fix lua modules building with luajit Francois Perrad
2018-08-05 10:07 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.