[tlbuild] Fixes for LuaJIT on OpenBSD/clang

Mojca Miklavec mojca.miklavec.lists at gmail.com
Fri Jan 11 17:59:21 CET 2019


On Fri, 11 Jan 2019 at 17:46, luigi scarso <luigi.scarso at gmail.com> wrote:
>
>
>
> On Fri, Jan 11, 2019 at 5:34 PM Mojca Miklavec <mojca.miklavec.lists at gmail.com> wrote:
>>
>> Dear Luigi,
>>
>> On Fri, 11 Jan 2019 at 17:20, luigi scarso wrote:
>> > On Fri, Jan 11, 2019 at 5:12 PM Mojca Miklavec wrote:
>> >> On Fri, 11 Jan 2019 at 03:12, Karl Berry wrote:
>> >> >
>> >> >             LIBLUAJIT_LDEXTRA="$jitlibs"
>> >> >
>> >> > Mojca, I installed your test in Build/source/m4/kpse-luajit-flags.m4,
>> >> > inside a new case for $build_os ~ openbsd*, except for the above line,
>> >> > which I changed to
>> >> >    LUAJIT_LIBS="$LUAJIT_LIBS $jitlibs"
>> >> >
>> >> > I'm never sure of anything, but as far as I can see LIBLUAJIT_LDEXTRA is
>> >> > not used; KPSE_LUAJIT_DEFINES sets up LUAJIT_LDEXTRA (no LIB), but those
>> >> > are flags that would normally appear at the beginning of the load line,
>> >> > whereas I think we want these libs to be after the -ltexluajit.
>> >> >
>> >> > I have no feasible way to test. Let me know if changes are necessary.
>> >>
>> >> Thanks a lot for the patch.
>> >
>> > I know that patch, but here you seem to prefer the autotools way
>> > https://github.com/LuaJIT/LuaJIT/issues/453
>>
>> I'm slightly confused as to what refers to what here.
>>
>
> """
> Thank you,
>
> gmake CC=clang LDFLAGS="-lc++abi -lpthread"
> indeed works. (It would be great if it worked out of the box, but this is still a lot better than nothing.)
> """
> autotool => out of the book

Except that upstream doesn't use autotools, so they cannot fix it for
autotools themselves. There are other ways to fix the issue in a
regular Makefile, but they already do some strange magic.

I assume that the upstream fix and TeX Live fix will have to be
separate in any case.

> The issue is that clang (default compiler in openbsd) needs that LDFLAGS for luajit, gcc no.
> I know that LIBLUAJIT_LDEXTRA  can used because I have  done it on my local openbsd VM

Setting LIBLUAJIT_LDEXTRA worked for me as well.

>> (The comment on GitHub helped us figure out which flags
>> were needed, but didn't say how, when or where to apply them.)
>>
>> You applied one patch to LuaTeX (which doesn't work when the user
>> provides something else than "clang" to CC)
>
> I think we  dont share a fundamental point here:

Agreed :)

> I think we should provide  binaries.

And I think we should provide both.

> The source is of course  available for all those that want to adapt.

What do you mean by adapting?

We should strive to provide sources that work out of the box on as
many systems as reasonably doable (maybe not on Sun Studio on Solaris
9 etc.), as well as binaries for frequently used systems, of course.

Mojca


More information about the tlbuild mailing list