Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luarocks fail on moonlibs/algo #802

Open
Totktonada opened this issue Mar 12, 2024 · 3 comments
Open

luarocks fail on moonlibs/algo #802

Totktonada opened this issue Mar 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Totktonada
Copy link
Member

Version

$ tt --version
<..weary sigh..>
$ tt version
Tarantool CLI version 2.2.0, linux/amd64. commit: c30bf96

Steps to reproduce

$ git clone https://github.com/moonlibs/algo.git
$ cd algo
$ tt rocks test --prepare

Result

Error: LuaRocks 3.9.2 bug (please report at https://github.com/luarocks/luarocks/issues).
Arch.: linux-x86_64
<string>:243: assertion failed!
stack traceback:
	[G]: in function 'assert'
	<string>:243: in function 'fulfill_dependency'
	<string>:336: in function 'fulfill_dependencies'
	<string>:138: in function 'process_dependencies'
	<string>:379: in function <<string>:350>
	(tailcall): ?
	<string>:154: in function <<string>:117>
	(tailcall): ?
	<string>:237: in function 'fulfill_dependency'
	<string>:336: in function 'fulfill_dependencies'
	<string>:66: in function <<string>:37>
	(tailcall): ?
	(tailcall): ?
	[G]: in function 'xpcall'
	<string>:646: in function 'run_command'
	<string>:65: in function 'exec'
	<string>:1: in main chunk
	[G]: ?
Full output
$ tt rocks test --prepare
algo scm-1 depends on lua ~> 5.1 (5.1-1 provided by VM)
Missing dependencies for algo scm-1:
   luacheck (not installed)
   luatest (not installed)
   luacov (not installed)
   luacov-coveralls (not installed)
   luacov-console (not installed)
   luabench (not installed)

algo scm-1 depends on luacheck (not installed)
Installing https://rocks.tarantool.org/luacheck-scm-1.rockspec
Cloning into 'luacheck'...
remote: Enumerating objects: 6326, done.
remote: Counting objects: 100% (133/133), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 6326 (delta 57), reused 100 (delta 53), pack-reused 6193
Receiving objects: 100% (6326/6326), 2.27 MiB | 3.64 MiB/s, done.
Resolving deltas: 100% (4119/4119), done.
Missing dependencies for luacheck scm-1:
   argparse >= 0.6.0 (not installed)

luacheck scm-1 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM)
luacheck scm-1 depends on argparse >= 0.6.0 (not installed)
Installing https://luarocks.org/argparse-0.7.1-1.src.rock

argparse 0.7.1-1 depends on lua >= 5.1, < 5.5 (5.1-1 provided by VM)
No existing manifest. Attempting to rebuild...
argparse 0.7.1-1 is now installed in /home/alex/tmp/try-tt-rocks-on-algo/algo/.rocks (license: MIT)


Error: LuaRocks 3.9.2 bug (please report at https://github.com/luarocks/luarocks/issues).
Arch.: linux-x86_64
<string>:243: assertion failed!
stack traceback:
	[G]: in function 'assert'
	<string>:243: in function 'fulfill_dependency'
	<string>:336: in function 'fulfill_dependencies'
	<string>:138: in function 'process_dependencies'
	<string>:379: in function <<string>:350>
	(tailcall): ?
	<string>:154: in function <<string>:117>
	(tailcall): ?
	<string>:237: in function 'fulfill_dependency'
	<string>:336: in function 'fulfill_dependencies'
	<string>:66: in function <<string>:37>
	(tailcall): ?
	(tailcall): ?
	[G]: in function 'xpcall'
	<string>:646: in function 'run_command'
	<string>:65: in function 'exec'
	<string>:1: in main chunk
	[G]: ?

Findings

Search on fulfill_dependencies on the LuaRocks bug tracker gives the following open reports.

And the following closed ones.

luarocks/luarocks#1549 looks promising.

There is luarocks v3.10.0.

@Totktonada Totktonada added the bug Something isn't working label Mar 12, 2024
@Totktonada
Copy link
Member Author

@ochaton suggests me to look into .rocks/bin/luacheck and into tt rocks output. It seems, the problem is that I have Lua 5.1 installed into the system.

$ cat .rocks/bin/luacheck 
#!/bin/sh

LUAROCKS_SYSCONFDIR='/etc/luarocks' exec '/usr/bin/lua5.1' -e 'package.path="/home/alex/p/t/moonlibs/algo/.rocks/share/tarantool/?.lua;/home/alex/p/t/moonlibs/algo/.rocks/share/tarantool/?/init.lua;"..package.path;package.cpath="/home/alex/p/t/moonlibs/algo/.rocks/lib/tarantool/?.so;"..package.cpath;local k,l,_=pcall(require,"luarocks.loader") _=k and l.add_context("luacheck","scm-1")' '/home/alex/p/t/moonlibs/algo/.rocks/share/tarantool/rocks/luacheck/scm-1/bin/luacheck' "$@"

exec '/usr/bin/lua5.1'

$ tt rocks
<...>
Configuration:
   Lua:
      Version    : 5.1
      Interpreter: /usr/bin/lua5.1 (ok)
      LUA_DIR    : /usr (ok)
      LUA_BINDIR : /usr/bin (ok)
      LUA_INCDIR : /usr/include/lua5.1 (ok)
      LUA_LIBDIR : /usr/lib64/lua/5.1 (not found)
                   ****************************************
                   Use the command

                      luarocks config variables.LUA_LIBDIR <dir>

                   to fix the location
                   ****************************************

   Configuration files:
      System  : /etc/luarocks/config-5.1.lua (ok)
      User    : /home/alex/p/t/moonlibs/algo/.rocks/config-5.1.lua (ok)

   Rocks trees in use:
      /home/alex/.luarocks ("user")
      /usr/share/lua/5.1 ("system")

@ochaton
Copy link
Member

ochaton commented Mar 12, 2024

@Totktonada it is okay to have lua5.1 installed in the system along with tarantool. The real problem is, that tt fails to discover your installed tarantool from the system. Last thing, I suppose, you need to show us output of tt cfg dump and we will see where tt tries to find binary tarantool file and other necessary headers.

As long, as only you have good and stable reproducer, could you please configure extra option lua_interpreter="tarantool" inside .rocks/config-5.1.lua. Will it change somehow behaviour of the tt rocks install?

@Totktonada
Copy link
Member Author

Totktonada commented Mar 12, 2024

I suppose, you need to show us output of tt cfg dump and we will see where tt tries to find binary tarantool file and other necessary headers.

$ tt cfg dump
/etc/tarantool/tt.yaml:
env:
  bin_dir: /opt/tarantool/bin
  inc_dir: /opt/tarantool/include
  instances_enabled: /etc/tarantool/instances.enabled
  restart_on_failure: false
  tarantoolctl_layout: true
modules:
  directory: /opt/tarantool/modules
app:
  run_dir: /var/run/tarantool/sys_env
  log_dir: /var/log/tarantool/sys_env
  wal_dir: /var/lib/tarantool/sys_env
  memtx_dir: /var/lib/tarantool/sys_env
  vinyl_dir: /var/lib/tarantool/sys_env
ee:
  credential_path: ""
templates:
- path: /opt/tarantool/templates
repo:
  rocks: ""
  distfiles: /var/cache/tarantool/distfiles

My /etc/tarantool/tt.yaml is from here.


As long, as only you have good and stable reproducer, could you please configure extra option lua_interpreter="tarantool" inside .rocks/config-5.1.lua. Will it change somehow behaviour of the tt rocks install?

I see no changes in the configuration shown by tt rocks and in the tt rocks test --prepare behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants