Closed rrthomas closed 5 years ago
Works for me with a fresh install of lua and luarock, then luarocks install lyaml
.
Do you have any more details of the failure? Can you build it from source (with luarocks make)? Does build-aux/luke —debug
shoe any useful diagnostics?
There is no luke rock on luarocks.org!
On 26 Oct 2017 19:15, "Gary V. Vaughan" notifications@github.com wrote:
Works for me with a fresh install of lua and luarock, then luarocks install lyaml.
Do you have any more details of the failure? Can you build it from source (with luarocks make)? Does build-aux/luke —debug shoe any useful diagnostics?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gvvaughan/lyaml/issues/22#issuecomment-339752952, or mute the thread https://github.com/notifications/unsubscribe-auth/AABD5lgj1ZCAtwzqT_9Bo5xnABRobV8cks5swMwogaJpZM4QHqZX .
There is no luke rock at all. It is a single minified file copied into build-aux and distributed inside the package just like a configure script.
I mean, I don’t understand why it is trying to look for a luke rock. There’s no dependency, and it makes no sense to download the thing to regenerate the minified source at build time... and I’m unable to provoke the error message you posted :-(
Didn't realise it was so weird. Will get full trace when back at desk.
On 26 Oct 2017 19:27, "Gary V. Vaughan" notifications@github.com wrote:
I mean, I don’t understand why it is trying to look for a luke rock. There’s no dependency, and it makes no sense to download the thing to regenerate the minified source at build time... and I’m unable to provoke the error message you posted :-(
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gvvaughan/lyaml/issues/22#issuecomment-339756541, or mute the thread https://github.com/notifications/unsubscribe-auth/AABD5oXJ_jOt1pLHDaNMNxsVWEBeeHWmks5swM8igaJpZM4QHqZX .
Lol. Okay, thanks. If you need to read the code, luke is in my github, and you can replace the minified script with a shim that invokes the readable source for intelligible line numbers and symbol names :-)
$ luarocks install lyaml
Installing https://luarocks.org/lyaml-6.1.3-1.src.rock
/home/rrt/.local/bin/x86_64-linux-gnu/lua5.3 build-aux/luke package="lyaml" version="6.1.3-1" PREFIX="/home/rrt/.local/lib/luarocks/rocks-5.3/lyaml/6.1.3-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/home/rrt/.local/bin/x86_64-linux-gnu/lua5.3" LUA_DIR="/home/rrt/.local/lib/luarocks/rocks-5.3/lyaml/6.1.3-1/lua" LUA_INCDIR="/home/rrt/.local/include/lua5.3" YAML_DIR="/usr" YAML_INCDIR="/usr/include" YAML_LIBDIR="/usr/lib/x86_64-linux-gnu"
/home/rrt/.local/bin/x86_64-linux-gnu/lua5.3: build-aux/luke:628: module 'luke' not found:No LuaRocks module found for luke
stack traceback:
[C]: in function 'require'
build-aux/luke:628: in main chunk
[C]: in ?
Error: Build error: Failed building.
OK, the fix is to unset my LUA_INIT
, which says:
LUA_INIT=@/home/rrt/.config/luarc
In turn, that file just says:
require "luarocks.loader"
As far as I'm aware, the only thing that should do is add the ability to find old versions of packages installed by LuaRocks. It's there on purpose so that programs can request a particular version of a module and have LuaRocks automagically load it.
Hmm. Maybe the minification process is interfering with that? It preloads all the modules l and relies on require fetching from the packages.preload before the other loaders. Does your LUA_INIT subvert that assumption?
It’s possibly a moot point though, because luke is a proof of concept for adding configure like host check facilities to luarocks itself - I just need to find time to reimplement the reader code for the enhanced syntax. That done, it’ll all go away and luarocks will do all the work without a separate luke invocation.
Well, my LUA_INIT
means (no more or less than) that all require
invocations are going to go through luarocks's own require code, so…
Finally, I've fixed this with release 6.2.4 by simply writing my own require implementation inside luke that only knows how to get modules from package.preload
.
Great, thanks!