Closed s4venth closed 1 year ago
Seems like you have an older version of msys2. Is your luarocks also installed on msys2 or is it luarocks on windows? Current msys2 has only mingw packages for luarocks. Also, can you install other packages such as lpeg
or lsqlite3
? I know that luarocks has issues with luafilesystem
(see https://github.com/luarocks/luarocks/issues/1428), but I don't think it does apply to your case. I guess that the gcc
compiler from msys2 is an unwanted effect from the os.execute
command in lua which invokes the windows cmd
. cmd
searches for programs defined in the PATH
environment variables. I guess you set the PATH
environment variable to include C:\msys64\usr\bin
path in order to run unix tools in msys2. Then, the cmd
command from os.execute
in luarocks accidentally stumbles across the gcc in msys2. Could you also provide the content of the PATH
environment variables? More information would clarify things.
The problem was indeed the msys2 version of gcc. Installing gcc
through scoop
, and changing my CC
environment variable to that instead, fixed the problem.
Thanks for the help
Glad I could help.
Ah, you used the CC
environment variable to specify the C compiler. Then, my guess with the PATH
environment variable was wrong.
For gcc in msys2, mostly the mingw packages are being used. It's odd that you installed gcc in C:\msys64\usr\bin
. Maybe switching to mingw gcc in msys2 could also solve your problem.
When installing via luarocks, I get this: