Apache OpenOffice (AOO) Bugzilla – Issue 47137
[PATCH] Increase MAXLINELENGTH on Win32
Last modified: 2013-08-07 15:34:52 UTC
The current dmake in cws_src680_dmake43p01 doesn't quite build the perl module ExtUtils-MakeMaker-6.27 out-of-the-box on Win32. Running "dmake" produces the error: dmake: makefile: line 317: Error -- Expecting macro or rule defn, found neither Line 317 is the blank line after the definition of the PM_TO_BLIB macro, which is rather long. (See the Makefile in the following attachment.) I believe the problem is that this macro definition has exceeded dmake's MAXLINELENGTH value (2046) because the following patch, which increases MAXLINELENGTH to 8190, makes the error go away for me: diff -ruN dmake.orig/win95/microsft/ruletab.c dmake/win95/microsft/ruletab.c --- dmake.orig/win95/microsft/ruletab.c 2005-04-09 22:22:36.000000000 +0100 +++ dmake/win95/microsft/ruletab.c 2005-04-11 10:17:36.645496800 +0100 @@ -32,7 +32,7 @@ #include <stdio.h> static char *_rules[] = { - "MAXLINELENGTH := 2046", + "MAXLINELENGTH := 8190", "MAXPROCESSLIMIT := 4", "MAXPROCESS := 1", ".IMPORT .IGNORE: DMAKEROOT", End of Patch. The following files also contain definitions of MAXLINELENGTH, with various values in use (indicated in parentheses): dmake/imacs.c (1024) dmake/mac/ruletab.c (4094) dmake/msdos/ruletab.c (2046) dmake/os2/ruletab.c (2046) dmake/qssl/ruletab.c (8190) dmake/tos/ruletab.c (8190) dmake/unix/ruletab.c (8190) dmake/win95/borland/ruletab.c (2046) dmake/win95/microsft/ruletab.c (2046) dmake/winnt/borland/ruletab.c (2046) dmake/winnt/microsft/ruletab.c (2046) It may make sense to make all these values 8190, but I'll leave that up to you to decide.
Created attachment 24911 [details] Testcase referred to in description above.
You should assign the issues to me directly. hjs is very busy these days. ;) > dmake: makefile: line 317: Error -- Expecting macro or rule defn, > found neither This is definitely a bug, following your explanation dmake should report something like this (from getinp.c, but recipe section): Fatal( "Input line too long, increase MAXLINELENGTH" ); The OOo build solved this problem by putting MAXLINELENGTH = 65530 into startup.mk. This should also solve your problem. > dmake/imacs.c (1024) This sets the default, but the ruletab.c settings override this immediately. The nice thing about having MAXLINELENGTH defined in ruletab.c is that dmake -V reports the value of this macro. I would only touch these > dmake/win95/borland/ruletab.c (2046) > dmake/win95/microsft/ruletab.c (2046) > dmake/winnt/borland/ruletab.c (2046) > dmake/winnt/microsft/ruletab.c (2046) files and set the value to 8190 unless you can verify the other "exotic" OSs. P.S.: What's your overall perl status? Are still a lot of extra patches needed?
Created attachment 24939 [details] Fix detection of lines that are to long
Committed the previous patch to cws_src680_dmake43p01.
Created attachment 24958 [details] Patch to increase MAXLINELENGTH to 8190 in four files, as suggested above.
Thanks for the fix to improve the error message. I meant to say that the previous error message wasn't very helpful ;) I now get the error: dmake: makefile: line 312: Error -- Input line too long, increase MAXLINELENGTH which is much better. The previous attachment sets MAXLINELENGTH to 8190 in the four files that you've suggested. I don't have access to the other more exotic targets, so I won't touch them. I'm not currently aware of any more changes *needed* to keep perl builders happy beyond this and the other one that I created yesterday (issue 47135) - did you see that one? There are just a couple of other tweaks that I slipped into the binary build that I put on CPAN a month or so ago; I need to have a think about whether or not they should be submitted too. Thanks for your help with all this. I hope you feel that it has made dmake a little bit better than it was, as well as helping the perl world.
Committed to cws_src680_dmake43p01.
close issue.
the according CWS isn't yet integrated so it's a bit too early to close this issue...
Still fixed on cws dmake43p01 ;)
Please verify
Who? Me? Works fine for me. I retested the original problem description -- that's now fixed -- and "dmake -V" also displays the value 8190 for MAXLINELENGTH.
.