[luatex] Dynamic loading on Mac OS X

Patrick Gundlach patrick at gundla.ch
Mon Dec 7 13:32:23 CET 2009


I want to try out the (experimental) dynamic library loading on MacOS X with luaexpat (http://www.keplerproject.org/luaexpat/). This is what I do:

* compile luaexpat to get a lxp.so.1.1.0, I create a link to lxp.so
* compile luatex, put the executable into current dir with the name texlua
* create this file under "foo.lua": "require("lxp")"
* run texlua: ./texlua foo.lua

I get this error:

error loading module 'lxp' from file './lxp.so':
	dlopen(./lxp.so, 2): Symbol not found: _luaL_addlstring
  Referenced from: /Users/patrick/tmp/expattest/lxp.so
  Expected in: dynamic lookup

I have no idea where the problem is. On the user's side? On Lua(TeX)'s side? Does anybody have an idea where to start looking?

$ ./texlua --version
This is LuaTeX, Version beta-0.47.0-2009120622

But: running 

$ lua foo.lua  <--- not texlua
LuaExpat 1.1.0

where foo.lua is the same as above, just added: print(lxp._VERSION) gives me the version number and no error. libexpat is in /usr/lib/libexpat.*.dylib


More information about the luatex mailing list