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 not working on fresh install: "Error: failed making directory" #15458

Closed
2 of 7 tasks
osch opened this issue Feb 3, 2023 · 1 comment
Closed
2 of 7 tasks
Labels

Comments

@osch
Copy link
Contributor

osch commented Feb 3, 2023

Description / Steps to reproduce the issue

Steps to reproduce:

  • Install fresh MSYS2 into C:\tmp\msys64 (the crucial point is, that there are no lua modules, especially luafilesystem in the fresh install)

  • Launch "MSYS2 MinGW x64" (MSYSTEM=MINGW64)

  • Install Lua pacman -S mingw-w64-x86_64-lua

  • Install Luarocks pacman -S mingw-w64-x86_64-lua-luarocks

  • Install a Lua module, e.g. lpeg using Luarocks: luarocks install lpeg

Last step results in error:

$ luarocks install lpeg
Installing https://luarocks.org/lpeg-1.0.2-1.src.rock

lpeg 1.0.2-1 depends on lua >= 5.1 (5.4-1 provided by VM)

Error: failed making directory C:/tmp/msys64/mingw64/lib/luarocks/rocks-5.4/lpeg/1.0.2-1/conf

Expected behavior

Expected behavior is that the command luarocks install lpeg does install the Lua module lpeg without errors.

Actual behavior

Actual bahaviour is that the command luarocks install lpeg does not install the module lpeg and gives error on a fresh install of msys. This is a general error and does not depend on the concrete module lpeg which is only an example for the general situation.

$ type lua
bash: type: lua: not found

$ pacman -S mingw-w64-x86_64-lua
....

$ type lua
lua is /mingw64/bin/lua

$ lua -e 'print(require"lfs")'
C:\tmp\msys64\mingw64\bin\lua.exe: (command line):1: module 'lfs' not found:

$ lua -e 'print(require"lpeg")'
C:\tmp\msys64\mingw64\bin\lua.exe: (command line):1: module 'lpeg' not found:

$ pacman -S mingw-w64-x86_64-lua-luarocks
...

$ pacman -Q mingw-w64-x86_64-lua
mingw-w64-x86_64-lua 5.4.4-1

$ pacman -Q mingw-w64-x86_64-lua-luarocks
mingw-w64-x86_64-lua-luarocks 3.9.0-1

$ lua -e 'print(require"lfs")'
C:\tmp\msys64\mingw64\bin\lua.exe: (command line):1: module 'lfs' not found:

$ lua -e 'print(require"lpeg")'
C:\tmp\msys64\mingw64\bin\lua.exe: (command line):1: module 'lpeg' not found:

$ luarocks install lpeg
Installing https://luarocks.org/lpeg-1.0.2-1.src.rock

lpeg 1.0.2-1 depends on lua >= 5.1 (5.4-1 provided by VM)

Error: failed making directory C:/tmp/msys64/mingw64/lib/luarocks/rocks-5.4/lpeg/1.0.2-1/conf

I wrote more details here: #12002

Verification

Windows Version

MSYS_NT-10.0-19045

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

yes, I already did and wrote more details: see: #12002

@osch
Copy link
Contributor Author

osch commented Feb 24, 2024

fixed in #20166

@osch osch closed this as completed Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant