Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build tools broken - nbmake



On Mon, 1 Dec 2008, Paul Goyette wrote:

On Mon, 1 Dec 2008, Hisashi T Fujinaka wrote:

On Mon, 1 Dec 2008, Paul Goyette wrote:

On port amd64, with sources updated just minutes ago:

...
cc -O -DDEFSHELL_CUSTOM="/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1 -c /build/netbsd-local/src/tools/make/../../usr.bin/make/lst.lib/lstSucc.c
cc  -O -o nbmake *.o
[1]   Segmentation fault (core dumped) "${make}" -m ${T...

ERROR: raw_getmakevar TOOLCHAIN_MISSING: /tmp/nbbuild15746/nbmake failed
*** BUILD ABORTED ***

It's an error in for.c, afaict.

Yes, it seems so. I have reverted to rev 1.32 of usr.bin/make/for.c and my build is proceeding normally.

With big clue from cube@ I have applied the following patch, which seems to make things work.

Index: for.c
===================================================================
RCS file: /cvsroot/src/usr.bin/make/for.c,v
retrieving revision 1.33
diff -u -p -r1.33 for.c
--- for.c       30 Nov 2008 22:37:55 -0000      1.33
+++ for.c       1 Dec 2008 18:29:41 -0000
@@ -124,10 +124,10 @@ ForAddVar(const char *data, size_t len)
        int nvars;

        nvars = accumFor.nvars;
-       accumFor.nvars = nvars + 1;
+       accumFor.nvars = ++nvars;
        accumFor.vars = bmake_realloc(accumFor.vars, nvars * sizeof(char *));

-       accumFor.vars[nvars] = make_str(data, len);
+       accumFor.vars[--nvars] = make_str(data, len);
 }

 /*-


I have no idea if this is correct or complete, but it _does_ work.  :)



----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index