qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] Add information how to fix common build error on Windows in s


From: Mateusz Krawczuk
Subject: [PATCH v2] Add information how to fix common build error on Windows in symlink-install-tree
Date: Thu, 4 May 2023 23:11:01 +0200

By default, Windows doesn't allow to create soft links for user account and 
only administrator is allowed to do this. To fix this problem you have to raise 
your permissions or enable Developer Mode, which available since Windows 10. 
Additional explanation when build fails will allow developer to fix the problem 
on his computer faster.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1386
Signed-off-by: Mateusz Krawczuk <mat.krawczuk@gmail.com>

v2:
  Removed unnecessary newlines to be consistent with QEMU coding styles.
Signed-off-by: Mateusz Krawczuk <mat.krawczuk@gmail.com>
---
 scripts/symlink-install-tree.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py
index 67cb86dd52..62fd609f32 100644
--- a/scripts/symlink-install-tree.py
+++ b/scripts/symlink-install-tree.py
@@ -7,12 +7,14 @@
 import subprocess
 import sys
 
+
 def destdir_join(d1: str, d2: str) -> str:
     if not d1:
         return d2
     # c:\destdir + c:\prefix must produce c:\destdir\prefix
     return str(PurePath(d1, *PurePath(d2).parts[1:]))
 
+
 introspect = os.environ.get('MESONINTROSPECT')
 out = subprocess.run([*introspect.split(' '), '--installed'],
                      stdout=subprocess.PIPE, check=True).stdout
@@ -28,5 +30,8 @@ def destdir_join(d1: str, d2: str) -> str:
         os.symlink(source, bundle_dest)
     except BaseException as e:
         if not isinstance(e, OSError) or e.errno != errno.EEXIST:
+            if os.name == 'nt':
+                print('Please enable Developer Mode to support soft link '
+                      'without Administrator permission')
             print(f'error making symbolic link {dest}', file=sys.stderr)
             raise e
-- 
2.40.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]