Re: make installkernel breaks

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Wed, 20 Oct 2004 11:06:03 +0300
On Tue, Oct 19, 2004 at 03:52:13PM -0700, Gustavo A. Baratto wrote:
> Greetings...
> this is the deal:
> I have 1 build server + dozens of servers to be upgrade to 5.3b7
> 
> all servers including the build server was 5.1.
> I upgraded the build server to 5.3 beta 6... everything was fine. Then 
> upgraded it to 5.3 beta 7. All smooth again.
> 
> Now, I rsync'ed the /usr/obj and /usr/src from the build server to the 
> other servers (which are still 5.1), and when I run make installkernel I 
> get the error below:
> 
> -------
> # make installkernel KERNCONF=CUSTOM-DUAL-FW
> "/usr/src/Makefile.inc1", line 830: warning: String comparison operator 
> should be either == or !=
> "/usr/src/Makefile.inc1", line 830: Malformed conditional 
> ((!defined(NO_RESCUE) ||  defined(RELEASEDIR)) &&  (${TARGET_ARCH} != 
> ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101))
> "/usr/src/Makefile.inc1", line 830: Missing dependency operator
> "/usr/src/Makefile.inc1", line 832: if-less endif
> "/usr/src/Makefile.inc1", line 832: Need an operator
> make: fatal errors encountered -- cannot continue
> *** Error code 1
> 
> Stop in /usr/src.
> -------
> 
> Any ideas? I don't want to downgrade the build server to 5.1, then upgrade 
> it to beta 7, so I can upgrade the other servers... there has to be a 
> better solution.
> 
We don't strictly speaking the scenario when "build host" != "install host",
for a lot of reasons that were provided here a lot of times, so I won't
repeat them.  What we *do* support is building on one host, then mounting
the target's host file systems (by NFS), and installing world to DESTDIR
pointing to these file systems.  We only support NFS mounting /usr/src and
/usr/obj (or otherwise transferring them) and using them on another host,
if:

1.  Both build and install host run the same FreeBSD version.

2.  Build host's CPU is backward compatible with the install host's CPU,
    or, if build's CPU is more modern than install's CPU, the world on
    build's world was *not* compiled with CFLAGS optimized for this
    more modern CPU.  Note that the last restriction applies to the
    world that the build host is running, as well as the world that was
    built for install host.

The particular breakage you're seeing is due to 1.  More specifically,
on the build host the make(1) binary is quite fresh, and so buildworld
doesn't see a need to upgrade it to a newver version.  The install host
is running an older FreeBSD version, so its make(1) binary is not
adequate for modern makefiles.  You can *try* to overcome this by
using the following command:

	make installworld -DALWAYS_CHECK_MAKE

This will check and update if necessary the make(1) binary to a new
version for installworld.

But no guarantee that it will not break later.  For example, running
installworld can fail in the middle when executing the install(1)
binary that was built on build host with CPUTYPE=p6 if your install
host is plain Pentium.


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Wed Oct 20 2004 - 06:06:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:18 UTC