Dear Sirs Is there a way to call external lua modules inside luatex. In particular I would like to call gsl libray using a gsl-lua binding ( http://www.stefanom.org/devel/gsl-lua)/. I'm not talking about gsl-shell that needs luajit. I'm working in MacOSX with minimals. My LUAINPUTS are: LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//;/usr/local/lib/lua/5.2//", CLUAINPUTS = ".;$SELFAUTOLOC/lib/{context,luatex,}/lua//;/usr/local/lib/lua/5.2//",
ls /usr/local/lib/lua/5.2 GSLdefs2.lua alien_c.la alien_c.so gsl.lua
The GSL library is called using the Alien. If i try: \starttext \enabletrackers[resolvers.libraries] \startluacode print("LUAINPUTS",os.getenv("LUAINPUTS")) require("alien") ; \stopluacode \stoptext [...] resolvers > libraries > registered lua format path 32: /Applications/Context/tex/texmf-osx-64/scripts/context/lua/ resolvers > libraries > registered lua format path 33: /Applications/Context/tex/texmf/scripts/context/lua/ resolvers > libraries > registered lua format path 34: /usr/local/lib/lua/5.2 resolvers > libraries > lua format, checking 34 paths resolvers > libraries > lua format, identifying 'alien.lua' using format 'tex' resolvers > libraries > lua format, identifying 'alien.lua' using format 'lua' resolvers > libraries > locating, level '1', method 'lib variable format', name 'alien' resolvers > libraries > registered lib format path 1: . resolvers > libraries > registered lib format path 2: /Applications/Context/tex/texmf-osx-64/bin/lib/context/lua/ resolvers > libraries > registered lib format path 3: /Applications/Context/tex/texmf-osx-64/bin/lib/luatex/lua/ resolvers > libraries > registered lib format path 4: /Applications/Context/tex/texmf-osx-64/bin/lib/lua/ resolvers > libraries > registered lib format path 5: /usr/local/lib/lua/5.2 resolvers > libraries > lib format, checking 5 paths resolvers > libraries > lib format, identifying 'alien.so' using format 'lib' resolvers > libraries > locating, level '1', method 'lua extra list', name 'alien' resolvers > libraries > no extra lua paths defined resolvers > libraries > locating, level '1', method 'lib extra list', name 'alien' resolvers > libraries > no extra lib paths defined resolvers > libraries > locating, level '1', method 'path specification', name 'alien' resolvers > libraries > using builtin lua path 1: /usr/local/share/lua/5.2/?.lua resolvers > libraries > using builtin lua path 2: /usr/local/share/lua/5.2/?/init.lua resolvers > libraries > using builtin lua path 3: /usr/local/lib/lua/5.2/?.lua resolvers > libraries > using builtin lua path 4: /usr/local/lib/lua/5.2/?/init.lua resolvers > libraries > using builtin lua path 5: ./?.lua resolvers > libraries > found, level '1', method 'path specification', name 'alien' resolvers > libraries > locating, level '1', method 'already loaded', name 'alien_c' resolvers > libraries > locating, level '1', method 'preload table', name 'alien_c' resolvers > libraries > locating, level '1', method 'lua variable format', name 'alien_c' resolvers > libraries > lua format, checking 34 paths resolvers > libraries > lua format, identifying 'alien_c.lua' using format 'tex' resolvers > libraries > lua format, identifying 'alien_c.lua' using format 'lua' resolvers > libraries > locating, level '1', method 'lib variable format', name 'alien_c' resolvers > libraries > lib format, checking 5 paths resolvers > libraries > lib format, identifying 'alien_c.so' using format 'lib' resolvers > libraries > lib format, 'alien_c.so' found on '/usr/local/lib/lua/5.2/alien_c.so' resolvers > libraries > calling loadlib with '/usr/local/lib/lua/5.2/alien_c.so' with init 'luaopen_alien_c' resolvers > libraries > locating, level '1', method 'lua extra list', name 'alien_c' resolvers > libraries > locating, level '1', method 'lib extra list', name 'alien_c' resolvers > libraries > locating, level '1', method 'path specification', name 'alien_c' resolvers > libraries > locating, level '1', method 'cpath specification', name 'alien_c' resolvers > libraries > using builtin lib path 1: /usr/local/lib/lua/5.2/?.so resolvers > libraries > using builtin lib path 2: /usr/local/lib/lua/5.2/loadall.so resolvers > libraries > using builtin lib path 3: ./?.so ! LuaTeX error error loading module 'alien_c' from file '/usr/local/lib/lua/5.2/alien_c.so': dlopen(/usr/local/lib/lua/5.2/alien_c.so, 6): Symbol not found: _luaL_addlstring Referenced from: /usr/local/lib/lua/5.2/alien_c.so Expected in: flat namespace in /usr/local/lib/lua/5.2/alien_c.so stack traceback: [C]: in ? [C]: in function 'cpath specification' ...Context/tex/texmf-context/tex/context/base/l-package.lua:291: in function '?' ...Context/tex/texmf-context/tex/context/base/l-package.lua:318: in function <...Context/tex/texmf-context/tex/context/base/l-package.lua:310> [C]: in function 'savedrequire' .../Context/tex/texmf-context/tex/context/base/util-lib.lua:243: in function 'require' /usr/local/share/lua/5.2/alien.lua:3: in main chunk [C]: in function 'savedrequire' .../Context/tex/texmf-context/tex/context/base/util-lib.lua:243: in function 'require' [string "\directlua "]:5: in main chunk. [...] Thanks in advance Jorge