Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 892081

Summary: dev-lua/luarocks-3.9.1: fails to find Lua 5.1 interpreter
Product: Gentoo Linux Reporter: Andrew <awkravchuk>
Component: Current packagesAssignee: Conrad Kostecki <conikost>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log for lua:5.1
build.log for luarocks

Description Andrew 2023-01-26 11:47:20 UTC
Trying to start luarocks, it provides the following error:

$ luarocks
Warning: Lua 5.1 interpreter not found at /usr

Modules may not install with the correct configurations. You may want to configure the path prefix to your build of Lua 5.1 using

   luarocks config --local lua_dir <your-lua-prefix>

<skipped>

although the Lua 5.1 interpreter is indeed present and being eselect'ed as default:

$ which lua
/usr/bin/lua
$ lua -v
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio

Reproducible: Always

Steps to Reproduce:
1. Start luarocks
Actual Results:  
The error is thrown

Expected Results:  
It works
Comment 1 Andrew 2023-01-26 11:52:23 UTC
Output of luarocks config:
accept_unknown_fields = false
arch = "linux-x86_64"
cache = {
   luajit_version = "",
   luajit_version_checked = true
}
cache_fail_timeout = 86400
cache_timeout = 60
check_certificates = false
cmake_generator = "Unix Makefiles"
config_files = {
   nearest = "/etc/luarocks/config-5.1.lua",
   system = {
      file = "/etc/luarocks/config-5.1.lua",
      found = true
   },
   user = {
      file = "/home/andrew/.luarocks/config-5.1.lua",
      found = false
   }
}
connection_timeout = 30
deploy_bin_dir = "/usr/share/lua/5.1/bin"
deploy_lib_dir = "/usr/share/lua/5.1/lib/lua/5.1"
deploy_lua_dir = "/usr/share/lua/5.1/share/lua/5.1"
deps_mode = "one"
disabled_servers = {}
export_path_separator = ":"
external_deps_dirs = {
   "/usr/local",
   "/usr",
   "/"
}
external_deps_patterns = {
   bin = {
      "?"
   },
   include = {
      "?.h"
   },
   lib = {
      "lib?.a",
      "lib?.so",
      "lib?.so.*"
   }
}
external_deps_subdirs = {
   bin = "bin",
   include = "include",
   lib = {
      "lib",
      "lib64"
   }
}
external_lib_extension = "so"
fs_use_modules = true
gcc_rpath = true
home = "/home/andrew"
home_tree = "/home/andrew/.luarocks"
homeconfdir = "/home/andrew/.luarocks"
hooks_enabled = true
lib_extension = "so"
lib_modules_path = "/lib/lua/5.1"
link_lua_explicitly = false
local_by_default = false
local_cache = "/var/tmp/cache/andrew//luarocks"
lua_extension = "lua"
lua_interpreter = "lua5.1"
lua_modules_path = "/share/lua/5.1"
lua_version = "5.1"
no_manifest = false
obj_extension = "o"
processor = "x86_64"
program_version = "3.9.1"
rocks_dir = "/usr/share/lua/5.1/lib/luarocks/rocks-5.1"
rocks_servers = {
   {
      "https://luarocks.org",
      "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/",
      "https://luafr.org/luarocks/"
   }
}
rocks_subdir = "/lib/luarocks/rocks-5.1"
rocks_trees = {
   {
      name = "user",
      root = "/home/andrew/.luarocks"
   },
   {
      name = "system",
      root = "/usr/share/lua/5.1"
   }
}
runtime_external_deps_patterns = {
   bin = {
      "?"
   },
   include = {
      "?.h"
   },
   lib = {
      "lib?.so",
      "lib?.so.*"
   }
}
runtime_external_deps_subdirs = {
   bin = "bin",
   include = "include",
   lib = {
      "lib",
      "lib64"
   }
}
static_lib_extension = "a"
sysconfdir = "/etc/luarocks"
target_cpu = "x86_64"
upload = {
   api_version = "1",
   server = "https://luarocks.org",
   tool_version = "1.0.0"
}
user_agent = "LuaRocks/3.9.1 linux-x86_64"
variables = {
   AR = "ar",
   BUNZIP2 = "bunzip2",
   CC = "gcc",
   CFLAGS = "-O2 -fPIC",
   CHMOD = "chmod",
   CMAKE = "cmake",
   CP = "cp",
   CURL = "curl",
   CURLNOCERTFLAG = "-k",
   CVS = "cvs",
   FIND = "find",
   GIT = "git",
   GPG = "gpg",
   GUNZIP = "gunzip",
   HG = "hg",
   ICACLS = "icacls",
   LD = "gcc",
   LIBFLAG = "-shared",
   LIB_EXTENSION = "so",
   LS = "ls",
   LUA = "/usr/bin/lua5.1",
   LUA_BINDIR = "/usr/bin",
   LUA_DIR = "/usr",
   LUA_INCDIR = "/usr/include/lua5.1",
   LUA_LIBDIR = "/usr/lib64/lua/5.1",
   MAKE = "make",
   MD5 = "md5",
   MD5SUM = "md5sum",
   MKDIR = "mkdir",
   MKTEMP = "mktemp",
   OBJ_EXTENSION = "o",
   OPENSSL = "openssl",
   PWD = "pwd",
   RANLIB = "ranlib",
   RM = "rm",
   RMDIR = "rmdir",
   ROCKS_TREE = "/usr/share/lua/5.1/lib/luarocks/rocks-5.1",
   RSYNC = "rsync",
   RSYNCFLAGS = "--exclude=.git -Oavz",
   SCP = "scp",
   SCRIPTS_DIR = "/usr/share/lua/5.1/bin",
   SEVENZ = "7z",
   SSCM = "sscm",
   SVN = "svn",
   TAR = "tar",
   TEST = "test",
   TOUCH = "touch",
   UNZIP = "unzip -n",
   WGET = "wget",
   WGETNOCERTFLAG = "--no-check-certificate",
   ZIP = "zip"
}
web_browser = "xdg-open"
wrapper_suffix = ""
Comment 2 Conrad Kostecki gentoo-dev 2023-02-21 17:56:31 UTC
Hi!
Could I see please build.log of your emerge?

Thanks!
Comment 3 Andrew 2023-02-21 19:28:19 UTC
Created attachment 853512 [details]
build.log for lua:5.1
Comment 4 Andrew 2023-02-21 19:28:52 UTC
Created attachment 853514 [details]
build.log for luarocks
Comment 5 Andrew 2023-02-21 19:30:14 UTC
Hello! Sure, I've attached build logs for both Lua itself and luarocks.
Weirdly enough, after re-emerging those the error in OP is gone, but I remember this error come and go, perhaps this is related to other Lua packages being updated and re-emerged.
Comment 6 Conrad Kostecki gentoo-dev 2023-04-22 23:45:01 UTC
Well, then I tend to close here. I haven't been able to reproduce and as you state, it works now for you.