On 10/21/24 3:39 PM, [email protected] wrote:
Hi, pardon my ignorance. I'm trying to add some changes to the libvirt codebase 
(https://gitlab.com/libvirt/libvirt).
I've successfully built it with `meson setup /build` and a 
`compile_commands.json` was generated in the build folder. But vscode keeps 
showing that there are errors from trying to find certain files and 
identifiers. I have also copied the `compile_commands.json` to the root of the 
project with no success. I'm new to working on a large C codebase, as i'm 
mainly into Go. I have also installed the `meson.build` extension as prescribed 
in https://mesonbuild.com/IDE-integration.html, is there anything i'm missing?


I only used vscode once about 4 years ago, and have never used it for building libvirt, so I can't help you there, but I can tell you how I setup a build environment and build libvirt from a shell prompt. The following is on Fedora, and would work the same for any RHEL/CentOS derivative:

1) to make sure I have all necessary -devel packages and tools installed, I run:

   sudo dnf builddep libvirt

and allow it to install everything it asks to install.

2) to setup the build directory, I run:

   meson build -Dsystem=true

3) To just build the binaries:

   ninja -C build test

or 4) to build rpm packages that can be installed with dnf:

   (first commit any local changes)
   ninja -C build dist && rpmbuild -ta build/meson-dist/libvirt*.tar.xz

Reply via email to