[luatex] Using a Lua C .so module with LuaLaTeX

Deepak Jois deepak.jois at gmail.com
Sun Nov 15 10:32:15 CET 2015

I am trying to get a basic Lua C .so module working with LuaLaTeX. I
have all the pieces in place here. I am able to run the library using
my local Lua interpreter just fine. But when I try to load it inside
LuaLaTex, I get the error as shown below.

My environment: Mac OS X, TeXLive 2015 and Lua 5.2.4.

The minimal code example is here:

What am I doing wrong?

Error Details:
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
 restricted \write18 enabled.
LaTeX2e <2015/01/01>
! LuaTeX error error loading module 'harfbuzz' from file './harfbuzz.so':
        dlopen(./harfbuzz.so, 6): Symbol not found: _luaL_setfuncs
  Referenced from: ./harfbuzz.so
  Expected in: flat namespace
 in ./harfbuzz.so
stack traceback:
        [C]: in ?
        [C]: in ?
        [C]: in function 'require'
        ./luaharfbuzz.lua:2: in main chunk
        [C]: in function 'require'
        [\directlua]:1: in main chunk.
\luacode at dbg@exec ...code at maybe@printdbg {#1} #1 }

l.6 \end{luacode*}


More information about the luatex mailing list