Hi Taco! We have a build failure of luatex 0.20.1 on ARM when building the lua51 code: gcc -g -O2 -Wall -DLUA_USE_POSIX -c -o lcoco.o lcoco.c lcoco.c: In function 'lua_newcthread': lcoco.c:460: error: '__JMP_BUF_SP' undeclared (first use in this function) lcoco.c:460: error: (Each undeclared identifier is reported only once lcoco.c:460: error: for each function it appears in.) make[3]: *** [lcoco.o] Error 1
From the compile run: checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking host system type... armv5tel-unknown-linux-gnu checking target system type... armv5tel-unknown-linux-gnu checking build system type... armv5tel-unknown-linux-gnu checking for a BSD compatible install... (cached) /usr/bin/install -c [...] OpenBSD-Compat has been configured with the following options:
Host: armv5tel-unknown-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99
The full build log can be found at
http://buildd.debian.org/fetch.cgi?&pkg=luatex&ver=0.20.1-1&arch=arm&stamp=1197282661&file=log
Do you have any idea how that could be fixed?
Thanks a lot and all the best
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
Hi Mike, 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? I am including COCO 1.1.3 as-is, no patches whatsoever. Best wishes, Taco Norbert Preining wrote:
Hi Taco!
We have a build failure of luatex 0.20.1 on ARM when building the lua51 code: gcc -g -O2 -Wall -DLUA_USE_POSIX -c -o lcoco.o lcoco.c lcoco.c: In function 'lua_newcthread': lcoco.c:460: error: '__JMP_BUF_SP' undeclared (first use in this function) lcoco.c:460: error: (Each undeclared identifier is reported only once lcoco.c:460: error: for each function it appears in.) make[3]: *** [lcoco.o] Error 1
From the compile run: checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking host system type... armv5tel-unknown-linux-gnu checking target system type... armv5tel-unknown-linux-gnu checking build system type... armv5tel-unknown-linux-gnu checking for a BSD compatible install... (cached) /usr/bin/install -c [...] OpenBSD-Compat has been configured with the following options:
Host: armv5tel-unknown-linux-gnu Compiler: gcc Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99
The full build log can be found at http://buildd.debian.org/fetch.cgi?&pkg=luatex&ver=0.20.1-1&arch=arm&stamp=1197282661&file=log
Do you have any idea how that could be fixed?
Thanks a lot and all the best
Norbert
------------------------------------------------------------------------------- Dr. Norbert Preining
Vienna University of Technology Debian Developer Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------------- FLODIGARRY (n. Scots) An ankle-length gabardine or oilskin tarpaulin worn by deep-sea herring fishermen in Arbroath and publicans in Glasgow. --- Douglas Adams, The Meaning of Liff
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
Mike Pall wrote:
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):
Thank you very for this! Norbert, I have committed that patch to the luatex trunk, #971. I hope you can somehow contact the original reporter, I have no way of testing this myself. Best wishes to all, Taco
Hi Taco, hi Mike, first thanks for the quick response! On Do, 20 Dez 2007, Taco Hoekwater wrote:
Norbert, I have committed that patch to the luatex trunk, #971. I hope you can somehow contact the original reporter, I have no way of testing this myself.
I will upload luatex 0.20.2 together with this patch and we will see if
the Debian auto builders will succeed or not ;-)
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
Hi Taco, hi Mike, On Do, 20 Dez 2007, Taco Hoekwater wrote:
Norbert, I have committed that patch to the luatex trunk, #971. I hope you can somehow contact the original reporter, I have no way of testing this myself.
The new packages was build successfully on ARM now, see
http://buildd.debian.org/fetch.cgi?&pkg=luatex&ver=0.20.2-1&arch=arm&stamp=1198234726&file=log
Thanks a lot.
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining
participants (3)
-
Mike Pall
-
Norbert Preining
-
Taco Hoekwater