Discussion:
[tex-live] TL2018/LuaTeX/Mac "bug" (but also probably in all other distributions as well)
Patrick Gundlach
2018-03-08 09:36:00 UTC
Permalink
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,
http://tracker.luatex.org/view.php?id=555
------------------------------------
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)
Mojca Miklavec
2018-03-08 09:41:11 UTC
Permalink
Post by Patrick Gundlach
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?)
In the long run it would make sense to fix
source/aclocal.m4
or so.

I now use
export STRIP="strip -u -r"
but that's super easy to forget.

Mojca
Patrick Gundlach
2018-03-26 09:44:58 UTC
Permalink
Hello all,

I have just updated the tl2018 pretest. This bug is still present. I am not sure if the update process has not fixed this or this is still present upstream.

I have rsynced tlprest and then run in the tlpretest directory

tlmgr --repository $PWD update --all

Shouldn't this fix the luatex binary?


Patrick
Post by Patrick Gundlach
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
dlopen(./luasql/sqlite3.so, 6): Symbol not found: _luaL_argerror
Referenced from: ./luasql/sqlite3.so
Expected in: flat namespace
in ./luasql/sqlite3.so
[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.
...
---------------------------
\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([[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,
http://tracker.luatex.org/view.php?id=555
------------------------------------
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)
Mojca Miklavec
2018-03-26 12:12:35 UTC
Permalink
Post by Patrick Gundlach
Hello all,
I have just updated the tl2018 pretest. This bug is still present. I am not sure if the update process has not fixed this or this is still present upstream.
I'm not aware of anyone attempting to fix
source/aclocal.m4
so far. If you contribute the patch for that, this will be the best
and most lost-term future-proof solution :)
Post by Patrick Gundlach
I have rsynced tlprest and then run in the tlpretest directory
tlmgr --repository $PWD update --all
Shouldn't this fix the luatex binary?
Patrick
Only if Dick uses
export STRIP="strip -u -r"
when he builds the binaries.

Since you are in the testing mode right now: can you please do me a
favour and test the luatex binary from x86_64-darwinlegacy to confirm
whether that one works as expected? (You can get it in the subversion
repository of texlive or on the tlpretest repository, but it needs to
be extracted manually or you would need to install an additional
platform.)

Thank you,
Mojca
Post by Patrick Gundlach
Post by Patrick Gundlach
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
dlopen(./luasql/sqlite3.so, 6): Symbol not found: _luaL_argerror
Referenced from: ./luasql/sqlite3.so
Expected in: flat namespace
in ./luasql/sqlite3.so
[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.
...
---------------------------
\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([[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,
http://tracker.luatex.org/view.php?id=555
------------------------------------
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)
Patrick Gundlach
2018-03-26 12:26:48 UTC
Permalink
Post by Mojca Miklavec
Since you are in the testing mode right now: can you please do me a
favour and test the luatex binary from x86_64-darwinlegacy to confirm
whether that one works as expected?
yes, the darwinlegacy package is perfect!

I am running the latest macOS version (High Sierra, 10.13.3)

Patrick
Mojca Miklavec
2018-03-26 12:34:26 UTC
Permalink
Post by Patrick Gundlach
Post by Mojca Miklavec
Since you are in the testing mode right now: can you please do me a
favour and test the luatex binary from x86_64-darwinlegacy to confirm
whether that one works as expected?
yes, the darwinlegacy package is perfect!
Thanks for confirmation.

In the short term it's probably easiest if Dick defines STRIP and
uploads new binaries. In the (not so) long term the sources should be
fixed.

Mojca
Richard Koch
2018-03-26 13:57:07 UTC
Permalink
Mojca,

The bad news is that I DO use

export STRIP="strip -u -r"

when I compile the MacTeX binaries.

These binaries are then uploaded by Karl to svn, and later used to construct both BasicTeX
and MacTeX.

Dick Koch
Post by Mojca Miklavec
Post by Patrick Gundlach
Post by Mojca Miklavec
Since you are in the testing mode right now: can you please do me a
favour and test the luatex binary from x86_64-darwinlegacy to confirm
whether that one works as expected?
yes, the darwinlegacy package is perfect!
Thanks for confirmation.
In the short term it's probably easiest if Dick defines STRIP and
uploads new binaries. In the (not so) long term the sources should be
fixed.
Mojca
Patrick Gundlach
2018-03-27 07:13:35 UTC
Permalink
Post by Richard Koch
The bad news is that I DO use
export STRIP="strip -u -r"
when I compile the MacTeX binaries.
These binaries are then uploaded by Karl to svn, and later used to construct both BasicTeX
and MacTeX.
so what can we do now?

Patrick
Patrick Gundlach
2018-04-06 09:33:07 UTC
Permalink
Now that I've heard that tl2018 will go into freeze. Is this bug fixed yet?

Does it make sense to try again?

Regards,

Patrick
Post by Patrick Gundlach
Post by Richard Koch
The bad news is that I DO use
export STRIP="strip -u -r"
when I compile the MacTeX binaries.
These binaries are then uploaded by Karl to svn, and later used to construct both BasicTeX
and MacTeX.
so what can we do now?
Patrick
Patrick Gundlach
2018-04-06 13:55:46 UTC
Permalink
Post by Patrick Gundlach
Now that I've heard that tl2018 will go into freeze. Is this bug fixed yet?
Does it make sense to try again?
yes, and yes.

The bug is fixed (thank you!) and hopefully also for the 2019 TL.

Thank you very much!

Patrick

Richard Koch
2018-03-27 19:02:59 UTC
Permalink
Patrick and Mojca,

Let's confirm that I'm compiling in the correct way. I don't retype commands; instead I have a script and copy lines from this script. Thus I can explain exactly how I build TeX Live:

cd
cd texlive2018dev/source
STRIP="strip -u -r" .
/Build --enable-xindy CLISP=/Users/koch/clisp/clisp-build/clisp

If this what you expect should work, or not quite right?

Dick Koch
Richard Koch
2018-03-27 23:17:10 UTC
Permalink
Patrick,

I need a complete example to test lua on TeXLive-2018. I recovered your example file "test.tex" from an earlier item in this chain. It requires "luasql.sqlite3" so I downloaded sqlite3.so and put it in a subdirectory
luasql inside the folder with test.tex. After that, the example typesets until it reports

LuaSQL: no such table: people

Indeed, here is the current full log:

This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(./test.tex
LaTeX2e <2017-04-15>
(using write cache: /Users/koch/Library/texlive/2018/texmf-var/luatex-cache/gen
eric)(using read cache: /usr/local/texlive/2018/texmf-var/luatex-cache/generic
/Users/koch/Library/texlive/2018/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.111 seconds
Babel <3.18> and hyphenation patterns for 1 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo(load luc: /Users/
koch/Library/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-re
gular.luc)))
(/usr/local/texlive/2018/texmf-dist/tex/lualatex/luacode/luacode.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/luatex/ctablestack/ctablestack.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/booktabs/booktabs.sty)
(./test.aux)[\directlua]:10: LuaSQL: no such table: people
stack traceback:
[C]: in function 'assert'
[\directlua]:10: in main chunk.
\***@dbg@exec ***@maybe@printdbg {#1} #1 }

l.34 \end{luacode*}


?
Process aborted


Can you get me from here to a complete example that should work if luatex is working
correctly?

Dick Koch
Richard Koch
2018-03-27 23:50:58 UTC
Permalink
I found an example from last year due to Patrick. Unfortunately, this requires me to compile a library on a machine with homebrew and extra lua libraries. Last year, Patrick actually provided the library to us for free:

"(the lib.so is available at
http://download.speedata.de/private/lib.so
with a MD5 of 9ce2444145108511b2f678b4d22bd777)
*

but this no longer exists.

Maybe Patrick could make it exist again.

Dick Koch
Richard Koch
2018-03-28 21:21:06 UTC
Permalink
Folks,

I tried my best to make other people do my work for me. But no takers.

So just now, I did a careful search of the computer used last year to construct MacTeX-2017 and found the example of lualatex calling a library lib.so and getting a string "Hello world."

Last year's example runs correctly on the lualatex in my TeX Live 2018. But that is not a surprise because I compiled TeX Live again yesterday using the command

extern STRIP="strip -u -r"
./Build --enable-xindy CLISP=/Users/koch/clisp/clisp-build/clisp

Moreover, I looked carefully at the build instructions used to make MacTeX-2017, and the word "extern" is there.
But somehow this word didn't make it to MacTeX-2018. It is missing in several different places. I'll fix this before bed.

------------------

None of this has been contributed to Karl, but immediately after writing this note, I'll do that. Therefore, if we are lucky, tomorrow's update for the Mac will update luatex and fix this bug. If we are not lucky, that will happen on Friday.

Thanks to Mojca and Patrick for pushing.

Dick Koch
Richard Koch
2018-03-28 21:24:38 UTC
Permalink
In the previous message, "extern" should, of course, be "export". The evil Gods are standing over my shoulder, and they saw one last chance.

Dick
Loading...