Discussion:
Error compiling isboot-kmod
(too old to reply)
Maurizio Vairani
2018-01-24 10:12:27 UTC
Permalink
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
***@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
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"
^~~~~~~~~~~~~
1 error generated.
*** [iscsi.o] Error code 1

make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
1 error

make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/isboot-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/net/isboot-kmod

--
Regards
Maurizio
Warner Losh
2018-01-24 16:19:31 UTC
Permalink
Post by Maurizio Vairani
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
amd64
# 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
/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
Maurizio Vairani
2018-01-26 10:37:45 UTC
Permalink
Post by Warner Losh
Post by Maurizio Vairani
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
amd64
# 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-compar
e
-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
/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 ***@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
amd64

# 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"
^~~~~~~~~~~~~
1 error
generated.

*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/isboot-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/net/isboot-kmod
--
Maurizio
John Nielsen
2018-01-26 17:00:25 UTC
Permalink
Post by Maurizio Vairani
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
amd64
# 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
/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
# uname -a
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
Post by Maurizio Vairani
# 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
/usr/src/sys/sys/bus.h:726:10: fatal error: 'device_if.h' file not found
#include "device_if.h"
^~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/net/isboot-kmod
*** Error code 1
Stop.
make: stopped in /usr/ports/net/isboot-kmod
--
Maurizio
Ian Lepore
2018-01-26 17:35:37 UTC
Permalink
Post by John Nielsen
Post by Maurizio Vairani
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
IC
amd64
# 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
/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 
# uname -a
FreeBSD  12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25
/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-
nothing stands out to me yet. Maybe someone with better svn-foo will
find it faster. :)
JN
Post by Maurizio Vairani
# 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
/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
John Nielsen
2018-01-27 04:42:16 UTC
Permalink
Post by Ian Lepore
Post by John Nielsen
Post by Maurizio Vairani
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
IC
amd64
/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
# uname -a
FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25
/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-
nothing stands out to me yet. Maybe someone with better svn-foo will
find it faster. :)
Post by Maurizio Vairani
/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.
Thanks! Patching the Makefile with:
SRCS+= device_if.h bus_if.h

solves the above issue but now there's something else. Anyone have an idea off the top of their head?

***@freebsd12:/usr/ports/net/isboot-kmod # make
===> Configuring for isboot-kmod-0.2.13_1
===> 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=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
--- 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=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
--- 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=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
--- 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,
^
1 error generated.
*** [iscsi.o] Error code 1

make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
1 error

make[2]: stopped in /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/isboot-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/net/isboot-kmod
Post by Ian Lepore
As for commits in the July timeframe that led to this, maybe r320844.
John Nielsen
2018-01-27 06:20:56 UTC
Permalink
Post by John Nielsen
Post by Ian Lepore
Post by John Nielsen
Post by Maurizio Vairani
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
IC
amd64
/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
# uname -a
FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25
/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-
nothing stands out to me yet. Maybe someone with better svn-foo will
find it faster. :)
Post by Maurizio Vairani
/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.
SRCS+= device_if.h bus_if.h
solves the above issue but now there's something else. Anyone have an idea off the top of their head?
===> Configuring for isboot-kmod-0.2.13_1
===> 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=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
--- 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=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
--- 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=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
--- 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?
Ian Lepore
2018-01-27 16:20:32 UTC
Permalink
Post by John Nielsen
Post by Maurizio Vairani
[...]
--- 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?
I'm not set up to test-compile this against -current right now, so I'm
not sure if this is all that remains or just another breadcrumb on the
trail, but... try the attached patch.

