NetBSD Problem Report #60814

From www@netbsd.org  Sun Sep 27 19:43:03 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 73DBB1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 Sep 2026 19:43:03 +0000 (UTC)
Message-Id: <20260927194302.080BE1A923C@mollari.NetBSD.org>
Date: Sun, 27 Sep 2026 19:43:01 +0000 (UTC)
From: als@thangorodrim.ch
Reply-To: als@thangorodrim.ch
To: gnats-bugs@NetBSD.org
Subject: Kernel build using existing /usr/tools fails with: "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
X-Send-Pr-Version: www-1.0
X-From4GNATS: "als@thangorodrim.ch via gnats" <gnats-admin@NetBSD.org>

>Number:         60814
>Category:       kern
>Synopsis:       Kernel build using existing /usr/tools fails with: "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    thorpej
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 27 19:45:00 +0000 2026
>Last-Modified:  Mon Sep 28 21:05:01 +0000 2026
>Originator:     Alexander Schreiber
>Release:        NetBSD 11.0 RELEASE
>Organization:
Not Much
>Environment:
NetBSD gondor.angband.thangorodrim.de 10.1 NetBSD 10.1 (GENERIC) #0: Thu Dec 19 22:08:33 CET 2024  root@gondor.angband.thangorodrim.de:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
Build GENERIC kernel from HEAD/20260927052045Z snapshot fails with:

---------- cut here -----------
src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute
*** Stop.

ERROR: nbconfig failed for GENERIC
---------- cut here -----------

And while this can be "fixed" with the following trivial hacksawing:

---------- cut here -----------
--- /zfs/build/HEAD/20260927052045Z/usr/src/sys/dev/fdt/files.fdt.orig  2026-09-27 18:30:17.867019067 +0200
+++ /zfs/build/HEAD/20260927052045Z/usr/src/sys/dev/fdt/files.fdt       2026-09-27 18:30:26.266040396 +0200
@@ -202,7 +202,7 @@
 file   dev/fdt/cdns3_fdt.c                     cdns3_fdt

 # Designware USB2 OTG
-attach dwctwo at fdt with dwc2_fdt: fdt, fdt_clock, fdt_phy
+attach dwctwo at fdt with dwc2_fdt: fdt_clock, fdt_phy
 file   dev/fdt/dwc2_fdt.c                      dwc2_fdt

 # Designware USB3 XHCI
---------- cut here -----------

I very strongly assume that this is the wrong way to fix it, though ... ;-)

And in fact, if one actually builds new tools from that same
snapshot and uses those, the build completes.

So it should be documented that one needs to build new tools for this
to work, assuming it hasn't been done already. But
https://www.netbsd.org/docs/guide/en/chap-updating.html appears to assume
that an existing /usr/tools as is Just Works™ and 
https://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/UPDATING?rev=1.383.2.1;content-type=text%2Fplain
does not mention having to rebuild tools for native builds.

This was originally noticed on an Erlite3 with NetBSD 11, but it reproduces the same
on a fresh NetBSD 11.0 amd64 install.

I assume the autobuilders always build new tools, which would mask this.


>How-To-Repeat:
Grab HEAD/20260927052045Z snapshot, unpack on an existing NetBSD 11.0 install
and build the kernel using 

./build.sh -O ../obj -T /usr/tools -U kernel=GENERIC

Observe build failure.

Build new tools:
./build.sh -U -O ../obj  tools




>Fix:
First, build new tools:
  ./build.sh -U -O ../obj  tools
the use those to build the kernel (
  ./build.sh -j4 -O ../obj -T ../obj/tooldir.NetBSD-11.0-amd64/ -U kernel=GENERIC

Observe a successful build.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Sun, 27 Sep 2026 19:57:58 +0000
Responsible-Changed-Why:
I'll take a look.


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/60814: Kernel build using existing /usr/tools fails with:
 "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
Date: Mon, 28 Sep 2026 10:28:36 +0200

 On Sun, Sep 27, 2026 at 07:45:01PM +0000, als@thangorodrim.ch via gnats wrote:
 > Build GENERIC kernel from HEAD/20260927052045Z snapshot fails with:

 I have seen simmilar fallout when trying to build with tools from the
 wrong branch.

 Just to make sure: you used a -current tools build to configure the
 current (HEAD) kernel? Using a 11.0 tools build would not work (and
 is not supposed to).

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/60814: Kernel build using existing /usr/tools fails with:
 "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
Date: Mon, 28 Sep 2026 10:34:45 +0200

 On Mon, Sep 28, 2026 at 08:30:02AM +0000, Martin Husemann via gnats wrote:
 >  Just to make sure: you used a -current tools build to configure the
 >  current (HEAD) kernel? Using a 11.0 tools build would not work (and
 >  is not supposed to).

 This would also fail if you use "config GENERIC" (so running the
 installed /usr/bin/config from your 11.0 host) instead of

 $TOOLDIR/bin/nbconfig GENERIC

 Martin

From: Alexander Schreiber <als@thangorodrim.ch>
To: gnats-bugs@netbsd.org
Cc: thorpej@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/60814: Kernel build using existing /usr/tools fails with:
 "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
Date: Mon, 28 Sep 2026 22:45:59 +0200

 On Mon, Sep 28, 2026 at 08:30:02AM +0000, Martin Husemann via gnats wrote:
 > The following reply was made to PR kern/60814; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: kern/60814: Kernel build using existing /usr/tools fails with:
 >  "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
 > Date: Mon, 28 Sep 2026 10:28:36 +0200
 > 
 >  On Sun, Sep 27, 2026 at 07:45:01PM +0000, als@thangorodrim.ch via gnats wrote:
 >  > Build GENERIC kernel from HEAD/20260927052045Z snapshot fails with:
 >  
 >  I have seen simmilar fallout when trying to build with tools from the
 >  wrong branch.
 >  
 >  Just to make sure: you used a -current tools build to configure the
 >  current (HEAD) kernel? Using a 11.0 tools build would not work (and
 >  is not supposed to).

 Not knowing any better, I used 11.0 RELEASE tools, essentially following 
  https://www.netbsd.org/docs/guide/en/chap-updating.html
  "35.1.2. Building a new kernel":

 $ cd /usr/src
 $ ./build.sh -O ../obj -T ../tools -U distribution

 but modified to
 $ cd /usr/build/HEAD/${TIMESTAMP}/usr/src
 $ ./build.sh -O ../obj -T /usr/tools -U distribution

 Dug around the docs a little more, found 
  https://www.netbsd.org/docs/guide/en/chap-kernel.html
  "34.5. Building the kernel using build.sh"

 $ cd /usr/src
 $ ./build.sh kernel=MYKERNEL

 modified to
 $ cd /usr/build/HEAD/${TIMESTAMP}/usr/src
 $ ./build.sh kernel=MYKERNEL

 and that pretty quickly points out that it does indeed need new tools and
 that I should just run "./build.sh tools" to get this done - after which the
 kernel build works fine. 

 So I guess I looked at the wrong corner of the docs, aka "operator error".

 Maybe some more ... foolproofing of the docs would be helpful ;-)

 Although I suspect my specific use case of "I dug up this machine, noticed
 NetBSD now somewhat works on it, and want to find any remaining breakages
 so they can be fixed ... all while not being a NetBSD developer (and thus
 lacking some helpful experience" is not exactly common.

 Kind regards,
            Alex.
 -- 
 "Opportunity is missed by most people because it is dressed in overalls and
  looks like work."                                      -- Thomas A. Edison

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.