From owner-freebsd-current@freebsd.org Fri Jan 26 17:35:50 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 D0921EB9B14 for ; Fri, 26 Jan 2018 17:35:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFA97CCD6 for ; Fri, 26 Jan 2018 17:35:48 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 5231a47b-02bf-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 5231a47b-02bf-11e8-91c6-33ffc249f3e8; Fri, 26 Jan 2018 17:35:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w0QHZboe014056; Fri, 26 Jan 2018 10:35:37 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1516988137.42536.255.camel@freebsd.org> Subject: Re: Error compiling isboot-kmod From: Ian Lepore To: John Nielsen , freebsd-current Cc: Warner Losh , Maurizio Vairani Date: Fri, 26 Jan 2018 10:35:37 -0700 In-Reply-To: <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> References: <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Fri, 26 Jan 2018 17:35:50 -0000 On Fri, 2018-01-26 at 10:00 -0700, John Nielsen wrote: > > > > On Jan 26, 2018, at 3:37 AM, Maurizio Vairani > om> wrote: > > > > 2018-01-24 17:19 GMT+01:00 Warner Losh : > > > > > > 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 > > > > I can't compile the kernel module isboot-kmod: > > # cd /usr/ports/net/isboot-kmod && make > > ===>  License BSD2CLAUSE accepted by the > > user > > > > ===>   isboot-kmod-0.2.13_1 depends on file: /usr/local/sbin/pkg - > > found > > ===> Fetching all distfiles required by isboot-kmod-0.2.13_1 for > > building > > ===>  Extracting for isboot-kmod-0.2.13_1 > > => SHA256 Checksum OK for isboot-0.2.13.tar.gz. > > ===>  Patching for isboot-kmod-0.2.13_1 > > ===>  Applying FreeBSD patches for isboot-kmod-0.2.13_1 > > ===>  Configuring for isboot-kmod-0.2.13_1 > > ===>  Building for isboot-kmod-0.2.13_1 > > --- machine --- > > --- x86 --- > > --- machine --- > > machine -> /usr/src/sys/amd64/include > > --- x86 --- > > x86 -> /usr/src/sys/x86/include > > --- objwarn --- > > --- opt_cam.h --- > > --- objwarn --- > > Warning: Object directory not changed from original > > /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src > > --- opt_cam.h --- > > :> opt_cam.h > > --- isboot.o --- > > --- ibft.o --- > > --- isboot.o --- > > cc  -O2 -pipe -fno-strict-aliasing  -Werror -D_KERNEL -DKLD_MODULE > > -nostdinc   -I. -I/usr/src/sys -fno-common  -fno-omit-frame-pointer > > -mno-omit-leaf-frame-pointer   -MD  -MF.depe$ > > d.isboot.o -MTisboot.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno- > > sse > > -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding > > -fwrapv > > -fstack-protector -Wall -Wredundant-dec$ > > s -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > > -Wpointer-arith > > -Winline -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-s$ > > gn -Wno-error-shift-negative-value -Wno-error-address-of-packed- > > member > > -mno-aes -mno-avx  -std=iso9899:1999 -c isboot.c -o isboot.o > > --- ibft.o --- > > cc  -O2 -pipe -fno-strict-aliasing  -Werror -D_KERNEL -DKLD_MODULE > > -nostdinc   -I. -I/usr/src/sys -fno-common  -fno-omit-frame-pointer > > -mno-omit-leaf-frame-pointer   -MD  -MF.depe$ > > d.ibft.o -MTibft.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse > > -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding > > -fwrapv > > -fstack-protector -Wall -Wredundant-decls -$ > > nested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer- > > arith > > -Winline -Wcast-qual -Wundef -Wno-pointer-sign > > -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdi$ > > gnostics-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=iso9899:1999 -c ibft.c -o ibft.o > > --- iscsi.o --- > > cc  -O2 -pipe -fno-strict-aliasing  -Werror -D_KERNEL -DKLD_MODULE > > -nostdinc   -I. -I/usr/src/sys -fno-common  -fno-omit-frame-pointer > > -mno-omit-leaf-frame-pointer   -MD  -MF.depe$ > > d.iscsi.o -MTiscsi.o -mcmodel=kernel -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__=__freebsd_kprintf__ -Wmissing-include-dirs -f$ > > iagnostics-show-option -Wno-unknown-pragmas -Wno-error- > > tautological-compare > > -Wno-error-empty-body -Wno-error-parentheses-equality > > -Wno-error-unused-function -Wno-error-pointer-sig$ > >  -Wno-error-shift-negative-value -Wno-error-address-of-packed- > > member > > -mno-aes -mno-avx  -std=iso9899:1999 -c iscsi.c -o iscsi.o > > In file included from iscsi.c:62: > > In file included from /usr/src/sys/cam/cam_ccb.h:1035: > > In file included from /usr/src/sys/cam/mmc/mmc_bus.h:5: > > 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" > >          ^~~~~~~~~~~~~ > > > > I think this was fixed in a newer -current. > > > > Warner  > > 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. :) > > JN > > > > > # MAKE_JOBS_UNSAFE=yes make  > > ===>  License BSD2CLAUSE accepted by the user > > ===>   isboot-kmod-0.2.13_1 depends on file: /usr/local/sbin/pkg - > > found > > ===> Fetching all distfiles required by isboot-kmod-0.2.13_1 for > > building > > ===>  Extracting for isboot-kmod-0.2.13_1 > > => SHA256 Checksum OK for isboot-0.2.13.tar.gz. > > ===>  Patching for isboot-kmod-0.2.13_1 > > ===>  Applying FreeBSD patches for isboot-kmod-0.2.13_1 > > ===>  Configuring for isboot-kmod-0.2.13_1 > > ===>  Building for isboot-kmod-0.2.13_1 > > machine -> /usr/src/sys/amd64/include > > x86 -> /usr/src/sys/x86/include > > :> opt_cam.h > > Warning: Object directory not changed from original > > /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src > > cc  -O2 -pipe -fno-strict-aliasing  -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=kernel -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__=__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=iso9899:1999 -c isboot.c -o > > isboot.o > > cc  -O2 -pipe -fno-strict-aliasing  -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=kernel -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__=__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=iso9899:1999 -c ibft.c -o ibft.o > > cc  -O2 -pipe -fno-strict-aliasing  -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=kernel -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__=__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=iso9899:1999 -c iscsi.c -o iscsi.o > > In file included from iscsi.c:62: > > In file included from /usr/src/sys/cam/cam_ccb.h:1035: > > In file included from /usr/src/sys/cam/mmc/mmc_bus.h:5: > > 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" > >          ^~~~~~~~~~~~~ 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= 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=). 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. As for commits in the July timeframe that led to this, maybe r320844. -- Ian