Bug 278847 - Kernel build errors in the kernel config with the ip17x device
Summary: Kernel build errors in the kernel config with the ip17x device
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-08 03:33 UTC by Vladyslav V. Prodan
Modified: 2024-05-14 16:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladyslav V. Prodan 2024-05-08 03:33:01 UTC
FreeBSD 14.1-PRERELEASE #0 stable/14-n267586-19e335596658: Thu May  2 20:41:56 UTC 2024

# cat /usr/src/.gituprevision
stable/14:0b8cdac88

# cat << EOF >> /usr/src/sys/amd64/conf/test-14-0.1

include GENERIC
ident test-14-0-1
hints   "GENERIC.hints" # Default places to look for devices.

device		etherswitch
device		miiproxy
device		arswitch
device		ip17x

EOF


...
cc -target x86_64-unknown-freebsd14.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe  -fno-strict-aliasing  -g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common    -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD  -MF.depend.ip17x.o -MTip17x.o -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -fdebug-prefix-map=./i386=/usr/src/sys/i386/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length   -mno-aes -mno-avx  -std=gnu99 -Werror /usr/src/sys/dev/etherswitch/ip17x/ip17x.c
/usr/src/sys/dev/etherswitch/ip17x/ip17x.c:559:22: error: variable 'sc' set but not used [-Werror,-Wunused-but-set-variable]
  559 |         struct ip17x_softc *sc;
      |                             ^
/usr/src/sys/dev/etherswitch/ip17x/ip17x.c:571:22: error: variable 'sc' set but not used [-Werror,-Wunused-but-set-variable]
  571 |         struct ip17x_softc *sc;
      |                             ^
2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/test-14-0.1
      110.80 real        46.11 user        64.19 sys
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
Comment 1 Ed Maste freebsd_committer freebsd_triage 2024-05-08 18:18:00 UTC
Can you give the patch in https://reviews.freebsd.org/D45133 a try?
Comment 2 Vladyslav V. Prodan 2024-05-08 22:11:49 UTC
(In reply to Ed Maste from comment #1)

Similar situation with device ukswitch...
Both of them require INVARIANTS support...
Comment 3 Vladyslav V. Prodan 2024-05-08 23:42:38 UTC
(In reply to Ed Maste from comment #1)

--------------------------------------------------------------
>>> Kernel build for test-14-0.1 completed on Wed May  8 08:02:09 EEST 2024
--------------------------------------------------------------
>>> Kernel(s)  test-14-0.1 built in 1921 seconds, ncpu: 6
--------------------------------------------------------------
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-05-09 18:23:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=82f43db382cc4aea2a3f34f08da9a97ab023d5fb

commit 82f43db382cc4aea2a3f34f08da9a97ab023d5fb
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-08 13:20:44 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-09 18:22:11 +0000

    ip17x: fix non-debug build

    PR:             278847
    Reviewed by:    jhibbits
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45133

 sys/dev/etherswitch/ip17x/ip17x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 Vladyslav V. Prodan 2024-05-09 20:21:44 UTC
(In reply to commit-hook from comment #4)

Similar situation with device ukswitch...
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-05-10 12:54:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e0c027e69de66afc1157c76bd42ecd3737d54e1

commit 2e0c027e69de66afc1157c76bd42ecd3737d54e1
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-10 12:52:06 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-10 12:53:15 +0000

    ukswitch: fix non-debug build

    PR:             278847
    Sponsored by:   The FreeBSD Foundation

 sys/dev/etherswitch/ukswitch/ukswitch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 7 Vladyslav V. Prodan 2024-05-11 15:53:59 UTC
(In reply to commit-hook from comment #6)

If possible, add both commits to the stable/14 branch
Comment 8 Ed Maste freebsd_committer freebsd_triage 2024-05-13 14:24:02 UTC
(In reply to Vladyslav V. Prodan from comment #7)
> If possible, add both commits to the stable/14 branch

Yes, I have these queued these locally for MFC to stable/14 and stable/13.
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-05-14 14:47:59 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=7309d72e140b8d13698c0e88168228f8877aaaad

commit 7309d72e140b8d13698c0e88168228f8877aaaad
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-10 12:52:06 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 14:47:00 +0000

    ukswitch: fix non-debug build

    PR:             278847
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 2e0c027e69de66afc1157c76bd42ecd3737d54e1)

 sys/dev/etherswitch/ukswitch/ukswitch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-05-14 14:48:00 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9a7be7def4c55fb5476c5d9540137f0ae6f9206

commit e9a7be7def4c55fb5476c5d9540137f0ae6f9206
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-08 13:20:44 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 14:47:00 +0000

    ip17x: fix non-debug build

    PR:             278847
    Reviewed by:    jhibbits
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45133

    (cherry picked from commit 82f43db382cc4aea2a3f34f08da9a97ab023d5fb)

 sys/dev/etherswitch/ip17x/ip17x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-05-14 16:57:12 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1346b9ca7167789061edec6547f1f8c5b839c71a

commit 1346b9ca7167789061edec6547f1f8c5b839c71a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-10 12:52:06 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 16:56:33 +0000

    ukswitch: fix non-debug build

    PR:             278847
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 2e0c027e69de66afc1157c76bd42ecd3737d54e1)
    (cherry picked from commit 7309d72e140b8d13698c0e88168228f8877aaaad)

 sys/dev/etherswitch/ukswitch/ukswitch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-05-14 16:57:14 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=dfac340633bcc64ce005009483ec353c6201b210

commit dfac340633bcc64ce005009483ec353c6201b210
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-08 13:20:44 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-14 16:56:33 +0000

    ip17x: fix non-debug build

    PR:             278847
    Reviewed by:    jhibbits
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45133

    (cherry picked from commit 82f43db382cc4aea2a3f34f08da9a97ab023d5fb)
    (cherry picked from commit e9a7be7def4c55fb5476c5d9540137f0ae6f9206)

 sys/dev/etherswitch/ip17x/ip17x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)