DragonFly BSD
DragonFly bugs List (threaded) for 2006-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: make buildworld fails with up-to-date sourcecode from HEAD

To: Thomas Schlesinger <schlesinger@xxxxxxxxxxxxx>
From: Sascha Wildner <saw@xxxxxxxxx>
Date: Sun, 12 Nov 2006 14:17:58 +0100

Thomas Schlesinger wrote:

make buildworld fails with this error message:

mkdep -f .depend -a /usr/src/usr.sbin/makewhatis/makewhatis.c
echo makewhatis: /usr/obj/usr/src/btools_i386/usr/lib/libc.a /usr/obj/usr/src/btools_i386/usr/lib/libz.a
cc -O -pipe -mtune=pentiumpro -Wunknown-pragmas -Wsystem-headers -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /usr/src/usr.sbin/makewhatis/makewhatis.c
/usr/src/usr.sbin/makewhatis/makewhatis.c: In function `main':
/usr/src/usr.sbin/makewhatis/makewhatis.c:1025: error: `MACHINE' undeclared (first use in this function)
/usr/src/usr.sbin/makewhatis/makewhatis.c:1025: error: (Each undeclared identifier is reported only once
/usr/src/usr.sbin/makewhatis/makewhatis.c:1025: error: for each function it appears in.)
*** Error code 1

Stop in /usr/src/usr.sbin/makewhatis.
*** Error code 1

This seems to happen when you do a buildworld with MACHINE == pc32 followed by an installworld with MACHINE == i386. /usr/include/machine/param.h with the necessary definition doesn't seem to get installed then.

I'll commit a check to installworld similar to that done for buildworld to ensure that this can't happen.

A quick-and-dirty fix would be to edit makewhatis.c to define MACHINE temporarily (see patch). It can be removed then after a successful {build,install}world.

Index: makewhatis.c
RCS file: /home/dcvs/src/usr.sbin/makewhatis/makewhatis.c,v
retrieving revision 1.2
diff -u -u -r1.2 makewhatis.c
--- makewhatis.c        16 Jan 2005 04:59:53 -0000      1.2
+++ makewhatis.c        12 Nov 2006 13:13:50 -0000
@@ -1021,6 +1021,10 @@
        whatis_proto = new_sbuf();
        whatis_final = new_sbuf();

+#ifndef MACHINE
+#define MACHINE "pc32"
        if ((machine = getenv("MACHINE")) == NULL)
                machine = MACHINE;



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