luaexpat would appear to be part of the Kepler project, similar to some existing LuaTeX modules. My first naive attempts to drop luaexpat into the LuaTeX tree were not overly successful. It is not quite clear to me what parts of the build structure (from Kepler and/or Luaforge?) are actually being used in the existing library modules of LuaTeX. Could someone give a brief summary what files I would be expected to change in order to drop this into the tree? Thanks, -- David Kastrup
David Kastrup wrote:
luaexpat would appear to be part of the Kepler project, similar to some existing LuaTeX modules. My first naive attempts to drop luaexpat into the LuaTeX tree were not overly successful. It is not quite clear to me what parts of the build structure (from Kepler and/or Luaforge?) are actually being used in the existing library modules of LuaTeX.
Could someone give a brief summary what files I would be expected to change in order to drop this into the tree?
The build process of the module has to build a static version of the module (or just a set of .o files); then luatexlib.mk needs extra variable entries for calling that build process and linking its results into the binary; then in lua/luastuff.c you have to add the appropriate C function call to the luainterpreter() function. Cross your fingers and run build.sh. Best wishes, Taco
Taco Hoekwater
David Kastrup wrote:
luaexpat would appear to be part of the Kepler project, similar to some existing LuaTeX modules. My first naive attempts to drop luaexpat into the LuaTeX tree were not overly successful. It is not quite clear to me what parts of the build structure (from Kepler and/or Luaforge?) are actually being used in the existing library modules of LuaTeX.
Could someone give a brief summary what files I would be expected to change in order to drop this into the tree?
The build process of the module has to build a static version of the module (or just a set of .o files); then luatexlib.mk needs extra variable entries for calling that build process and linking its results into the binary; then in lua/luastuff.c you have to add the appropriate C function call to the luainterpreter() function.
Cross your fingers and run build.sh.
Thanks, I'll likely give this a whirl tomorrow. -- David Kastrup
Taco Hoekwater
David Kastrup wrote:
luaexpat would appear to be part of the Kepler project, similar to some existing LuaTeX modules. My first naive attempts to drop luaexpat into the LuaTeX tree were not overly successful. It is not quite clear to me what parts of the build structure (from Kepler and/or Luaforge?) are actually being used in the existing library modules of LuaTeX.
Could someone give a brief summary what files I would be expected to change in order to drop this into the tree?
The build process of the module has to build a static version of the module (or just a set of .o files); then luatexlib.mk needs extra variable entries for calling that build process and linking its results into the binary; then in lua/luastuff.c you have to add the appropriate C function call to the luainterpreter() function.
Cross your fingers and run build.sh.
Ok, crossed my fingers and got the stuff to compile finally. I can send the diff. Does anybody have a quick clue what might cause the following on startup: PANIC: unprotected error in call to Lua API (attempt to index a function value) -- David Kastrup
David Kastrup
Ok, crossed my fingers and got the stuff to compile finally. I can send the diff. Does anybody have a quick clue what might cause the following on startup:
PANIC: unprotected error in call to Lua API (attempt to index a function value)
Uh, don't bother right now. Looked at the diffs again and it would seem I clobbered the stack with some incompletely copied initialization code. Sorry for the noise. I'll report back once I get something more relevant. -- David Kastrup
David Kastrup wrote:
Ok, crossed my fingers and got the stuff to compile finally. I can send the diff. Does anybody have a quick clue what might cause the following on startup:
PANIC: unprotected error in call to Lua API (attempt to index a function value)
You probably have an error in the setup for opening luaexpat in luastuff.c. Some lua modules define a luaopen_XXX function that can be called directly, others need a lua_pushcfunction and lua_call, this has to do with require() vs. dofile(). Best wishes, Taco
Taco Hoekwater
David Kastrup wrote:
Ok, crossed my fingers and got the stuff to compile finally. I can send the diff. Does anybody have a quick clue what might cause the following on startup:
PANIC: unprotected error in call to Lua API (attempt to index a function value)
You probably have an error in the setup for opening luaexpat in luastuff.c. Some lua modules define a luaopen_XXX function that can be called directly, others need a lua_pushcfunction and lua_call, this has to do with require() vs. dofile().
The following appears to do the trick. At least lxp is known and LuaTeX runs again. No actually functionality tests yet. -- David Kastrup
participants (2)
-
David Kastrup
-
Taco Hoekwater