awesome crashes after LUA_PATH change

Created on 2 Jun 2016  路  7Comments  路  Source: awesomeWM/awesome

I have installed torch package and after the installation LUA_PATH was changed.

Here is my current $LUA_PATH

'/home/tastyminerals/.luarocks/share/lua/5.1/?.lua;/home/tastyminerals/.luarocks/share/lua/5.1/?/init.lua;/home/tastyminerals/torch/install/share/lua/5.1/?.lua;/home/tastyminerals/torch/install/share/lua/5.1/?/init.lua;./?.lua;/home/tastyminerals/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua'

When I attempt to run awesome with startx it crashes complaining about not found lgi lib which is installed into /usr/lib/lua/5.3/lgi/ and other dirs. What lgi files/dirs does awesome need in order to start so that I could add the missing paths to $LUA_PATH?

Most helpful comment

Let me rewrite what you said and perhaps you see the problem:

I installed some shitty program which changed my LUA_PATH. Now the path that LGI is installed to is no longer found via LUA_PATH and so LGI is no longer found.

The answer is "your installation is broken, fix it". If you cannot run lua -e 'require("lgi")' successfully, then the problem is not with awesome.

And to help with this non-awesome-related problem:
Try unset LUA_PATH ; unset LUA_CPATH ; lua -e 'print(package.path) print(package.cpath)' to get the default values for LUA_PATH and LUA_CPATH (assuming torch broke your system by exporting these two variables, if it did other stupidity, you'd have to undo that as well).

P.S.: How come so many people started breaking their system with torch recently? I also saw a similar report recently on IRC. How come the guys behind torch do something as stupid as this?

All 7 comments

https://www.reddit.com/r/awesomewm/comments/4ljzhe/black_screen/

Lua versions are not compatible. If you try to run Awesome linked against 5.1 with liblua 5.3, it will crash. There is a workaround in the reddit link

Let me rewrite what you said and perhaps you see the problem:

I installed some shitty program which changed my LUA_PATH. Now the path that LGI is installed to is no longer found via LUA_PATH and so LGI is no longer found.

The answer is "your installation is broken, fix it". If you cannot run lua -e 'require("lgi")' successfully, then the problem is not with awesome.

And to help with this non-awesome-related problem:
Try unset LUA_PATH ; unset LUA_CPATH ; lua -e 'print(package.path) print(package.cpath)' to get the default values for LUA_PATH and LUA_CPATH (assuming torch broke your system by exporting these two variables, if it did other stupidity, you'd have to undo that as well).

P.S.: How come so many people started breaking their system with torch recently? I also saw a similar report recently on IRC. How come the guys behind torch do something as stupid as this?

I sent this bug report where it belongs: https://github.com/torch/distro/issues/120

@psychon I think it has to do more the fact that different lua versions are incompatible, seriously lua needs a version manager.

I think debian manages to do that fine...

So, the problem (in my case) can be prevented by commenting out the following line in .bashrc:
. /home/tastyminerals/torch/install/bin/torch-activate.

Just so you know, Torch is a popular library for scientific computing and machine learning, one that Facebook AI Research uses a lot. I just broke my awesome installation due to this same thing, thankfully I found the logs pointing me in the right direction. But yeah, this is definitely a torch issue, it'd be nice if their installer detected existing versions of Lua and didn't install the activation script in the case that lua was already installed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philer picture philer  路  3Comments

1096283585 picture 1096283585  路  3Comments

Fybe picture Fybe  路  5Comments

xordspar0 picture xordspar0  路  5Comments

batmanm0b1E picture batmanm0b1E  路  6Comments