[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/7] docs/devel: add information on how to setup build enviro
From: |
Alex Bennée |
Subject: |
Re: [PATCH 4/7] docs/devel: add information on how to setup build environments |
Date: |
Tue, 19 Nov 2024 11:08:12 +0000 |
User-agent: |
mu4e 1.12.7; emacs 29.4 |
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Mon, Nov 18, 2024 at 09:23:54AM -0800, Pierrick Bouvier wrote:
>> MacOS and Linux are straightforward, but Windows needs a bit more
>> details.
>>
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>> docs/about/build-platforms.rst | 4 +-
>> docs/devel/build-environment.rst | 114 +++++++++++++++++++++++++++++++
>> docs/devel/index-build.rst | 1 +
>> 3 files changed, 118 insertions(+), 1 deletion(-)
>> create mode 100644 docs/devel/build-environment.rst
>>
<snip>
>> +Fedora
>> +++++++
>> +
>> +::
>> +
>> + sudo dnf update && sudo dnf builddep qemu
>> +
>> +Debian/Ubuntu
>> ++++++++++++++
>> +
>> +You first need to enable `Sources List
>> <https://wiki.debian.org/SourcesList>`_.
>> +Then, use apt to install dependencies:
>> +
>> +::
>> +
>> + sudo apt update && sudo apt build-dep qemu
>> +
>> +MacOS
>> +-----
>> +
>> +You first need to install `Homebrew <https://brew.sh/>`_. Then, use it to
>> +install dependencies:
>> +
>> +::
>> +
>> + brew update && brew install $(brew deps --include-build qemu)
>
>
> The downside in recommending the 'build dep' approach is that it misses
> out on deps that have been newly introduced in qemu.git, since whatever
> old version of QEMU the distros are shipping. It also misses deps for
> any features the distro vendor has decided to exclude.
>
> Can we put a caveat describing this limitation at the top, so that users
> have pointer if things don't quite go the way we expected.
At a recent QEMU workshop I presented I pointed to lcitool as a way to
list the minimal dependencies QEMU needs:
./tests/lcitool/libvirt-ci/bin/lcitool variables -f yaml debian-12
./tests/lcitool/projects/qemu-minimal.yml
It wouldn't be the hardest thing to extend lcitool to generate a pkg
install line instead of a list. Although I notice it fails with the full
set of dependancies:
✗ ./tests/lcitool/libvirt-ci/bin/lcitool -d tests/lcitool variables -f shell
debian-12 ./tests/lcitool/projects/qemu.yml
Package generic name resolution error: Package libcbor not present in mappings
I note there is already an "install" action but I'm wary of what it does.
>
>> +
>> +Windows
>> +-------
>> +
>> +You first need to install `MSYS2 <https://www.msys2.org/>`_.
>> +MSYS2 offers `different environments
>> <https://www.msys2.org/docs/environments/>`_.
>> +x86_64 environments are based on GCC, while aarch64 is based on Clang.
>> +
>> +We recommend to use MINGW64 for windows-x86_64 and CLANGARM64 for
>> windows-aarch64
>> +(only available on windows-aarch64 hosts).
>
> Does CLANGARM64 really work with QEMU ? We go out of our way to actively
> block the use of CLang for Windows because of its lack of support for
> 'gcc_struct' attributes, so I would have expected it to fail
>
>> +
>> +Then, you can open a windows shell, and enter msys2 env using:
>> +
>> +::
>> +
>> + c:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64
>> + # Replace -ucrt64 by -clangarm64 or -ucrt64 for other environments.
>> +
>> +MSYS2 package manager does not offer a built-in way to install build
>> +dependencies. You can start with this list of packages using pacman:
>> +
>
> With regards,
> Daniel
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 2/7] docs/devel: add git-publish for patch submitting, Daniel P . Berrangé, 2024/11/19