target/i386/bhyve: fix FreeBSD build - correct include paths and meson build system#2
Open
cardozQ wants to merge 2 commits into
Open
target/i386/bhyve: fix FreeBSD build - correct include paths and meson build system#2cardozQ wants to merge 2 commits into
cardozQ wants to merge 2 commits into
Conversation
Headers boards.h, irq.h, and qdev-properties.h were moved to hw/core/ in recent QEMU versions. Update the bhyve source files to use the correct paths. Fixes build failure on FreeBSD: fatal error: 'hw/boards.h' file not found fatal error: 'hw/irq.h' file not found fatal error: 'hw/qdev-properties.h' file not found
Add declare_dependency with include_directories so bhyve source files can resolve QEMU internal headers. Also remove stale hardcoded local paths from original developer's machine (/home/chabi/freebsd-src/...) that were left commented out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix two build failures in the bhyve accelerator that prevent
compiling on FreeBSD with recent QEMU versions.
Changes
1. Fix include paths for hw/core headers
Headers
boards.h,irq.h, andqdev-properties.hwererelocated to
hw/core/in recent QEMU versions. The bhyvesource files were still referencing the old paths, causing
fatal build errors.
Files changed:
target/i386/bhyve/bhyve-all.c:hw/boards.h→hw/core/boards.htarget/i386/bhyve/bhyve-i8259.c:hw/irq.h→hw/core/irq.htarget/i386/bhyve/bhyve-ioapic.c:hw/qdev-properties.h→hw/core/qdev-properties.h2. Fix meson.build missing include_directories
The bhyve
meson.buildhad noinclude_directoriesconfigured,so QEMU's internal headers were not visible to the bhyve source
files during compilation. Added a
declare_dependencywith thecorrect relative paths to the QEMU source and include trees.
Also removed stale hardcoded absolute paths from the original
developer's local machine (
/home/chabi/freebsd-src/...) thatwere left behind as commented-out dead code.
Build errors fixed
Tested on
x86_64-softmmubhyveNotes
After these fixes, the fork builds successfully and
qemu-system-x86_64 -accel helpcorrectly listsbhyveas an available accelerator, confirming
vmm.kointegrationvia
libvmmapiis functional.