Bug 241047 - iflib: fail to compile kernel on FreeBSD 12.1-BETA2: Fatal error: ifdi_if.h file not found.
Summary: iflib: fail to compile kernel on FreeBSD 12.1-BETA2: Fatal error: ifdi_if.h f...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net mailing list
URL:
Keywords: needs-qa, regression
Depends on:
Blocks: 240700
  Show dependency treegraph
 
Reported: 2019-10-03 22:17 UTC by rashey
Modified: 2019-10-04 02:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rashey 2019-10-03 22:17:59 UTC
Hi,

Two issues occurred to me on FreeBSD 12.1-BETA2.

The first issue is that an iflib device is statically compiled into GENERIC kernel while GENERIC configuration file for amd64 architecture does not contain the device in /usr/src/sys/amd64/conf/GENERIC, it makes a lot of confusion and causes an error during kernel compiling.

The second issue is that I can not compile kernel with iflib module because of the same error.

# uname -a
FreeBSD test 12.1-BETA2 FreeBSD 12.1-BETA2 r352780 GENERIC  amd64

# cat /usr/src/sys/amd64/conf/ROUTER
include         GENERIC
ident           ROUTER

makeoptions     MODULES_OVERRIDE="pf pflog iflib"

options         PF_DEFAULT_TO_DROP
options         ALTQ
options         ALTQ_HFSC
options         ALTQ_RED
options         ALTQ_RIO
options         ALTQ_NOPCC

# rm -R /usr/obj/* ; cd /usr/src ; make KERNCONF=ROUTER buildkernel
...
cc -target x86_64-unknown-freebsd12.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing  -g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/
contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD  -MF.depend.if_em.o -MTif_em.o -fdebug-
prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -W
missing-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 -W
no-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999 -Werror  /usr/src/sys/dev/e1000/if_em.c -I/usr/src/sys/dev/e1000
In file included from /usr/src/sys/dev/e1000/if_em.c:30:
/usr/src/sys/dev/e1000/if_em.h:91:10: fatal error: 'ifdi_if.h' file not found
#include "ifdi_if.h"
         ^~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/ROUTER
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src