From d534a32241aab49c18bae1b21f40f856baa22ab0 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 26 Apr 2019 11:41:10 -0300 Subject: Fix build of binaries --- binary/all_in_one | 1 + src/luarocks/core/cfg.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/binary/all_in_one b/binary/all_in_one index d38fe706..4b674365 100755 --- a/binary/all_in_one +++ b/binary/all_in_one @@ -419,6 +419,7 @@ local function generate(main_program, dir, skip) --if_platform("windows", "mingw/liblua.a"), -- FIXME cfg.variables.LUA_LIBDIR .. "/" .. cfg.variables.LUALIB:gsub("%.so.*$", ".a"), if_platform("unix", "-ldl"), + if_platform("unix", "-lpthread"), "-lm" }), " ") print(cmd) diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index fd74ff98..02fb564b 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -560,7 +560,7 @@ function cfg.init(detected, warning) local lua_bindir = detected.lua_bindir or hardcoded.LUA_BINDIR or (arg and arg[-1] and arg[-1]:gsub("[\\/][^\\/]+$", "")) local lua_incdir = detected.lua_incdir or hardcoded.LUA_INCDIR local lua_libdir = detected.lua_libdir or hardcoded.LUA_LIBDIR - local lua_dir = detected.lua_dir or hardcoded.LUA_DIR + local lua_dir = detected.lua_dir or hardcoded.LUA_DIR or (lua_bindir and lua_bindir:gsub("[\\/]bin$", "")) local init = cfg.init -- cgit v1.2.3-55-g6feb