[Bug 269454] kernel fails to build when IPv6 disabled

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 10 Feb 2023 06:41:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269454

            Bug ID: 269454
           Summary: kernel fails to build when IPv6 disabled
           Product: Base System
           Version: 13.1-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: iron.udjin@gmail.com

Hello,

I'm trying to build 13-STABLE which is currently on commit
c243de11cf7c4bb3d67bbc1655b149037e5b04f1

In the kernel config I have:
nooptions   INET6

... and kernel fails to build:

cc -target x86_64-unknown-freebsd13.2
--sysroot=/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin  -O2 -pipe -O2 -pipe -march=native
-fno-common  -DCONFIG_INFINIBAND_USER_MEM -fno-strict-aliasing -Werror
-D_KERNEL -DKLD_MODULE -DKLD_TIED -nostdinc 
-I/usr/src/sys/modules/irdma/../../dev/ice
-I/usr/src/sys/modules/irdma/../../ofed/include
-I/usr/src/sys/modules/irdma/../../ofed/include/uapi
-I/usr/src/sys/modules/irdma/../../compat/linuxkpi/common/include
-DHAVE_KERNEL_OPTION_HEADERS -include
/usr/obj/usr/src/amd64.amd64/sys/IRON/opt_global.h -I. -I/usr/src/sys
-I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include
-I/usr/obj/usr/src/amd64.amd64/sys/IRON     -MD  -MF.depend.irdma_cm.o
-MTirdma_cm.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -Wall -Wredundant-decls
-Wnested-externs -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-error=unused-but-set-variable
-Wno-format-zero-length   -mno-aes -mno-avx  -std=iso9899:1999 -c
/usr/src/sys/modules/irdma/../../dev/irdma/irdma_cm.c -o irdma_cm.o
/usr/src/sys/modules/irdma/../../dev/irdma/irdma_cm.c:1643:11: error: implicit
declaration of function 'ip6_ifp_find' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
        ip_dev = ip6_ifp_find(&init_net, laddr6, scope_id);
                 ^
/usr/src/sys/modules/irdma/../../dev/irdma/irdma_cm.c:1643:11: note: did you
mean 'ip_ifp_find'?
/usr/src/sys/modules/irdma/../../ofed/include/rdma/ib_addr_freebsd.h:36:1:
note: 'ip_ifp_find' declared here
ip_ifp_find(struct vnet *vnet, uint32_t addr)
^
/usr/src/sys/modules/irdma/../../dev/irdma/irdma_cm.c:1643:9: error:
incompatible integer to pointer conversion assigning to 'struct ifnet *' from
'int' [-Werror,-Wint-conversion]
        ip_dev = ip6_ifp_find(&init_net, laddr6, scope_id);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
*** Error code 1

-- 
You are receiving this mail because:
You are the assignee for the bug.