torch / distro

Torch installation in a self-contained folder
BSD 3-Clause "New" or "Revised" License
555 stars 481 forks source link

macOS - Lua2.1 - File not found lua-cjson-2.1devel-1.rockspec #269

Closed guhur closed 5 years ago

guhur commented 5 years ago

The command ./install.sh does not work on my computer.

It produces the following error:

Prefix set to /Users/pierre-louis/MVA/ImageNumerique/Project/distro/install Installing Lua version: LUAJIT21 Installing common Lua packages env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/include -c src/lfs.c -o src/lfs.o env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -bundle -undefined dynamic_lookup -all_load -o lfs.so -L/Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/lib src/lfs.o Updating manifest for /Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/lib/luarocks/rocks luafilesystem 1.6.3-1 is now built and installed in /Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/ (license: MIT/X11)

Updating manifest for /Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/lib/luarocks/rocks penlight scm-1 is now built and installed in /Users/pierre-louis/MVA/ImageNumerique/Project/distro/install/ (license: MIT/X11)

Error: File not found: lua-cjson-2.1devel-1.rockspec

I am using macOS. I have tried also with the command TORCH_LUA_VERSION=LUA52 ./install.sh, but the error is the same.

guhur commented 5 years ago

The reason is that the folder extra/lua-cjson is surprisingly empty:

git status                                                                                             
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    deleted:    .gitattributes
    deleted:    .gitignore
    deleted:    CMakeLists.txt
    deleted:    LICENSE
    deleted:    Makefile
    deleted:    NEWS
    deleted:    README.adoc
    deleted:    THANKS
    deleted:    TODO
    deleted:    build-packages.sh
    deleted:    devel/json_parser_outline.txt
    deleted:    dtoa.c
    deleted:    dtoa_config.h
    deleted:    fpconv.c
    deleted:    fpconv.h
    deleted:    g_fmt.c
    deleted:    lua-cjson-2.1devel-1.rockspec
    deleted:    lua-cjson.spec
    deleted:    lua/cjson/util.lua
    deleted:    lua/json2lua.lua
    deleted:    lua/lua2json.lua
    deleted:    lua_cjson.c
    deleted:    manual.adoc
    deleted:    performance.adoc
    deleted:    rfc4627.txt
    deleted:    runtests.sh
    deleted:    strbuf.c
    deleted:    strbuf.h
    deleted:    tests/README
    deleted:    tests/bench.lua
    deleted:    tests/example1.json
    deleted:    tests/example2.json
    deleted:    tests/example3.json
    deleted:    tests/example4.json
    deleted:    tests/example5.json
    deleted:    tests/genutf8.pl
    deleted:    tests/numbers.json
    deleted:    tests/octets-escaped.dat
    deleted:    tests/rfc-example1.json
    deleted:    tests/rfc-example2.json
    deleted:    tests/test.lua
    deleted:    tests/types.json

In the concerned folder, I launched git reset --hard HEAD and the compilation goes on.

guhur commented 5 years ago

I had the same issue with trepl-scm-1.rockspec and I solved it the same way. I really don't know why all files but not the folder was deleted. I stopped the installation at beginning, so maybe an emergency script has deleted the file but was stopped by protected .git folder?