Project

General

Profile

Actions

Bug #379

closed

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

Added by schlesinger about 18 years ago. Updated about 18 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

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

.depend

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 is the machine/cpu/arch part of my kernel configuration file:

machine pc32
machine_arch i386
cpu I686_CPU

Thomas

Actions #1

Updated by sepherosa about 18 years ago

I assume you have failed to installworld before this compiling error.
If my assuming is correct then add following lines after last #include
... in src/usr.sbin/makewhatis/makewhatis.c:
#ifndef MACHINE
#define MACHINE "pc32"
#endif

Don't forget to nuke it once you have "a whole new world" :-)

BTW, before you installworld, please make sure to:
export MACHINE=pc32
Thank Sascha for this tip :-)

Best Regards,
sephe

Actions #2

Updated by swildner about 18 years ago

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"
#endif

if ((machine = getenv("MACHINE")) == NULL)
machine = MACHINE;

Sascha

Actions #3

Updated by schlesinger about 18 years ago

Sephe,

thanks, that fixed it ;-)

Thomas

Actions

Also available in: Atom PDF