Bug 248116 - /usr/src/sys/conf/files is broken in 11.4-RELEASE – unable to build kernel with 'device ena'
Summary: /usr/src/sys/conf/files is broken in 11.4-RELEASE – unable to build kernel wi...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.4-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Marcin Wojtas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-19 21:58 UTC by kudzu
Modified: 2023-12-31 02:09 UTC (History)
1 user (show)

See Also:


Attachments
tarball with kernconf and output of 'make kernel' (58.33 KB, application/x-gzip)
2020-07-19 21:58 UTC, kudzu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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

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

Stop.
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

ena_datapath.c

and

ena_netmap.c

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 freebsd_triage 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 freebsd_triage 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

Log:
  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.

Changes:
  head/sys/conf/files
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2023-12-31 02:09:04 UTC
^Triage: fixed back in 2020.