Skip to content

igvm_c: fix pkg-config file and header installation#104

Merged
chris-oo merged 1 commit intomicrosoft:mainfrom
stefano-garzarella:fix-pkgconfig
Feb 23, 2026
Merged

igvm_c: fix pkg-config file and header installation#104
chris-oo merged 1 commit intomicrosoft:mainfrom
stefano-garzarella:fix-pkgconfig

Conversation

@stefano-garzarella
Copy link
Contributor

The generated igvm.pc had an empty Cflags field because cargo-c header support was fully disabled (enabled = false). Headers were also installed manually by the Makefile rather than through cargo-c.

Switch to generation = false so that cargo-c knows headers exist but does not run cbindgen (which is handled by the Makefile). Use install.include to point cargo-c directly at the cbindgen-generated headers in igvm_c/include/, and let cargo cinstall take care of header installation.

Add a dependency from $(LIBIGVM) on the generated headers so that cargo cbuild always runs after cbindgen.

@stefano-garzarella stefano-garzarella requested a review from a team as a code owner February 23, 2026 14:05
@stefano-garzarella
Copy link
Contributor Author

A good next step will be to have cargo-c generating the headers if possible, but out of scope of this fix I guess.

The generated igvm.pc had an empty Cflags field because
cargo-c header support was fully disabled (enabled = false).
Headers were also installed manually by the Makefile rather
than through cargo-c.

Switch to generation = false so that cargo-c knows headers
exist but does not run cbindgen (which is handled by the
Makefile).  Use install.include to point cargo-c directly at
the cbindgen-generated headers in igvm_c/include/, and let
cargo cinstall take care of header installation.

Add a dependency from $(LIBIGVM) on the generated headers so
that cargo cbuild always runs after cbindgen.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Copy link
Member

@chris-oo chris-oo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for the fix!

@chris-oo chris-oo merged commit 93884f4 into microsoft:main Feb 23, 2026
6 checks passed
luigix25 pushed a commit to luigix25/igvm that referenced this pull request Mar 5, 2026
The generated igvm.pc had an empty Cflags field because cargo-c header
support was fully disabled (enabled = false). Headers were also
installed manually by the Makefile rather than through cargo-c.

Switch to generation = false so that cargo-c knows headers exist but
does not run cbindgen (which is handled by the Makefile). Use
install.include to point cargo-c directly at the cbindgen-generated
headers in igvm_c/include/, and let cargo cinstall take care of header
installation.

Add a dependency from $(LIBIGVM) on the generated headers so that cargo
cbuild always runs after cbindgen.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants