NetBSD-Bugs archive

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

port-prep/55002: Broken kernel option, found the problem



>Number:         55002
>Category:       port-prep
>Synopsis:       Broken kernel option, found the problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-prep-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 22 09:25:00 +0000 2020
>Originator:     Tim
>Release:        8.1_STABLE
>Organization:
>Environment:
I cross-compile so build machine is:
NetBSD 8.1_STABLE (GENERIC) #0: Fri Jan 24 18:50:19 UTC 2020  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64

Target machine is:
NetBSD 8.1_STABLE (7248-132.v6) #11: Sat Feb 22 00:36:53 MST 2020  XXXX@XXXX:/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC prep
>Description:
Enabling the option "RESIDUAL_DATA_DUMP" in the prep kernel config will cause this error when compiled:

--- residual.o ---
/usr/src/sys/arch/prep/prep/residual.c: In function 'large_vendor_pcibridge_subr':
/usr/src/sys/arch/prep/prep/residual.c:944:26: error: 't' undeclared (first use in this function)
   for (j = 0, first = 1, t = tmpstr; j < MAX_PCI_INTRS; j++) {
                          ^
/usr/src/sys/arch/prep/prep/residual.c:944:26: note: each undeclared identifier is reported only once for each function it appears in
*** [residual.o] Error code 1

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC
--- /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat/libcompat.a ---
A failure has been detected in another branch of the parallel make
nbmake[1]: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat
*** [/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat/libcompat.a] Error code 2

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC
2 errors

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC

ERROR: Failed to make all in "/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC"
*** BUILD ABORTED ***


This looks like the commit that caused it:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/prep/prep/residual.c.diff?r1=1.16&r2=1.17&only_with_tag=MAIN&f=h
I'm by no means an expert in c, so someone might want to take a quick look and see if preceding for loop actually needs to use the t pointer or could be reworked like the changed for loop. A quick fix is to just add the t pointer back in.
>How-To-Repeat:
Enable kernel option in port-prep:
options         RESIDUAL_DATA_DUMP      # verbosely dump residual data

>Fix:
--- /usr/src/sys/arch/prep/prep/residual.c      2020-02-22 01:06:15.911692786 -0700
+++ /usr/src/sys/arch/prep/prep/residual.c      2020-02-22 01:06:43.998595618 -0700
@@ -913,7 +913,7 @@
 large_vendor_pcibridge_subr(struct _L4_PPCPack *p, void *v, int size)
 {
        int i, numslots;
-       char tmpstr[30];
+       char tmpstr[30],*t;
        PCIInfoPack *pi = v;
        static const unsigned char *intrtype[] =
            { "8259", "MPIC", "RS6k BUID %d" };



Home | Main Index | Thread Index | Old Index