tarantool / tarantool/tt

`tt rocks install` doesn't find Lua headers if there's `bin/tarantool`

Open
#1,157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
113
Forks
18
Avg merge
4d 11h
Merged PRs (30d)
23

Description

Bug description

I have ~/bin/tarantool on my laptop. I noticed that tt rocks install fails to find Lua headers if I run it from the home directory while it works fine if I run it from any other directory (I have Lua headers installed into /usr/local/include/tarantool). This is confusing and inconvenient.

Version

Tarantool CLI version 2.9.1, linux/amd64. commit: 22f0ba4f5148 (v2.9.1-2-g22f0ba4f5148)

Steps to reproduce

  1. Create bin directory in the home directory and copy the Tarantool binary to it:
    cd
    mkdir bin
    cp `which tarantool` bin
    
  2. Add ~bin to PATH:
    export PATH=$HOME/bin:$PATH
    
  3. Try to install a rock:
    tt rocks install checks
    

I get the following error:

Warning: failed to load command module luarocks.cmd.config: <string>:11: module luarocks.vendor.dkjson not found:
        no field package.preload['luarocks.vendor.dkjson']
        stat ./luarocks/vendor/dkjson.lua: no such file or directory
        stat /usr/local/share/lua/5.1/luarocks/vendor/dkjson.lua: no such file or directory
        stat /usr/local/share/lua/5.1/luarocks/vendor/dkjson/init.lua: no such file or directory,
Installing http://rocks.tarantool.org/checks-scm-1.rockspec
Cloning into 'checks'...
remote: Enumerating objects: 554, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 554 (delta 46), reused 37 (delta 37), pack-reused 467 (from 2)
Receiving objects: 100% (554/554), 131.24 KiB | 1.25 MiB/s, done.
Resolving deltas: 100% (277/277), done.

checks scm-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)

Error: Failed finding Lua header files (searched at /home/vlad/include/include/tarantool). You may need to install them or configure LUA_INCDIR.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing tt rocks install checks from the home directory and from another directory, using the reported ~/bin/tarantool setup. Trace the tt rocks install path-resolution and header lookup behavior; done when the command finds headers in /usr/local/include/tarantool regardless of the current directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.