-- Ian
Maurizio Vairani
2018-01-29 12:50:14 UTC
Permalink
Post by John Nielsen
Post by John Nielsen
Post by Maurizio Vairani
[...]
--- 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]
Post by John Nielsen
Post by Maurizio Vairani
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), \
Post by John Nielsen
Post by Maurizio Vairani
^~~~~~
/usr/src/sys/sys/mbuf.h:634:59: note: passing argument to parameter
here
Post by John Nielsen
Post by Maurizio Vairani
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?
I'm not set up to test-compile this against -current right now, so I'm
not sure if this is all that remains or just another breadcrumb on the
trail, but... try the attached patch.
-- Ian
--- iscsi.c.orig 2018-01-27 08:43:26.937858000 -0700
+++ iscsi.c 2018-01-27 09:15:39.631501000 -0700
@@ -1071,17 +1071,23 @@
}
-#if __FreeBSD_version >= 1100000
+#if __FreeBSD_version >= 1200051
+static void
+isboot_free_mbufext(struct mbuf *m)
+{
+ void *p = m->m_ext.ext_arg1;
+#elif __FreeBSD_version >= 1100000
static void
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
#elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
static int
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
+{
#else
static void
isboot_free_mbufext(void *p, void *optarg)
-#endif
{
+#endif
ISBOOT_TRACE("isboot_free_mbufext\n");
if (p == NULL)
Applying this patch the module is compilable, but when I use it I receive
a 'Fatal trap 12'. I will open a new discussion.

Thanks to all of you.
Maurizio
John Nielsen
2018-01-29 17:29:10 UTC
Permalink
Post by Ian Lepore
Post by John Nielsen
Post by Maurizio Vairani
[...]
--- 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?
I'm not set up to test-compile this against -current right now, so I'm
not sure if this is all that remains or just another breadcrumb on the
trail, but... try the attached patch.
-- Ian
--- iscsi.c.orig 2018-01-27 08:43:26.937858000 -0700
+++ iscsi.c 2018-01-27 09:15:39.631501000 -0700
@@ -1071,17 +1071,23 @@
}
-#if __FreeBSD_version >= 1100000
+#if __FreeBSD_version >= 1200051
+static void
+isboot_free_mbufext(struct mbuf *m)
+{
+ void *p = m->m_ext.ext_arg1;
+#elif __FreeBSD_version >= 1100000
static void
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
#elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
static int
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
+{
#else
static void
isboot_free_mbufext(void *p, void *optarg)
-#endif
{
+#endif
Thanks Ian. I think I ran in to a copy/paste issue on my end with the above but I can compile with this similar patch. Is it functionally equivalent to yours?

--- iscsi.c.orig 2015-11-05 09:50:51.000000000 -0700
+++ iscsi.c 2018-01-29 10:20:00.586277000 -0700
@@ -1070,9 +1070,11 @@
return (n);
}

-
-#if __FreeBSD_version >= 1100000
+#if __FreeBSD_version >= 1200051
static void
+isboot_free_mbufext(struct mbuf *m)
+#elif __FreeBSD_version >= 1100000
+static void
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
#elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
static int
@@ -1082,7 +1084,9 @@
isboot_free_mbufext(void *p, void *optarg)
#endif
{
-
+#if __FreeBSD_version >= 1200051
+ void *p = m->m_ext.ext_arg1;
+#endif
ISBOOT_TRACE("isboot_free_mbufext\n");
if (p == NULL)
#if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
Ian Lepore
2018-01-29 17:54:40 UTC
Permalink
Post by John Nielsen
Post by Ian Lepore
Post by John Nielsen
Post by Maurizio Vairani
Post by John Nielsen
[...]
--- 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-
Post by John Nielsen
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?
I'm not set up to test-compile this against -current right now, so I'm
not sure if this is all that remains or just another breadcrumb on the
trail, but... try the attached patch.
-- Ian
--- iscsi.c.orig 2018-01-27 08:43:26.937858000 -0700
+++ iscsi.c 2018-01-27 09:15:39.631501000 -0700
@@ -1071,17 +1071,23 @@
}
-#if __FreeBSD_version >= 1100000
+#if __FreeBSD_version >= 1200051
+static void
+isboot_free_mbufext(struct mbuf *m)
+{
+ void *p = m->m_ext.ext_arg1;
+#elif __FreeBSD_version >= 1100000
static void
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
#elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
static int
isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
+{
#else
static void
isboot_free_mbufext(void *p, void *optarg)
-#endif
{
+#endif
Thanks Ian. I think I ran in to a copy/paste issue on my end with the
above but I can compile with this similar patch. Is it functionally
equivalent to yours?
--- iscsi.c.orig 2015-11-05 09:50:51.000000000 -0700
+++ iscsi.c 2018-01-29 10:20:00.586277000 -0700
@@ -1070,9 +1070,11 @@
  return (n);
 }
 
-
-#if __FreeBSD_version >= 1100000
+#if __FreeBSD_version >= 1200051
 static void
+isboot_free_mbufext(struct mbuf *m)
+#elif __FreeBSD_version >= 1100000
+static void
 isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
 #elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
 static int
@@ -1082,7 +1084,9 @@
 isboot_free_mbufext(void *p, void *optarg)
 #endif
 {
-
+#if __FreeBSD_version >= 1200051
+ void *p = m->m_ext.ext_arg1;
+#endif
  ISBOOT_TRACE("isboot_free_mbufext\n");
  if (p == NULL)
 #if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000
Yeah, that looks the same.  But someone else reported that once you get
it to compile, it crashes at runtime, not necessarily in a way that
involves this part of the code.  I probably can't help much with that,
I don't know anything about iscsi, and don't have a setup for testing.

-- Ian

Loading...