Bug 208856

Summary: usr.sbin/bhyve: fails to build after r297778 with user-defined SYSDIR
Product: Base System Reporter: Jan Beich <jbeich>
Component: confAssignee: Peter Grehan <grehan>
Status: Closed FIXED    
Severity: Affects Only Me CC: grehan
Priority: --- Keywords: patch, regression
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
v1 none

Description Jan Beich freebsd_committer freebsd_triage 2016-04-17 10:11:49 UTC
Created attachment 169395 [details]
v1

According to /usr/share/mk/bsd.kmod.mk SYSDIR is supposed to point to kernel, not toplevel source directory. However, base r297778 confused SYSDIR with SRCDIR or SRC_BASE (ports) which leads to the following error if SYSDIR is defined in environment, make.conf, etc.

$ export SRC_BASE=/path/to/freebsd # only used by ports
$ export SYSDIR=$SRC_BASE/sys
$ make -C $SRC_BASE/usr.sbin/bhyve
make: don't know how to make vmm_instruction_emul.c. Stop
make: stopped in /a/freebsd/usr.sbin/bhyve
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-04-18 00:42:12 UTC
Over to committer of 297778.
Comment 2 Peter Grehan freebsd_committer freebsd_triage 2016-04-18 18:42:23 UTC
Thanks for the report: I'll change it to BHYVE_SYSROOT to avoid any conflicts with existing usage. It's only for bhyve developer convenience so doesn't need to use any existing definitions for source-tree location.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-04-20 17:05:51 UTC
A commit references this bug:

Author: grehan
Date: Wed Apr 20 17:05:32 UTC 2016
New revision: 298355
URL: https://svnweb.freebsd.org/changeset/base/298355

Log:
  Don't use SYSDIR to avoid conflicts with existing usage.
  Also, use SRCTOP to locate the top of the source tree
  instead of a relative path.

  PR:	208856

Changes:
  head/usr.sbin/bhyve/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-08-21 17:57:47 UTC
A commit references this bug:

Author: mav
Date: Sun Aug 21 17:57:32 UTC 2016
New revision: 304569
URL: https://svnweb.freebsd.org/changeset/base/304569

Log:
  MFC r298355:
  Don't use SYSDIR to avoid conflicts with existing usage.
  Also, use SRCTOP to locate the top of the source tree
  instead of a relative path.

  PR:	208856

Changes:
_U  stable/10/
  stable/10/usr.sbin/bhyve/Makefile