[Dev-luatex] build failure on arm

Mike Pall mikelu-0712 at mike.de
Thu Dec 20 15:59:58 CET 2007


Taco Hoekwater wrote:
> Norbert Preining reported that the latest luatex has compile problems
> on ARM. It seems to me that some of the automatic detections in
> lcoco.c go wrong. I had a quick look but I do not really understand
> any of it, so would you be so kind as to have a look and make a guess
> about the problem and a possible solution?

Looks like the glibc-ports guys stripped an important define. It
still works with uClibc. Can't blame them really, since we're
messing with internal structures.

Quick patch to lcoco.c (the final file, not the coco patch):

--- lcoco.c.orig	2007-12-20 15:47:54 +0100
+++ lcoco.c	2007-12-20 15:47:39 +0100
@@ -286,6 +286,9 @@
 #elif defined(__arm__) || defined(__ARM__)
 
 #if __GLIBC__ == 2 || defined(__UCLIBC__)	/* arm-linux-glibc2 */
+#ifndef __JMP_BUF_SP
+#define __JMP_BUF_SP	((sizeof(__jmp_buf)/sizeof(int))-2)
+#endif
 #define COCO_PATCHCTX(coco, buf, func, stack, a0) \
   buf->__jmpbuf[__JMP_BUF_SP+1] = (int)(func); /* pc */ \
   buf->__jmpbuf[__JMP_BUF_SP] = (int)(stack); /* sp */ \

It compiles now with headers from glibc-ports. I'm quite
confident that this runs ok, but can't test this right now
without setting up a complete ARM-glibc environment (eeek).

You might want to run the tests included with the Coco patchset
as part of the installation procedure to make sure the stack
switching works. Mainly cotest.lua, but also the other tests with
a lower number of threads/messages.

--Mike


More information about the dev-luatex mailing list