[NTG-context] Undefined symbol lua_gettop

Henri Menke henrimenke at gmail.com
Sun Apr 7 03:45:44 CEST 2019


On 4/7/19 6:02 AM, Aditya Mahajan wrote:
> Hi,
> 
> I am experimenting with using lua libraries with lmtx. I tried the
> following:
> 
> 1. Download the lcomplex library (from
> http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/ar/lcomplex-100.tar.gz)
> 
> 2. Untar and modify the Makefile so that LUA_TOPDIR points to the right
> location (/usr in my case).
> 
> 3. Run make. This creates a complex.so file in the current directory.
> 
> 4. Create a test file (and put complex.so in the same directory)
> 
> \starttext
> \startluacode
>   local complex=require("complex")
> 
>   z = complex.new(1,1);
>   context("The absolute value of $z=%f + j%f$ is $%f$",
>            z:real(), z:imag(), z:abs());
> \stopluacode
> \stoptext
> 
> This file runs correctly with mkiv, but when I try to run it with lmtx,
> I get the error
> 
> lua error       > lua error on line 8 in file
> /home/adityam/Software/lcomplex/lcomplex-100/test.tex:
> 
> ...etatex/texmf-context/tex/context/base/mkiv/l-package.lua:325: error
> loading module 'complex' from file './complex.so':
>         ./complex.so: undefined symbol: lua_gettop
> 
> Any idea why this is happening and what I can do to fix it?

Lua is linked statically into LuaTeX and when the executable is stripped
and lua_gettop has not been referenced anywhere, it will be removed.

> 
> Aditya
> ___________________________________________________________________________________
> 
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context at ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 



More information about the ntg-context mailing list