Skip to content

Bare make no longer builds hvisor: the default goal became kconfig_venv (#319) #403

Closed

Description

@agicy

Summary

Since PR #319 (refactor(build): migrate platform options from Cargo features to Kconfig, merged 2026-07-01, dev commit 1e0b413), running make without a target no longer builds hvisor — it only bootstraps the Kconfig Python venv and exits.

Reproduction

Reproduced on dev at be9ba59:

make          # no target: expected a full build, got only kconfig_venv
$ make -pn | grep -m1 '^\.DEFAULT_GOAL'
.DEFAULT_GOAL := kconfig_venv

When the venv bootstrap succeeds, make then has nothing left to do and exits 0 without building hvisor, so the regression is silent. (The bootstrap itself is guarded by if [ ! -x ... ], so a failed bootstrap still fails loudly.)

Root cause

all used to be the first target in Makefile, which made it the implicit default goal. PR #319 inserted the new kconfig_venv: and ensure_config: targets directly below the .PHONY line, i.e. above all:, so make started selecting kconfig_venv instead:

$ git show 1e0b413^:Makefile | grep -n '^all:'          # before: all was first
91:all: clean_check gen_cargo_config vscode $(hvisor_bin) check-hv-mem-overlap

$ git show 1e0b413:Makefile | grep -n '^kconfig_venv:'  # after: kconfig_venv is first
82:kconfig_venv:

.DEFAULT_GOAL is only set for the make ptest=<name> case, so for every other invocation the default goal depends on target order in the file — an invariant nothing enforces.

The same commit also replaced clean_check with ensure_config in all's prerequisites, leaving the clean_check: ensure_config wrapper unreferenced (dead code, same root cause: build entry points moved).

Impact

  • CI/Jenkins are unaffected: they always pass an explicit target (jenkins/ci_runner.py invokes make ... ci-run).
  • Bare make is what hvisor-book documents for several boards, and those commands now build nothing:
    • hvisor-book/src/chap02/Phytium-pi.md:17 — make BID=aarch64/phytium-pi LOG=info
    • hvisor-book/src/chap02/NUC14MNK.md:76 — make ARCH=x86_64 BOARD=nuc14mnk
    • hvisor-book/src/chap02/RK3588.md:45 — make BID=aarch64/rk3588
  • Because it exits 0, the failure is silent: a script that runs a bare make and then consumes target/.../hvisor.bin gets no fresh build. Targets that build on top of all (make run, make cp) rebuild anyway and are not affected.

Proposed fix

Move all back to the first target, set .DEFAULT_GOAL explicitly so target order can no longer change it, and drop the orphaned clean_check target. Patch submitted in the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions