qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] docs: Add caveats for Windows as the build platform
@ 2022-07-19 13:50 Bin Meng
  2022-07-19 14:00 ` Akihiko Odaki
  2022-07-20  6:31 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Bin Meng @ 2022-07-19 13:50 UTC (permalink / raw)
  To: Akihiko Odaki, Laurent Vivier, Peter Maydell, Stefan Weil,
	qemu-devel
  Cc: Bin Meng

From: Bin Meng <bin.meng@windriver.com>

Commit cf60ccc3306c ("cutils: Introduce bundle mechanism") introduced
a Python script to populate a bundle directory using os.symlink() to
point to the binaries in the pc-bios directory of the source tree.
Commit 882084a04ae9 ("datadir: Use bundle mechanism") removed previous
logic in pc-bios/meson.build to create a link/copy of pc-bios binaries
in the build tree so os.symlink() is the way to go.

However os.symlink() may fail [1] on Windows if an unprivileged Windows
user started the QEMU build process, which results in QEMU executables
generated in the build tree not able to load the default BIOS/firmware
images due to symbolic links not present in the bundle directory.

This commits updates the documentation by adding such caveats for users
who want to build QEMU on the Windows platform.

[1] https://docs.python.org/3/library/os.html#os.symlink

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
---

Changes in v2:
- fix typo of "preferred"

 docs/about/build-platforms.rst | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
index ebde20f981..6b8496c430 100644
--- a/docs/about/build-platforms.rst
+++ b/docs/about/build-platforms.rst
@@ -94,8 +94,16 @@ not tested anymore, so it is recommended to use one of the latest versions of
 Windows instead.
 
 The project supports building QEMU with current versions of the MinGW
-toolchain, either hosted on Linux (Debian/Fedora) or via MSYS2 on Windows.
+toolchain, either hosted on Linux (Debian/Fedora) or via `MSYS2`_ on Windows.
+A more recent Windows version is always preferred as it is less likely to have
+problems with building via MSYS2. The building process of QEMU involves some
+Python scripts that call os.symlink() which needs special attention for the
+build process to successfully complete. On newer versions of Windows 10,
+unprivileged accounts can create symlinks if Developer Mode is enabled.
+When Developer Mode is not available/enabled, the SeCreateSymbolicLinkPrivilege
+privilege is required, or the process must be run as an administrator.
 
 .. _Homebrew: https://brew.sh/
 .. _MacPorts: https://www.macports.org/
+.. _MSYS2: https://www.msys2.org/
 .. _Repology: https://repology.org/
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: Add caveats for Windows as the build platform
  2022-07-19 13:50 [PATCH v2] docs: Add caveats for Windows as the build platform Bin Meng
@ 2022-07-19 14:00 ` Akihiko Odaki
  2022-07-20  6:31 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Akihiko Odaki @ 2022-07-19 14:00 UTC (permalink / raw)
  To: Bin Meng, Laurent Vivier, Peter Maydell, Stefan Weil, qemu-devel; +Cc: Bin Meng

Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>

On 2022/07/19 22:50, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
> 
> Commit cf60ccc3306c ("cutils: Introduce bundle mechanism") introduced
> a Python script to populate a bundle directory using os.symlink() to
> point to the binaries in the pc-bios directory of the source tree.
> Commit 882084a04ae9 ("datadir: Use bundle mechanism") removed previous
> logic in pc-bios/meson.build to create a link/copy of pc-bios binaries
> in the build tree so os.symlink() is the way to go.
> 
> However os.symlink() may fail [1] on Windows if an unprivileged Windows
> user started the QEMU build process, which results in QEMU executables
> generated in the build tree not able to load the default BIOS/firmware
> images due to symbolic links not present in the bundle directory.
> 
> This commits updates the documentation by adding such caveats for users
> who want to build QEMU on the Windows platform.
> 
> [1] https://docs.python.org/3/library/os.html#os.symlink
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: Stefan Weil <sw@weilnetz.de>
> ---
> 
> Changes in v2:
> - fix typo of "preferred"
> 
>   docs/about/build-platforms.rst | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
> index ebde20f981..6b8496c430 100644
> --- a/docs/about/build-platforms.rst
> +++ b/docs/about/build-platforms.rst
> @@ -94,8 +94,16 @@ not tested anymore, so it is recommended to use one of the latest versions of
>   Windows instead.
>   
>   The project supports building QEMU with current versions of the MinGW
> -toolchain, either hosted on Linux (Debian/Fedora) or via MSYS2 on Windows.
> +toolchain, either hosted on Linux (Debian/Fedora) or via `MSYS2`_ on Windows.
> +A more recent Windows version is always preferred as it is less likely to have
> +problems with building via MSYS2. The building process of QEMU involves some
> +Python scripts that call os.symlink() which needs special attention for the
> +build process to successfully complete. On newer versions of Windows 10,
> +unprivileged accounts can create symlinks if Developer Mode is enabled.
> +When Developer Mode is not available/enabled, the SeCreateSymbolicLinkPrivilege
> +privilege is required, or the process must be run as an administrator.
>   
>   .. _Homebrew: https://brew.sh/
>   .. _MacPorts: https://www.macports.org/
> +.. _MSYS2: https://www.msys2.org/
>   .. _Repology: https://repology.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: Add caveats for Windows as the build platform
  2022-07-19 13:50 [PATCH v2] docs: Add caveats for Windows as the build platform Bin Meng
  2022-07-19 14:00 ` Akihiko Odaki
@ 2022-07-20  6:31 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-07-20  6:31 UTC (permalink / raw)
  To: Bin Meng
  Cc: Akihiko Odaki, Laurent Vivier, Peter Maydell, Stefan Weil,
	qemu-devel, Bin Meng

Queued, thanks.

Paolo




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-20  6:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 13:50 [PATCH v2] docs: Add caveats for Windows as the build platform Bin Meng
2022-07-19 14:00 ` Akihiko Odaki
2022-07-20  6:31 ` Paolo Bonzini

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).