[luatex] Still having problems with loading an external lua library after upgrading to luatex 0.79.1

Mico Loretan mico.loretan at mac.com
Mon Apr 21 13:35:16 CEST 2014

Dear all,

In late February -- see http://tug.org/pipermail/luatex/2014-February/004768.html -- I posted a message to this group about not being able to run a program which tries to load an external Lua library named "bn" (short for "big numbers", I suppose; see http://www.tecgraf.puc-rio.br/~lhf/ftp/lua for the source code). Two months ago, I was using MacTeX2013 (luatex version 0.76), MacOSX 10.7.5, and Lua 5.2.3. 

Consider the following MWE (which is actually even simpler than the one I posted earlier):

    % !TEX TS-program = lualatex
    \directlua{ require "bn" }
    Hello World.

The error messages I was getting centered around "_luaL_checklstring not being found" in "bn.so". Most responders reported not being able to replicate the errors I was encountering. One person (Patrick G.) suggested that the problem could be related to the one reported in http://tracker.luatex.org/view.php?id=555, i.e., that it might be caused by a (missing) compilation flag. According to Hans Hagen's note dated 2013-12-20, this bug was "closed in 0.78".

Incidentally, to create the lua library file "bn.so", I tweaked the package's Makefile to set "MAKESO= $(CC) -bundle -undefined dynamic_lookup" rather than the default "MAKESO= $(CC) -shared". This is per the instructions provided at http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/install.html for compiling the library under MacOSX. I was able to compile it without problems.

In the meantime, I've upgraded my system to TeXLive2014 (pretest, luatex version 0.79.1), MacOSX 10.9.2, and Lua 5.3. Unfortunately, the problem I was encountering earlier is still there. Specifically, running the MWE above, I now get:

     This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4971)  (format=lualatex 2014.4.20)  21 APR 2014 13:13
    ! LuaTeX error error loading module 'bn' from file './bn.so':
    	dlopen(./bn.so, 6): Symbol not found: _luaL_checklstring
      Referenced from: ./bn.so
      Expected in: flat namespace
     in ./bn.so
    stack traceback:
    	[C]: in ?
    	[C]: in ?
    	[C]: in function 'require'
    	[\directlua]:1: in main chunk.
    l.3     \directlua{ require "bn" }

Given that I'm now running LuaTeX 0.91.1, the problem I continue to encounter would appear to be distinct from the one mentioned above. 

Is there a flag I need to set during the compilation of the "bn" library so as to assure that the symbol "_luaL_checklstring" is created/defined? Can anyone replicate this problem? Please advise.

Best, Mico


More information about the luatex mailing list