From owner-freebsd-current@freebsd.org Sat Jan 27 06:21:02 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CFA6EDFBD9 for ; Sat, 27 Jan 2018 06:21:02 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail4.jnielsen.net (webmail4.jnielsen.net [IPv6:2607:f7a0:a:18c::c0de]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0C8378B5B; Sat, 27 Jan 2018 06:21:01 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from [192.168.2.101] (stealth.jnielsen.net [68.69.164.122]) (authenticated bits=0) by webmail4.jnielsen.net (8.15.2/8.15.2) with ESMTPSA id w0R6KuY0023648 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 26 Jan 2018 23:20:59 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail4.jnielsen.net: Host stealth.jnielsen.net [68.69.164.122] claimed to be [192.168.2.101] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Error compiling isboot-kmod From: John Nielsen In-Reply-To: Date: Fri, 26 Jan 2018 23:20:56 -0700 Cc: Warner Losh , Maurizio Vairani , Ian Lepore Content-Transfer-Encoding: quoted-printable Message-Id: <09C92929-BC36-4C75-A2F2-0607C9701D40@jnielsen.net> References: <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> <1516988137.42536.255.camel@freebsd.org> To: freebsd-current X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 06:21:02 -0000 > On Jan 26, 2018, at 9:42 PM, John Nielsen wrote: >=20 >> On Jan 26, 2018, at 10:35 AM, Ian Lepore wrote: >>=20 >> On Fri, 2018-01-26 at 10:00 -0700, John Nielsen wrote: >>>>=20 >>>> On Jan 26, 2018, at 3:37 AM, Maurizio Vairani >>> om> wrote: >>>>=20 >>>> 2018-01-24 17:19 GMT+01:00 Warner Losh : >>>>=20 >>>>=20 >>>> On Wed, Jan 24, 2018 at 3:12 AM, Maurizio Vairani >>> il.com> wrote: >>>> On this CURRENT snapshot >>>> # uname -a >>>> FreeBSD freebsd12 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r327788: Wed >>>> Jan 10 >>>> 22:55:40 UTC 2018 >>>> root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENER >>>> IC >>>> amd64 >>>>=20 >>>> I can't compile the kernel module isboot-kmod: >>>>=20 >>>> /usr/src/sys/sys/bus.h:726:10: fatal error: 'device_if.h' file not >>>> found >>>> #include "device_if.h" >>>> ^~~~~~~~~~~~~ >>>>=20 >>>> I think this was fixed in a newer -current. >>>>=20 >>>> Warner=20 >>>> Thanks Warner, but I have the same error in : >>>> # uname -a >>>> FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25 >>>> 04:48:52 UTC 2018 root@releng3.nyi.freebsd.org:/usr/obj/usr/src >>>> /amd64.amd64/sys/GENERIC amd64 >>> Whatever change broke it happened around the beginning of July 2017. >>> I started getting (and ignoring, sadly, due to lack of time and >>> certainty that anyone cared) messages with this error from pkg- >>> fallout@ on July 11. I'm looking through the revision history but >>> nothing stands out to me yet. Maybe someone with better svn-foo will >>> find it faster. :) >>>=20 >>>> In file included from /usr/src/sys/dev/mmc/bridge.h:59: >>>> /usr/src/sys/sys/bus.h:726:10: fatal error: 'device_if.h' file not >>>> found >>>> #include "device_if.h" >>>> ^~~~~~~~~~~~~ >>=20 >> I've never looked into how kernel modules compile when built as a = port, >> but when built as part of the system kernel build, the SRCS=3D in the >> module makefile needs to name all of the dynamically generated header >> files such as device_if.h (basically anything ending in _if.h used by >> the module needs to be in SRCS=3D). >>=20 >> So adding device_if.h to SRCS may be all that's needed. Or maybe >> that's incremental and you'll find that several others are needed as >> well. >=20 > Thanks! Patching the Makefile with: > SRCS+=3D device_if.h bus_if.h >=20 > solves the above issue but now there's something else. Anyone have an = idea off the top of their head? >=20 > root@freebsd12:/usr/ports/net/isboot-kmod # make > =3D=3D=3D> Configuring for isboot-kmod-0.2.13_1 > =3D=3D=3D> Building for isboot-kmod-0.2.13_1 > --- machine --- > --- x86 --- > --- objwarn --- > Warning: Object directory not changed from original = /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src > --- x86 --- > x86 -> /usr/src/sys/x86/include > --- machine --- > machine -> /usr/src/sys/amd64/include > --- opt_cam.h --- > --- device_if.h --- > --- bus_if.h --- > --- opt_cam.h --- > :> opt_cam.h > --- device_if.h --- > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m = -h > --- bus_if.h --- > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h > --- isboot.o --- > --- ibft.o --- > --- iscsi.o --- > --- isboot.o --- > cc -O2 -pipe -DNO_MALLOC_EXTRAS -fno-strict-aliasing = -DNO_MALLOC_EXTRAS -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. = -I/usr/src/sys -fno-common -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer -MD -MF.depend.isboot.o -MTisboot.o = -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector = -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef = -Wno-pointer-sign -D__printf__=3D__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-error-address-of-packed-member -mno-aes -mno-avx = -std=3Diso9899:1999 -c isboot.c -o isboot.o > --- iscsi.o --- > cc -O2 -pipe -DNO_MALLOC_EXTRAS -fno-strict-aliasing = -DNO_MALLOC_EXTRAS -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. = -I/usr/src/sys -fno-common -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer -MD -MF.depend.iscsi.o -MTiscsi.o = -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector = -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef = -Wno-pointer-sign -D__printf__=3D__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-error-address-of-packed-member -mno-aes -mno-avx = -std=3Diso9899:1999 -c iscsi.c -o iscsi.o > --- ibft.o --- > cc -O2 -pipe -DNO_MALLOC_EXTRAS -fno-strict-aliasing = -DNO_MALLOC_EXTRAS -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. = -I/usr/src/sys -fno-common -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer -MD -MF.depend.ibft.o -MTibft.o = -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector = -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef = -Wno-pointer-sign -D__printf__=3D__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-error-address-of-packed-member -mno-aes -mno-avx = -std=3Diso9899:1999 -c ibft.c -o ibft.o > --- iscsi.o --- > iscsi.c:1146:3: error: incompatible pointer types passing 'void = (struct mbuf *, void *, void *)' to parameter of type 'm_ext_free_t *' = (aka 'void (*)(struct mbuf *)') [-Werror,-Wincompatible-pointer-types] > MEXTADD(md, (caddr_t)ds_dd, (ISCSI_ALIGN(pp->ds_len) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/src/sys/sys/mbuf.h:887:42: note: expanded from macro 'MEXTADD' > m_extadd((m), (char *)(buf), (size), (free), (arg1), (arg2), = \ > ^~~~~~ > /usr/src/sys/sys/mbuf.h:634:59: note: passing argument to parameter = here > void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, Looks like iscsi.c needs to be fixed up following r324446 = (https://svnweb.freebsd.org/changeset/base/324446). Starting to be out = of my depth unless there's a mechanical way to make the changes?