# Error using swift 6.0.1 on Windows 11, ARM, running as a VM on a MacBook Pro m1

**URL:** <https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164>\
**Category:** Using Swift\
**Tags:** windows\
**Created:** [October 4, 2024, 6:00pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164 "2024-10-04T18:00:02Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdeda](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kdeda/32/14938_2.png) [@kdeda](https://forums.swift.org/u/kdeda)\
**Post date:** [October 4, 2024, 6:00pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/1 "2024-10-04T18:00:02Z")

</div>

I have ventured to experiment with swift 6.0.1 on a Windows 11 (ARM) vm that runs in a Mac Book Pro M1 chip.  
I have followed the simple install instructions using either manual config or winget cli.

And I can't get "swift build" on a simple hello world.

```swift
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\cdeda> cd C:\Users\cdeda\Developer\hello_world
PS C:\Users\cdeda\Developer\hello_world> swift build
error: 'hello_world': Invalid manifest (compiled with: ["C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\bin\\swiftc.exe", "-vfsoverlay", "C:\\Users\\cdeda\\AppData\\Local\\Temp\\TemporaryDirectory.uNpAeu\\vfs.yaml", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-lPackageDescription", "-sdk", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\SDKs\\Windows.sdk\\", "-libc", "MD", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\aarch64", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\aarch64", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\Testing-development\\usr\\lib\\swift\\windows", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\Testing-development\\usr\\lib\\swift\\windows\\aarch64", "-use-ld=lld", "-swift-version", "6", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-package-description-version", "6.0.0", "C:\\Users\\cdeda\\Developer\\hello_world\\Package.swift", "-o", "C:\\Users\\cdeda\\AppData\\Local\\Temp\\TemporaryDirectory.0L7Xlo\\hello_world-manifest.exe"])
<module-includes>:1:10: note: in file included from <module-includes>:1:
 1 | #include "AssertionReporting.h"
   | `- note: in file included from <module-includes>:1:
 2 | #include "CoreFoundationShims.h"
 3 | #include "EmbeddedShims.h"

```

 ![Screenshot 2024-10-04 at 2.03.58 PM](https://global.discourse-cdn.com/swift/original/3X/3/f/3fce8a0d29c68e886da168337f4181aa499e8f8f.png)

---

<div class="post-metadata">

**Author:** ![kdeda](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kdeda/32/14938_2.png) [@kdeda](https://forums.swift.org/u/kdeda)\
**Post date:** [October 4, 2024, 6:34pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/2 "2024-10-04T18:34:06Z")

</div>

Tweaked the installed VS packages a bit and get a new error

```swift
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\cdeda> cd C:\Users\cdeda\Developer\hello_world
PS C:\Users\cdeda\Developer\hello_world> swift build
error: 'hello_world': Invalid manifest (compiled with: ["C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\bin\\swiftc.exe", "-vfsoverlay", "C:\\Users\\cdeda\\AppData\\Local\\Temp\\TemporaryDirectory.UHQwlF\\vfs.yaml", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-lPackageDescription", "-sdk", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\SDKs\\Windows.sdk\\", "-libc", "MD", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\aarch64", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\aarch64", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\Testing-development\\usr\\lib\\swift\\windows", "-L", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Platforms\\6.0.1\\Windows.platform\\Developer\\Library\\Testing-development\\usr\\lib\\swift\\windows\\aarch64", "-use-ld=lld", "-swift-version", "6", "-I", "C:\\Users\\cdeda\\AppData\\Local\\Programs\\Swift\\Toolchains\\6.0.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-package-description-version", "6.0.0", "C:\\Users\\cdeda\\Developer\\hello_world\\Package.swift", "-o", "C:\\Users\\cdeda\\AppData\\Local\\Temp\\TemporaryDirectory.Hzsbto\\hello_world-manifest.exe"])
error: link command failed with exit code 1 (use -v to see invocation)
lld-link: error: could not open 'msvcrt.lib': no such file or directory
lld-link: error: could not open 'oldnames.lib': no such file or directory
lld-link: error: could not open 'msvcprt.lib': no such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

```

![Screenshot 2024-10-04 at 2.32.29 PM](https://global.discourse-cdn.com/swift/original/3X/4/e/4ec1fa8476018361acaa89e188e519cc522dac84.png)

---

<div class="post-metadata">

**Author:** ![dima\_kozhinov](https://avatars.discourse-cdn.com/v4/letter/d/258eb7/32.png) [@dima\_kozhinov](https://forums.swift.org/u/dima_kozhinov)\
**Post date:** [October 4, 2024, 9:48pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/3 "2024-10-04T21:48:47Z")

</div>

To be honest, I don't know much about Windows 11 (ARM) and wonder where did you get Swift toolchain for it (or is it able to run x86\_64 binaries?). Aside from the ARM specifics, I suggest the following:

You don't need Windows 10 SDK. Windows 11 SDK is the only one you need. Applications created with it [will work under Windows 10 too](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). The recommended version of Windows 11 SDK at the moment is 10.0.22621 (component name `Microsoft.VisualStudio.Component.Windows11SDK.22621`), see [here](https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022).

---

<div class="post-metadata">

**Author:** ![Erik\_Aigner](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@Erik\_Aigner](https://forums.swift.org/u/Erik_Aigner)\
**Post date:** [October 5, 2024, 2:31pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/4 "2024-10-05T14:31:11Z")

</div>

I have a related issue, `swift` will complain that it can't find the standard library when I try to install it in a Windows 11 `arm` virtual machine.

Works on my `x86_64` PC though (real hardware).

---

<div class="post-metadata">

**Author:** ![kdeda](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kdeda/32/14938_2.png) [@kdeda](https://forums.swift.org/u/kdeda)\
**Post date:** [October 8, 2024, 8:09pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/5 "2024-10-08T20:09:25Z")

</div>

I suspect at this time there are 3 engineers wanting to experiment with Swift on Windows ARM 🙂

The main reason for pushing ARM is the screaming fast apple silicon, it makes this MBP intel (2019) look like a pentium.

---

<div class="post-metadata">

**Author:** ![compnerd](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/compnerd/32/2165_2.png) [@compnerd](https://forums.swift.org/u/compnerd)\
**Post date:** [October 9, 2024, 7:13am UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/6 "2024-10-09T07:13:07Z")

</div>

I suspect that the reason that you get that error is because you are installing the x64 toolchain image and running under emulation rather than installing the ARM64 toolchain.

---

<div class="post-metadata">

**Author:** ![kdeda](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kdeda/32/14938_2.png) [@kdeda](https://forums.swift.org/u/kdeda)\
**Post date:** [October 11, 2024, 2:59pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/7 "2024-10-11T14:59:57Z")

</div>

Good nudge. I'm by no means a windows expert.  
After tripple checking the ingredients. I'm compiling and running using swift cli.

This is amazing.  
Thank you swift team.  
It feels like OpenStep on windows, 1994.

Here is what you need to have swift 6.0.1 work on Windows ARM under virtualization on Mac M1.  
These assume a fresh VM, with no pre-existing dev tools.

1. Make sure to have the latest VisualStudio Community ARM installed.
2. Make sure to install the required VS swift components for ARM.  
Windows 11 SDK (10.0.261000)  
MSVC v143 VS 2022 C++ ARM64/ARM64EC build tools (latest)
3. Make sure to install the swift ARM tool chain.  
`swift --version`  
Swift version 6.0.1 (swift-6.0.1-RELEASE)  
Target: aarch64-unknown-windows-msvc

Enjoy.

---

<div class="post-metadata">

**Author:** ![kdeda](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kdeda/32/14938_2.png) [@kdeda](https://forums.swift.org/u/kdeda)\
**Post date:** [October 11, 2024, 3:13pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/8 "2024-10-11T15:13:32Z")

</div>

The only know bug I know using swift 6.0.1 official is the

```swift
warning: unable to create symbolic link at ...

```

> <https://github.com/swiftlang/swift-package-manager/issues/7965>
>
> \### Description
> 
> On a Windows 11 machine, either \`swift build\` or \`swift run\` wo…rk the first time, but on repeated execution they report an error:
> 
> \> Build of product 'win32test' complete! (0.10s)
> \> warning: unable to create symbolic link at C:\\src\\scratch\\.build\\debug: Error Domain=NSCocoaErrorDomain Code=516 "A file with the same name already exists."
> \> 
> 
> !\[image\](https://github.com/user-attachments/assets/ddef293b-a44c-488b-8df0-9b8008bbb53e)
> 
> 
> \### Reproduction
> 
> Run:
> 
> \`\`\`text
> swift package init --type executable --name win32test
> swift build
> swift run
> \`\`\`
> 
> \### Expected behavior
> 
> Expected that repeated \`swift run\` invocations are idempotent.
> 
> \### Environment
> 
> Swift version 6.0-dev (LLVM c3efe9282719c35, Swift b163fed2b3101e0)
> Target: aarch64-unknown-windows-msvc
> 
> \### Additional information
> 
> \_No response\_

---

<div class="post-metadata">

**Author:** ![compnerd](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/compnerd/32/2165_2.png) [@compnerd](https://forums.swift.org/u/compnerd)\
**Post date:** [October 11, 2024, 3:42pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/9 "2024-10-11T15:42:25Z")

</div>

Enabling developer mode is required (or you can use a GPO to grant yourself the `SeCreateSymbolicLinkPrivelege` privilege). This isn’t really a bug but a security restriction on windows.

---

<div class="post-metadata">

**Author:** ![Erik\_Aigner](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@Erik\_Aigner](https://forums.swift.org/u/Erik_Aigner)\
**Post date:** [December 18, 2024, 8:51am UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/10 "2024-12-18T08:51:40Z")

</div>

Developer mode is on.

Anyway there is the bugreport from Oct 5: [Swift toolchain does not work with target aarch64-unknown-windows-msvc · Issue #76881 · swiftlang/swift · GitHub](https://github.com/swiftlang/swift/issues/76881)

---

<div class="post-metadata">

**Author:** ![sspringer](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sspringer](https://forums.swift.org/u/sspringer)\
**Post date:** [December 18, 2024, 9:47am UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/11 "2024-12-18T09:47:00Z")

</div>

> [@Erik\_Aigner](#):
>
> Developer mode is on.

The devopler mode might not be enough if the SeCreateSymbolicLinkPrivilege is suppressed by other controls, which might be the case in corporate environments, test via `mklink newfile oldfile` , creating a symbolic link file named `newfile` pointing to `oldfile`.

---

<div class="post-metadata">

**Author:** ![Erik\_Aigner](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@Erik\_Aigner](https://forums.swift.org/u/Erik_Aigner)\
**Post date:** [December 20, 2024, 6:01pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/12 "2024-12-20T18:01:46Z")

</div>

Works. But that was never my issue anyway. See my bug report.

---

<div class="post-metadata">

**Author:** ![hjyamauchi](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hjyamauchi/32/30083_2.png) [@hjyamauchi](https://forums.swift.org/u/hjyamauchi)\
**Post date:** [December 20, 2024, 6:11pm UTC](https://forums.swift.org/t/error-using-swift-6-0-1-on-windows-11-arm-running-as-a-vm-on-a-macbook-pro-m1/75164/13 "2024-12-20T18:11:04Z")

</div>

I suspect that the swift toolchain installed via winget is an x64 toolchain, as opposed to a native arm64 toolchain. I'd recommend installing [https://download.swift.org/swift-6.0.3-release/windows10-arm64/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-windows10-arm64.exe](https://download.swift.org/swift-6.0.3-release/windows10-arm64/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-windows10-arm64.exe) from [swift.org](http://swift.org).
