-
Notifications
You must be signed in to change notification settings - Fork 30
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
Updating to Lua 5.4.2 crashes AwesomeWM #128
Comments
TLDRAfter upgrading Lua you have re-build Awesome and re-install Lua modules (LuaRocks stuff). Currently the stable version of
The error message is due to Full Process (so far)Section 1: Installing Lua54 Compatible Compile RecipesInstall/update programs (and deps) for Lua54 support using
Re-Source Bash's EnvironmentIt is important that for f in $goboEnvironment/*--*; source $f
or
source /Programs/Lua/Current/Resources/Environment
source /Programs/LuaRocks/Current/Resources/Environment Section 2: Installing LuaRocks ModulesGobo provides a handful of LuaRocks modules to make AwesomeWM look and feel as it does. By default these modules are installed for Lua53, but now that Lua54 is being used, they have to be re-installed. These modules should be easily installed using the
If you're lazy like me, you could use this instead, to install all of them for pkg in luafilesystem gobo-awesome{,-{alttab,battery,bluetooth,gobonet,light,sound}}; do
sudo Alien-LuaRocks --install $pkg
done Section 3: Installing LuaRocks Git ModulesAwesome requires LGI to be installed, however
Section 4: Compiling AwesomeAfter all of this you should be able to compile Awesome as normal.
NotesThe versions listed in Section 1 are based on when each software added Lua54 support, I have not tested them individually; durring testing I have used the following software/versions:
|
Sounds like quite the rabbit hole, good work so far 💪
Maybe try running Is LGI properly installed? Is it installed inside
This is probably worth investigating at some point. |
This was done earlier, I'm not at the system atm, and am done for the night. It's putting up quite a hasle though lmao
earlier testing was done with installing LGI in
I wasn't running with I tested with The build fails on though Lua is quite nice in showing what directories it looks in, and it appeared that in I have no clue where it's pulling it's I investicated the Tried defining I tested it with the I plan on investiging under the hood what Compile is doing and playing it by ear from there, but that's for tommorow.
and yes investigating that is a plan for the future, I'd like to get things working first, but yes. one note, if the |
I'd probably look into this part.
Seems to make sense. If |
Part that's confusing me the most is that when I am going to look more into if i recall correctly
succeeds, and has propper paths. So I dont think the issue is coming directly from |
Yeah I get you. Sometimes GoboLinux feels like the first steps on the Moon. But slow and steady approach will lead to the result. Anyways have a good rest. |
Okay, I think I found the cause, it was Runner related.
Case A passes because When running
|
restarting the machine is no longer necessary, though the Environment files do need to be re-sourced by the user. Unfortunately it doesn't appear that this can be done automatically The main comment was updated with instructions and reasoning for such (Section 1 > Re-Source Bash's Environment). |
Case C is definitely fairly confusing. However it does sound familiar, although I cannot remember what the exact case was for me. @hishamhm as @sage-etcher mentioned, gobo-awesome-screenlock seems to be missing from LuaRocks. Although we can install it from git, this is probably not ideal. Do you know why it has been removed? Would you kindly re-publish it to LuaRocks? |
@Nuc1eoN I don't think gobo-awesome-screenlock was ever uploaded to luarocks.org! I've just cloned the repo and uploaded it there using my luarocks account. |
(I've never used that package myself; I wrote the other gobo-awesome entries, but this one was made by Lucas.) |
Great, thank you!:) @sage-etcher , one note regarding:
Maybe let's add this re-sourcing to a PostInstall section of the Lua/LuaRocks recipes? That would prevent potential future users from potential issues. At the very least I would suggest something like @hishamhm Do we have some in-build/native hook in Compile that we could use to re-source the EDIT: |
since each process keeps its own environment, there's no real way to automatically re-source the environment in a complete way after a package upgrade. You'll always have things like terminal windows still open running the old environment, etc. For things like the window manager, which is the parent process of all graphical applications, then yeah, I think it's reasonable to require a re-login to get the whole subprocess tree refreshed. If re-sourcing the environment is something that is needed in between building dependencies so that the whole compilation succeeds, then code could be added to Compile for it to do that for its own process (I don't recall us reloading Environment files from within Compile... maybe it does already?), but I don't think there's a way to have a more automagical solution that refreshes everything. |
@sage-etcher I am trying to follow your guide now in order to update my Lua/Awesome setup. But upon running source /Programs/LuaRocks/Current/Resources/Environment as suggested in your guide, I am getting:
It looks like there is some issue with this script: Recipes/LuaRocks/3.9.2/Resources/Environment Lines 1 to 19 in 542a759
Possibly related to dcd7442 of PR #234 ? Right now my
EDIT: Seems to be specific to zsh, since running it from pure bash succeeds. EDIT2: So yes, running startx from bash succeeds, while when running startx from ZSH the awesome setup starts but is severely degraded (broken theme etc). EDIT3: reverting dcd7442 works for zsh. However I have to run |
Interesting. From the error message it appears that ZSH doesn't support export LUA_PATH$k="\
${LUA_PATH${k}}
;$goboSystem/Aliens/LuaRocks/share/lua/$v/?.lua;\
...
" NOTE: the above code is untested, I am uncertain if the EDIT:
The broken themes in ZSH are thanks to Awesome/Lua failing to find the Lua modules required for the theme, this is expected if the Environment fails to source. EDIT2: looks like |
Okay, I rewrote the LuaRocks Environment file to use less magic, however it is now fairly large. The new one is using Bash4 arrays instead of variable expansion magic like the previous. @Nuc1eoN can you verify functionality in your ZSH environment, I'm stuck in WSL bash atm? EDIT: I over complicated it on first pass, I put a 2nd commit with the simplified version. no arrays are needed, lol |
Hm, wouldn't something like: # LuaRocks Environment
for vk in 5.1= 5.2=_5_2 5.3=_5_3 5.4=_5_4
do
v="${vk%=*}"
k="${vk#*=}"
export LUA_PATH$k="$LUA_PATH$k\
$goboSystem/Aliens/LuaRocks/share/lua/$v/?.lua;\
$goboSystem/Aliens/LuaRocks/share/lua/$v/?/init.lua;\
$goboSystem/Aliens/LuaRocks/lib/lua/$v/?.lua;\
$goboSystem/Aliens/LuaRocks/lib/lua/$v/?/init.lua"
export LUA_CPATH$k="$LUA_CPATH$k\
$goboSystem/Aliens/LuaRocks/lib/lua/$v/?.so;\
$goboSystem/Aliens/LuaRocks/lib/lua/$v/loadall.so"
done
unset v k vk suffice? In my testing zsh, as well as bash could source this correctly (although I am not yet sure how to best handle the semicolons). In any case I would try your solution, but got difficulties reproducing this issue right now. 😅 For some reason even if I delete And for instance my
I do not understand the magic yet :) |
no not quite, the original is using variable expansions (as it is called when used in Windows Batch, I am unsure what name bash uses for it). This means that while and so, to modify the above example k="_5_4"
LUA_PATH="version51path"
LUA_PATH_5_4="version54path"
LUA_PATH$k="$LUA_PATH$k;appendedLuaRocksPath;;"
echo "LUA_PATH = ${LUA_PATH}"
echo "LUA_PATH_5_4 = ${LUA_PATH_5_4}
# outpus:
# LUA_PATH = version51path
# LUA_PATH_5_4 = version51path_5_4;appendedLuaRocksPath;;
# intended output should be
# LUA_PATH = version51path
# LUA_PATH_5_4 = version54path;appendedLuaRocksPath;; this output is because within the string The original code had frustrated me a bit initially because of bash's poor handling of variable expansion, but it was left because it worked and wasn't causing any issues, so long as oh and btw, incase for vk in 5.1= 5.2=_5_2 5.3=_5_3 5.4=_5_4
do
v="${vk%=*}"
k="${vk#*=}"
done EDIT:
This is the case because the environment variables are read once, so the changes to the Environment files will only be noticed on resourcing them, while deletions will only be noticed on a system reboot. EDIT2: the |
I would suggest something simple with no funky half supported magic, like the following. should be easy to follow and easy to maintain. its not fully featured but it should work. gen_luarocks_path ()
{
local version="$1"
local luarocks_path="\
${goboSystem}/Aliens/LuaRocks/share/lua/${version}/?.lua;\
${goboSystem}/Aliens/LuaRocks/share/lua/${version}/?/init.lua;\
${goboSystem}/Aliens/LuaRocks/lib/lua/${version}/?.lua;\
${goboSystem}/Aliens/LuaRocks/lib/lua/${version}/?/init.lua"
echo "${luarocks_path}"
}
gen_luarocks_cpath ()
{
local version="$1"
local luarocks_cpath="\
${goboSystem}/Aliens/LuaRocks/lib/lua/${version}/?.so;\
${goboSystem}/Aliens/LuaRocks/lib/lua/${version}/loadall.so"
echo "${luarocks_cpath}"
}
export LUA_PATH="${LUA_PATH};$(gen_luarocks_path 5.1)"
export LUA_PATH_5_2="${LUA_PATH_5_2};$(gen_luarocks_path 5.2)"
export LUA_PATH_5_3="${LUA_PATH_5_3};$(gen_luarocks_path 5.3)"
export LUA_PATH_5_4="${LUA_PATH_5_4};$(gen_luarocks_path 5.4)"
export LUA_CPATH="${LUA_CPATH};$(gen_luarocks_cpath 5.1)"
export LUA_CPATH_5_2="${LUA_CPATH_5_2};$(gen_luarocks_cpath 5.2)"
export LUA_CPATH_5_3="${LUA_CPATH_5_3};$(gen_luarocks_cpath 5.3)"
export LUA_CPATH_5_4="${LUA_CPATH_5_4};$(gen_luarocks_cpath 5.4)" |
Today I've updated from Lua v5.3.5 to v5.4.2 which is in the repos.
Unfortunately it seems, that update crashes the Xserver, or more specifically AwesomeWM.
This is the X crash message:
The text was updated successfully, but these errors were encountered: