Finding LuaGlobal.lua when compiling from source

Post Reply
syrenson
Posts: 1
Joined: Sat Sep 03, 2016 4:51 pm

Finding LuaGlobal.lua when compiling from source

Post by syrenson »

Greetings All,

I am compiling Mudlet version 3.0.1-dev from source on Ubuntu 14.04 using the following instructions:

http://wiki.mudlet.org/w/Compiling_Mudlet

After installing several missing dev packages, I was able to get the source to compile without error. When I run the Mudlet executable, however, I receive the following errors:

[ OK ] - Lua module rex_pcre loaded.
[ OK ] - Lua module zip loaded.
[ OK ] - Lua module lfs loaded
[ OK ] - Lua module sqlite3 loaded
[ ERROR ] - LuaGlobal.lua compile error - please report!
Error from Lua: cannot open /usr/local/share/mudlet/lua/LuaGlobal.lua: No such file or
directory

The issue is not that the file is actually missing, but that it is simply not located in the directory in which the executable is searching. Specifically, the file is located at ~/mudlet/src/mudlet-lua/lua, as I built the source locally. My first thought was to simply make a symbolic link to the file's true location and place it in /usr/local/mudlet/lua/, but this results in a slew of additional run-time errors:

Error attempting to load file: StringUtils.lua: cannot open /usr/local/share/mudlet/lua/StringUtils.
lua: No such file or directory
Error attempting to load file: TableUtils.lua: cannot open /usr/local/share/mudlet/lua/TableUtils.
lua: No such file or directory
Error attempting to load file: DebugTools.lua: cannot open /usr/local/share/mudlet/lua/DebugTools.
lua: No such file or directory
Error attempting to load file: DB.lua: cannot open /usr/local/share/mudlet/lua/DB.lua: No such file
or directory
Error attempting to load file: geyser/Geyser.lua: cannot open
/usr/local/share/mudlet/lua/geyser/Geyser.lua: No such file or directory
Error attempting to load file: geyser/GeyserGeyser.lua: cannot open
/usr/local/share/mudlet/lua/geyser/GeyserGeyser.lua: No such file or directory
Error attempting to load file: geyser/GeyserUtil.lua: cannot open

....

And the errors just go on and on. Deleting the symbolic link results in me simply getting the original error regarding LuaGlobal.lua.

I'm stumped at this point so any assistance that could be provided with eliminating this error would be greatly appreciated.

Thank you for your time!

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Finding LuaGlobal.lua when compiling from source

Post by SlySven »

We never concluded how to get the shared, read-only access needed lua files placed in the right place on all OS systems, however I suspect the person who packages it for Ubuntu has patched the code to get the files from the "proper" place IMHO on a *nix system - all you need to do is copy the files from in the ./src/mudlet-lua/lua directory to the /usr/local/share/mudlet/lua/ one (creating it if needed) and the same for the files in ./src/mudlet-lua/lua/geyser to the /usr/local/share/mudlet/lua/geyser/ directory.

Note that you do NOT want/need the 68KBytes file locate at ./src/luaGlobal.lua (that is an ancient artefact that should have been nuked but nobody has done so yet) but you do need the same named file at ./src/mudlet-lua/lua/luaGlobal.lua which is around 4.7KBytes. In fact the latter file is the one that loads ALL the others...

It might work as it is if you run the mudlet executable from within the ~/mudlet/src directory (or a parallel, out-of-source build directory such as ~/mudlet/build) - as you are nearly there as mudlet HAS found the right luaGlobal.lua file because it has read that okay and is trying to load the other needed files that is it job to do! ;)

P.S. In
... My first thought was to simply make a symbolic link to the file's true location and place it in /usr/local/mudlet/lua/ ...
Did you mean "/usr/local/mudlet/lua/" or "/usr/local/share/mudlet/lua/"? The first is not the right one!

Post Reply