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

tt rocks fails to install cluacov with Tarantool EE #271

Closed
DifferentialOrange opened this issue Dec 5, 2022 · 2 comments
Closed

tt rocks fails to install cluacov with Tarantool EE #271

DifferentialOrange opened this issue Dec 5, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@DifferentialOrange
Copy link
Member

May be reproduced as follows.

For example, you may use clean Ubuntu installation in docker.

docker run -it ubuntu:20.04

1. Prepare the environment.

apt-get update
apt-get install -y curl gcc

2. Download and source EE SDK.

export DOWNLOAD_TOKEN='PUT YOUR TOKEN HERE'
curl -O -L -v "https://tarantool:${DOWNLOAD_TOKEN}@download.tarantool.io/enterprise/tarantool-enterprise-bundle-2.10.0-6-gaaed1a3cb-r497-linux-x86_64.tar.gz"
tar -xvf ./tarantool-enterprise-bundle-2.10.0-6-gaaed1a3cb-r497-linux-x86_64.tar.gz 
source ./tarantool-enterprise/env.sh
tarantool --version
Tarantool Enterprise 2.10.0-6-gaaed1a3cb-r497

3. Install tt.

curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash
apt-get update
apt-get install -y tt
tt version
Tarantool CLI version 0.2.1, linux/amd64. commit: 6078ab9

4. Install cluacov from rockspec.

With tt

tt rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec
Missing dependencies for cluacov scm-1:
   luacov >= 0.13.0 (not installed)

cluacov scm-1 depends on luacov >= 0.13.0 (not installed)
Installing http://rocks.tarantool.org/luacov-0.13.0-1.rockspec

Cloning into 'luacov'...
remote: Enumerating objects: 1762, done.
remote: Counting objects: 100% (220/220), done.
remote: Compressing objects: 100% (105/105), done.
remote: Total 1762 (delta 112), reused 191 (delta 102), pack-reused 1542
Receiving objects: 100% (1762/1762), 813.09 KiB | 3.89 MiB/s, done.
Resolving deltas: 100% (1059/1059), done.
Note: switching to '637c48d59f722050d718d0c398f655bc7fe1707a'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

No existing manifest. Attempting to rebuild...
luacov 0.13.0-1 is now installed in /.rocks (license: MIT)

Cloning into 'cluacov'...
remote: Enumerating objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Unpacking objects: 100% (65/65), 39.85 KiB | 832.00 KiB/s, done.

Error: Build error: Lua header file lua.h not found (looked in /__w/sdk/sdk/build.sdk/tarantool-2.10/static-build/tarantool-prefix/include/tarantool).

With tarantoolctl

tarantoolctl rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec

Cloning into 'cluacov'...
remote: Enumerating objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Unpacking objects: 100% (65/65), 39.85 KiB | 669.00 KiB/s, done.
gcc -O2 -fPIC -I/tarantool-enterprise/include/tarantool -c src/cluacov/deepactivelines.c -o src/cluacov/deepactivelines.o
gcc -shared -o cluacov/deepactivelines.so src/cluacov/deepactivelines.o
gcc -O2 -fPIC -I/tarantool-enterprise/include/tarantool -c src/cluacov/hook.c -o src/cluacov/hook.o
gcc -shared -o cluacov/hook.so src/cluacov/hook.o
cluacov scm-1 is now installed in /.rocks (license: MIT)
@DifferentialOrange DifferentialOrange added the bug Something isn't working label Dec 5, 2022
@0x501D
Copy link
Member

0x501D commented Dec 5, 2022

In order for tt rocks to use the correct path to the header files supplied with the tarantool EE, the tarantool EE must be installed using tt.

Steps:

  • copy tarantool-enterprise-bundle-XYZ.tar.gz to /var/cache/tarantool/distfiles
  • tt install tarantool-ee -f --local-repo

After that, tt rocks install will work correctly.

$ tt rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec

Cloning into 'cluacov'...
remote: Enumerating objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Receiving objects: 100% (65/65), 39.87 KiB | 434.00 KiB/s, done.
Resolving deltas: 100% (26/26), done.
gcc -O2 -fPIC -I/opt/tarantool/include/include/tarantool -c src/cluacov/deepactivelines.c -o src/cluacov/deepactivelines.o
gcc -shared -o cluacov/deepactivelines.so src/cluacov/deepactivelines.o
gcc -O2 -fPIC -I/opt/tarantool/include/include/tarantool -c src/cluacov/hook.c -o src/cluacov/hook.o
gcc -shared -o cluacov/hook.so src/cluacov/hook.o
cluacov scm-1 is now installed in /tmp/tt-demo/.rocks (license: MIT)

@psergee
Copy link
Collaborator

psergee commented Jun 13, 2023

Fixed in latest SDK and in
12bf404
commit.

@psergee psergee closed this as completed Jun 13, 2023
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

4 participants