[tex-live] TL2018/LuaTeX/Mac "bug" (but also probably in all other distributions as well)
Patrick Gundlach
patrick at gundla.ch
Thu Mar 8 10:36:00 CET 2018
Hello again,
in tl2018 (pretest) we have the same bug as last year. Would it be possible to fix it once and for all? (or should I setup a cron job?)
$ type lualatex
lualatex is hashed (/opt/texlive2018/bin/x86_64-darwin/lualatex)
~/TeX/luatex/test$ lualatex test
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(./test.tex
LaTeX2e <2017-04-15>
...
(/opt/texlive2018/texmf-dist/tex/latex/booktabs/booktabs.sty) (./test.aux)error
loading module 'luasql.sqlite3' from file './luasql/sqlite3.so':
dlopen(./luasql/sqlite3.so, 6): Symbol not found: _luaL_argerror
Referenced from: ./luasql/sqlite3.so
Expected in: flat namespace
in ./luasql/sqlite3.so
stack traceback:
[C]: in ?
[C]: in function 'cpath specification'
...ve2018/texmf-dist/tex/luatex/lualibs/lualibs-package.lua:291: in function '
?'
...ve2018/texmf-dist/tex/luatex/lualibs/lualibs-package.lua:318: in function <
...ve2018/texmf-dist/tex/luatex/lualibs/lualibs-package.lua:310>
[C]: in function 'require'
[\directlua]:4: in main chunk.
...
where test.tex is:
---------------------------
\documentclass{article}
\usepackage{luacode,booktabs}
\begin{document}
\begin{luacode*}
luasql = require("luasql.sqlite3")
env = assert (luasql.sqlite3())
-- connect to data source
con = assert (env:connect("luasql-test"))
-- retrieve a cursor
cur = assert (con:execute"SELECT name, email from people")
-- print all rows, the rows will be indexed by field names
row = cur:fetch ({}, "a")
tex.sprint([[\begin{tabular}{@{}ll@{}}\toprule]])
tex.sprint([[Name & email \\\midrule]])
while row do
tex.sprint(-2,row.name)
tex.sprint("&")
tex.sprint(-2, row.email)
tex.sprint("\\\\")
-- reusing the table of results
row = cur:fetch (row, "a")
end
tex.sprint([[\bottomrule\end{tabular}]])
-- close everything
cur:close()
con:close()
env:close()
\end{luacode*}
\end{document}
---------------------------
and sqlite3.so is from homebrew (put online at https://download.speedata.de/private/sqlite3.so)
Patrick
> Hi all,
>
> I've tried to link an external library to LuaTeX, but this gives an error. This problem is an old problem described here:
>
> http://tracker.luatex.org/view.php?id=555
>
> I quote from the page:
>
> ------------------------------------
> When building LuaTeX without --nostrip (which is the current default behaviour), loading external libraries is a game of luck. For example the sqlite3 bindings from http://luaforge.net/projects/luasqlite/ [^] create a library on OS X that require the symbol _luaL_argerror to be defined in the LuaTeX binary:
>
> error loading module 'lsqlite3' from file './lsqlite3.so':
> dlopen(./lsqlite3.so, 2): Symbol not found: _luaL_argerror
> Referenced from: /Users/patrick/Downloads/lsqlite3-7/lsqlite3.so
> Expected in: flat namespace
> in /Users/patrick/Downloads/lsqlite3-7/lsqlite3.so
>
> Building LuaTeX with --nostrip solves this issue.
>
> By having "--strip" the default in build.sh, it is not possible for any user (on OS X, perhaps also on other platforms) to use this (and other) external library without downloading the LuaTeX source, download XCode, compile LuaTeX and put LuaTeX in the correct place.
> ------------------------------------
>
> Patrick
>
> (who is not subscribed to the tex-live list)
More information about the tex-live
mailing list