q66 / cffi-lua

A portable C FFI for Lua 5.1+
MIT License
176 stars 24 forks source link

env: ‘./luarocks/build.sh’: Permission denied #3

Closed diamond-lizard closed 3 years ago

diamond-lizard commented 3 years ago

When I try:

luarocks install --local cffi-lua

I get:

Installing https://rocks.moonscript.org/cffi-lua-0.1.1-1.src.rock...
Using https://rocks.moonscript.org/cffi-lua-0.1.1-1.src.rock... switching to 'build' mode
env \
        LUA="lua" CC="gcc" LD="gcc" \
        CFLAGS='-O2 -fPIC -I/usr/include -I/usr/include' \
        LDFLAGS='-L/usr/lib -lffi' \
        PREFIX="/home/me/.luarocks/lib/luarocks/rocks/cffi-lua/0.1.1-1" LIBDIR="/home/me/.luarocks/lib/luarocks/rocks/cffi-lua/0.1.1-1/lib" \
        ./luarocks/build.sh build

env: ‘./luarocks/build.sh’: Permission denied

Error: Build error: Failed building.
q66 commented 3 years ago

works on my machine:

q66@rimi: /home/q66$ luarocks install --local cffi-lua
Installing https://luarocks.org/cffi-lua-0.1.1-1.src.rock

cffi-lua 0.1.1-1 depends on lua >= 5.1 (5.3-1 provided by VM)
env \
        LUA="/usr/bin/lua5.3" CC="gcc" LD="gcc" \
        CFLAGS='-O2 -fPIC -I/usr/include/lua5.3 -I/usr/include' \
        LDFLAGS='-L/usr/lib -lffi' \
        PREFIX="/home/q66/.luarocks/lib/luarocks/rocks-5.3/cffi-lua/0.1.1-1" LIBDIR="/home/q66/.luarocks/lib/luarocks/rocks-5.3/cffi-lua/0.1.1-1/lib" \
        ./luarocks/build.sh build

The Meson build system
Version: 0.55.3
Source dir: /tmp/luarocks_cffi-lua-0.1.1-1-BeeA20/cffi-lua
Build dir: /tmp/luarocks_cffi-lua-0.1.1-1-BeeA20/cffi-lua/build
Build type: native build
Project name: cffi-lua
Project version: 0.1.1
Using 'CXX' from environment with value: 'g++'
Using 'CXXFLAGS' from environment with value: '-O2 -fPIC -I/usr/include/lua5.3 -I/usr/include'
Using 'LDFLAGS' from environment with value: '-L/usr/lib -lffi'
Using 'CXX' from environment with value: 'g++'
Using 'CXXFLAGS' from environment with value: '-O2 -fPIC -I/usr/include/lua5.3 -I/usr/include'
Using 'LDFLAGS' from environment with value: '-L/usr/lib -lffi'
C++ compiler for the host machine: g++ (gcc 9.3.0 "g++ (GCC) 9.3.0")
C++ linker for the host machine: g++ ld.bfd 2.34
Host machine cpu family: ppc64
Host machine cpu: ppc64le
Compiler for C++ supports arguments -Wshadow: YES 
Compiler for C++ supports arguments -Wold-style-cast: YES 
Compiler for C++ supports arguments -fvisibility=hidden: YES 
Checking for size of "void *" : 8
Has header "endian.h" : YES 
Library dl found: YES
Has header "ffi.h" with dependency not-found: YES 
Has header "lua.hpp" with dependency not-found: YES 
Configuring config.h using configuration
Computing int of "LUA_VERSION_NUM" with dependency not-found: 504
Build targets in project: 1

Option buildtype is: release [default: debugoptimized]
Found ninja-1.10.1 at /usr/bin/ninja
[7/7] Linking target cffi.so
env \
        LUA="/usr/bin/lua5.3" CC="gcc" LD="gcc" \
        CFLAGS='-O2 -fPIC -I/usr/include/lua5.3 -I/usr/include' \
        LDFLAGS='-L/usr/lib -lffi' \
        PREFIX="/home/q66/.luarocks/lib/luarocks/rocks-5.3/cffi-lua/0.1.1-1" LIBDIR="/home/q66/.luarocks/lib/luarocks/rocks-5.3/cffi-lua/0.1.1-1/lib" \
        ./luarocks/build.sh install

[0/1] Installing files.
Installing cffi.so to /home/q66/.luarocks/lib/luarocks/rocks-5.3/cffi-lua/0.1.1-1/lib
No existing manifest. Attempting to rebuild...
cffi-lua 0.1.1-1 is now installed in /home/q66/.luarocks (license: MIT)

i see no reason why it wouldn't, since the build.sh script has permissions 755

diamond-lizard commented 3 years ago

Upgrading luarocks to 3.3.1 and running:

luarocks install --server=http://luarocks.org --local cffi-lua

Solved this issue.