Re: OpenBSD 7.9 Octeon release fails to compile without IPV6 - Kernel Compilation Bug - if_ogx.c
Kirill A. Korinsky <[email protected]> Sat, 13 Jun 2026 12:56:51 +0200
| Newsgroups | gmane.os.openbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 13 Jun 2026 08:01:53 +0200, Gabriel <[email protected]> wrote: > > > Issue: Kernel does not compile if IPV6 support is disabled > > > > Steps to recreate: Install the 7.9 sys release source code on an > > octeon system. > > Edit /usr/src/sys/conf/GENERIC and comment out "option INET6" > > Configure and compile as normal - will fail with the following error: > > > > cc -g -Werror -Wall -Wimplicit-function-declaration > > -Wno-pointer-sign -Wframe-larger-than=2047 > > -Wno-address-of-packed-member -Wno-constant-conversion > > -Wno-unused-but-set-variable -Wno-gnu-folding-constant -march=mips64r2 > > -mno-abicalls -msoft-float -G 0 -ffreestanding -fomit-frame-pointer > > -O2 -pipe -nostdinc -I/usr/sys > > -I/usr/sys/arch/octeon/compile/EDGE.MP/obj -I/usr/sys/arch > > -DDIAGNOSTIC -DKTRACE -DACCOUNTING -DKMEMSTATS -DPTRACE -DPOOL_DEBUG > > -DCRYPTO -DSYSVMSG -DSYSVSEM -DSYSVSHM -DUVM_SWAP_ENCRYPT -DFFS -DFFS2 > > -DUFS_DIRHASH -DQUOTA -DEXT2FS -DMFS -DNFSCLIENT -DNFSSERVER -DCD9660 > > -DUDF -DMSDOSFS -DFIFO -DTMPFS -DFUSE -DSOCKET_SPLICE -DTCP_ECN > > -DTCP_SIGNATURE -DIPSEC -DPPP_BSDCOMP -DPPP_DEFLATE -DPIPEX -DMROUTING > > -DMPLS -DBOOT_CONFIG -DCPU_MIPS64R2 -DCPU_OCTEON -DFPUEMUL > > -DMIPS_PTE64 -DPCIVERBOSE -DUSER_PCICONF -DUSBVERBOSE -DONEWIREVERBOSE > > -DMULTIPROCESSOR -DMAXUSERS=32 -D_KERNEL -D__octeon__ -MD -MP -c > > /usr/sys/arch/octeon/dev/if_ogx.c > > /usr/sys/arch/octeon/dev/if_ogx.c:1282:22: error: invalid application > > of 'sizeof' to an incomplete type 'struct ip6_hdr' > > 1282 | hdr |= (ehdrlen + sizeof(struct > > ip6_hdr)) << > > | ^ ~~~~~~~~~~~~~~~~ > > /usr/sys/netinet/if_ether.h:306:9: note: forward declaration of > > 'struct ip6_hdr' > > 306 | struct ip6_hdr *ip6; > > | ^ > > 1 error generated. > > *** Error 1 in /usr/sys/arch/octeon/compile/EDGE.MP (Makefile:627 > > 'if_ogx.o') > > root@defender /usr/sys/arch/octeon/compile/EDGE.MP> > > > > Sincerely, > > > > Gabriel > > > > > > Here a diff which fixes build on my octeon. I also tested the same idea: without IPv6 on amd64 and arm64, and it builds fine. Index: sys/arch/octeon/dev/if_ogx.c =================================================================== RCS file: /home/cvs/src/sys/arch/octeon/dev/if_ogx.c,v diff -u -p -r1.7 if_ogx.c --- sys/arch/octeon/dev/if_ogx.c 20 May 2024 23:13:33 -0000 1.7 +++ sys/arch/octeon/dev/if_ogx.c 13 Jun 2026 10:44:07 -0000 @@ -1277,11 +1277,13 @@ ogx_send_mbuf(struct ogx_softc *sc, stru hdr |= (ehdrlen + sizeof(struct ip)) << PKO3_SEND_HDR_L4PTR_S; break; +#ifdef INET6 case ETHERTYPE_IPV6: hdr |= ehdrlen << PKO3_SEND_HDR_L3PTR_S; hdr |= (ehdrlen + sizeof(struct ip6_hdr)) << PKO3_SEND_HDR_L4PTR_S; break; +#endif default: break; } -- wbr, Kirill