[tlbuild] Building on Macintosh

Richard Koch koch at math.uoregon.edu
Sun Mar 31 05:12:17 CEST 2013


Folks,

After successfully building everything on Snow Leopard for 64 bits,
Leopard Intel for 32 bit intel, and Leopard PPC for 32 bit powerpc,
we discovered two days ago that chtex fails tests on the 32 bit machines.
Mojca Miklavec helped debug and contacted the current maintainer,
Ivan Andrus. Ivan found the bug and produced a patch. The patch
is not yet in the svn, but I made the patch by hand and recompiled
everything. ChkTeX now passes all tests.

Here is Ivan's message:

---------
I found the problem.  When using MATCH.rm_eo - MATCH.rm_so on line 921 of FindErrs.c, it's a regoff_t which is 8 bytes.  However, the format expects an integer which is 4 bytes on a 32 bit system.  Thus only half of the bytes are used and the next 4 (which are zero) are used as a char* and therefore it prints "(null)".    So casting it to an int fixes the problem.  There won't be overflow problems since our lines are much shorter than a 32 bit integer can hold anyway.

I will scrub the rest of the code and make a new release.  I don't know how soon you guys need a fix, so I don't know whether you just want to add another patch or if you would like to work with a new release.  I'm okay either way.  I should be able to make the release today or tomorrow if you guys want it.  Otherwise, I might wait a few days.  A new release should also have all of the other patches applied.

-Ivan

Index: FindErrs.c
===================================================================
--- FindErrs.c	(revision 242)
+++ FindErrs.c	(working copy)
@@ -918,7 +918,7 @@
                        /* Default -- show the match */
                        PSERR2(offset + MATCH.rm_so, MATCH.rm_eo - MATCH.rm_so,
                               emUserWarnRegex,
-                               MATCH.rm_eo - MATCH.rm_so,
+                               (int)(MATCH.rm_eo - MATCH.rm_so),
                               TmpBuffer + offset + MATCH.rm_so);
                    }
                    offset += MATCH.rm_eo;
---------


SADLY, this new build reveals a new problem on the 32 bit machines. Both
Intel and PowerPC now fail the ttfdymp test with various core dumps. Below is the
test log. 

I have lost a good deal of enthusiasm for debugging these 32 bit problems.
I wrote the current contact,

	ollie at ms1.hinet.net

I have formed a suspicion that programmers are more and more working with
64 bit machines.

.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-suite.log.ttfdump.i386.log
Type: application/octet-stream
Size: 1224 bytes
Desc: not available
URL: <http://tug.org/pipermail/tlbuild/attachments/20130330/642ee6ab/attachment.obj>
-------------- next part --------------


Dick Koch



More information about the tlbuild mailing list