Bug 248116

Summary: /usr/src/sys/conf/files is broken in 11.4-RELEASE – unable to build kernel with 'device ena'
Product: Base System Reporter: kudzu <kudzu>
Component: kernAssignee: Marcin Wojtas <mw>
Status: New ---    
Severity: Affects Only Me CC: cperciva
Priority: ---    
Version: 11.4-RELEASE   
Hardware: amd64   
OS: Any   
Description Flags
tarball with kernconf and output of 'make kernel' none

Description kudzu 2020-07-19 21:58:19 UTC
Created attachment 216584 [details]
tarball with kernconf and output of 'make kernel'

This kernconf compiled on 11.3 and fails on 11.4

The attached tarball has the kernel conf and the output of make kernel

The error occurs when attempting to link the kernel:

linking kernel 
ena.o: In function `ena_up':
ena.c:(.text+0x159a): undefined reference to `ena_deferred_mq_start'
ena.c:(.text+0x1f55): undefined reference to `ena_cleanup'
ena.o: In function `ena_attach':
ena.c:(.text+0x513a): undefined reference to `ena_mq_start'
ena.c:(.text+0x5149): undefined reference to `ena_qflush'
*** Error code 1

make[2]: stopped in /usr/obj/usr/src/sys/MAMELON
*** Error code 1

make[1]: stopped in /usr/src
*** Error code 1
Comment 1 kudzu 2020-07-19 22:06:08 UTC
This is a result of /usr/src/sys/conf/files not being updated to include




which were introduced in 11.4:
Comment 2 kudzu 2020-07-20 01:46:38 UTC
--- files.orig  2020-07-20 01:41:45.082203000 +0000
+++ files       2020-07-20 01:42:28.805665000 +0000
@@ -1661,6 +1661,10 @@
 dev/et/if_et.c                 optional et
 dev/ena/ena.c                  optional ena \
        compile-with "${NORMAL_C} -I$S/contrib"
+dev/ena/ena_datapath.c                 optional ena \
+       compile-with "${NORMAL_C} -I$S/contrib"
+dev/ena/ena_netmap.c           optional ena \
+       compile-with "${NORMAL_C} -I$S/contrib"
 dev/ena/ena_sysctl.c           optional ena \
        compile-with "${NORMAL_C} -I$S/contrib"
 contrib/ena-com/ena_com.c      optional ena
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-07-21 18:28:46 UTC
Over to committer of r361534.
Comment 4 Colin Percival freebsd_committer 2020-07-21 21:48:50 UTC
Looks like this is broken in HEAD and stable/12, not just stable/11.
Comment 5 commit-hook freebsd_committer 2020-07-28 10:08:57 UTC
A commit references this bug:

Author: mw
Date: Tue Jul 28 10:08:08 UTC 2020
New revision: 363638
URL: https://svnweb.freebsd.org/changeset/base/363638

  Fix ENA build when integrated into kernel

  Provide missing rules for ena_datapath.c and ena_netmap.c,
  which prevented the ENA driver from building.
  This issue was showing up only when building the driver statically
  into the kernel.

  PR: 248116
  Submitted by: Artur Rojek <ar@semihalf.com>
  MFC after: 2 weeks
  Differential Revision: https://reviews.freebsd.org/D25796
  Obtained from: Semihalf
  Sponsored by: Amazon, Inc.