From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Andrew Melnychenko" <andrew@daynix.com>,
"Jason Wang" <jasowang@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
alex.bennee@linaro.org,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"Fabiano Rosas" <farosas@suse.de>,
"Kevin Wolf" <kwolf@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
qemu-arm@nongnu.org,
"Yuri Benditovich" <yuri.benditovich@daynix.com>,
manos.pitsidianakis@linaro.org, qemu-block@nongnu.org,
"Michael Roth" <michael.roth@amd.com>,
"Konstantin Kostiuk" <kkostiuk@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
gustavo.romero@linaro.org,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH 4/7] docs/devel: add information on how to setup build environments
Date: Tue, 19 Nov 2024 09:24:23 +0000 [thread overview]
Message-ID: <ZzxZRwXAIlMt6SNA@redhat.com> (raw)
In-Reply-To: <20241118172357.475281-5-pierrick.bouvier@linaro.org>
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
>
> diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
> index 6102f00aec0..c1ea53db834 100644
> --- a/docs/about/build-platforms.rst
> +++ b/docs/about/build-platforms.rst
> @@ -29,6 +29,9 @@ The `Repology`_ site is a useful resource to identify
> currently shipped versions of software in various operating systems,
> though it does not cover all distros listed below.
>
> +You can find how to install build dependencies for different systems on the
> +:ref:`setup-build-env` page.
> +
> Supported host architectures
> ----------------------------
>
> @@ -130,7 +133,6 @@ Optional build dependencies
> cross compilation using ``docker`` or ``podman``, or to use pre-built
> binaries distributed with QEMU.
>
> -
> Windows
> -------
>
> diff --git a/docs/devel/build-environment.rst b/docs/devel/build-environment.rst
> new file mode 100644
> index 00000000000..d9a66f5fcc6
> --- /dev/null
> +++ b/docs/devel/build-environment.rst
> @@ -0,0 +1,114 @@
> +
> +.. _setup-build-env:
> +
> +Setup build environment
> +=======================
> +
> +QEMU uses a lot of dependencies on the host system. glib2 is used everywhere in
> +the code base, and most of the other dependencies are optional.
> +
> +We present here simple instructions to enable native builds on most popular
> +systems.
> +
> +You can find additional instructions on `QEMU wiki <https://wiki.qemu.org/>`_:
> +
> +- `Linux <https://wiki.qemu.org/Hosts/Linux>`_
> +- `MacOS <https://wiki.qemu.org/Hosts/Mac>`_
> +- `Windows <https://wiki.qemu.org/Hosts/W32>`_
> +- `BSD <https://wiki.qemu.org/Hosts/BSD>`_
We generally suffer from having information spread over multiple sources,
giving us the burden of keeping the different places consistent, which we
pretty consistently fail at.
It is a good think to add build env docs to qemu.git where we actually
have oversight / review to catch mistakes. If we do this though, IMHO,
we should be deleting the wiki pages and making them into 302 redirects
to our new in-tree docs.
> +
> +Linux
> +-----
> +
> +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.
> +
> +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
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-11-19 9:25 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 17:23 [PATCH 0/7] Enhance documentation for new developers Pierrick Bouvier
2024-11-18 17:23 ` [PATCH 1/7] docs/devel: remove dead video link for sourcehut submit process Pierrick Bouvier
2024-11-19 8:25 ` Thomas Huth
2024-11-18 17:23 ` [PATCH 2/7] docs/devel: add git-publish for patch submitting Pierrick Bouvier
2024-11-19 8:41 ` Marcin Juszkiewicz
2024-11-19 9:12 ` Daniel P. Berrangé
2024-11-20 6:29 ` Pierrick Bouvier
2024-11-20 6:25 ` Pierrick Bouvier
2024-11-20 9:51 ` Alex Bennée
2024-11-20 10:01 ` Daniel P. Berrangé
2024-11-19 9:04 ` Daniel P. Berrangé
2024-11-20 21:45 ` Pierrick Bouvier
2024-11-18 17:23 ` [PATCH 3/7] docs/devel: add b4 for patch retrieval Pierrick Bouvier
2024-11-19 9:14 ` Daniel P. Berrangé
2024-11-19 9:56 ` Marcin Juszkiewicz
2024-11-19 10:07 ` Daniel P. Berrangé
2024-11-19 10:40 ` Marcin Juszkiewicz
2024-11-18 17:23 ` [PATCH 4/7] docs/devel: add information on how to setup build environments Pierrick Bouvier
2024-11-19 9:24 ` Daniel P. Berrangé [this message]
2024-11-19 11:08 ` Alex Bennée
2024-11-19 11:16 ` Daniel P. Berrangé
2024-11-20 21:58 ` Pierrick Bouvier
2024-11-18 17:23 ` [PATCH 5/7] docs: add a codebase section Pierrick Bouvier
2024-12-03 15:53 ` Peter Maydell
2024-12-03 17:22 ` Alex Bennée
2024-12-03 17:46 ` Peter Maydell
2024-12-03 19:35 ` Pierrick Bouvier
2024-12-04 8:58 ` Daniel P. Berrangé
2024-12-03 21:02 ` Pierrick Bouvier
2024-11-18 17:23 ` [PATCH 6/7] docs: add a glossary Pierrick Bouvier
2024-12-03 17:37 ` Peter Maydell
2024-12-03 18:10 ` Alex Bennée
2024-12-03 19:37 ` Pierrick Bouvier
2024-12-03 20:32 ` Pierrick Bouvier
2024-12-05 15:23 ` Peter Maydell
2024-12-05 19:21 ` Pierrick Bouvier
2024-11-18 17:23 ` [PATCH 7/7] docs: add a how to section Pierrick Bouvier
2024-11-19 9:29 ` Daniel P. Berrangé
2024-11-20 22:05 ` Pierrick Bouvier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZzxZRwXAIlMt6SNA@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=andrew@daynix.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=gustavo.romero@linaro.org \
--cc=jasowang@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=kwolf@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
--cc=yuri.benditovich@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).