Hello luatex team,
I'm sure you will be delighted to know that luatex compiles fine on
Intel-based Macs (MacBook with Intel Core Duo processor running MacOS
10.4 Tiger), but for two culprits (I used the latest SVN trunk, version
159 committed this afternoon; with the snapshot from late October there
was one more error).
The first one is really ridiculous: there are two places where a
Makefile uses the '-a' switch to cp, which appears not to be legal on
Darwin; and even though it should be easy to fix for any person wanting
to build luatex on such a machine (in my case I simply installed the GNU
coreutils), I think it's advisable to replace it with an equivalent (the
manpage for GNU cp mentions -a is simply a shorthand for -dpR, but then
-d isn't recognized by Darwin's cp either so I don't know what to
recommand). The two occurrences are found in
src/texk/web2c/luatexdir/luatexlib.mk, lines 127 and 137, respectively. I
don't think it is necessary to send a patch for such a small change; it's
only a matter of replacing the offending switch with an appropriate set
of options in two places.
The other one is more worrying; it's also a portability issue, this
time in the linking phase: apparently the native linker doesn't know
about the -E switch (which for GNU ld is an equivalent for
--export-dynamic, so it has nothing to do with gcc's -E). I know nothing
of linkers and of binary formats, so I decided to simply drop that option
(which is only used in the very last phase, when linking luatex
together), and it worked... but when it will come to distribute luatex
you may well want to find a real solution. This option is used in
src/texk/web2c/luatexdir/luatex.mk, at line 32 as I speak.
Finally, at the same moment, the linker complained about multiple
definitions of the symbol _scandir (in /usr/lib/libm.dylib --that is the
system's libm-- and luatex0.o), but again, I decided not to bother.
Anyway, the binary worked as expected, as far as I could tell: it was
able to produce a plain format (I didn't try with latex.ltx); it could
output PDF or DVI as desired; and the new primitives were there, although
in this latter case I wasn't sure about what to test.
Yours,
Arthur