Hi,
I continue to experiment building Swift command line tools apps on macOS, Linux and Windows.
My setup is using Parallels Desktop running Windows 10 and Ubuntu VMs the building from a mac shared folder.
So far so good building for macOS and Linux but I have problem with Windows.
Using Windows I can build with sources on Windows drive C: but the same build failed if done from the shared folder.
Following is a very simple test case.
Windows prompt used is the Administrator x64 Native Tools Command Prompt for VS 2019.
===========================================================
Success Test Case
Building from drive C: folder
===========================================================
C:\Windows\System32
C:\Windows\System32>swift --version
compnerd.org Swift version 5.6.2 (swift-5.6.2-RELEASE)
Target: x86_64-unknown-windows-msvc
C:\Windows\System32>cd \
C:>mkdir swifttest
C:>cd swifttest
C:\swifttest>swift package init --type executable
Creating executable package: swifttest
Creating Package.swift
Creating README.md
Creating .gitignore
Creating Sources/
Creating Sources\swifttest\main.swift
Creating Tests/
Creating Tests\swifttestTests/
Creating Tests\swifttestTests\swifttestTests.swift
C:\swifttest>swift build
Building for debugging...
[1/3] Compiling swifttest main.swift
[2/4] Merging module swifttest
[3/4] Wrapping AST for swifttest for debugging
[4/4] Linking C:\swifttest.build\x86_64-unknown-windows-msvc\debug\swifttest.exe
Build complete! (3.17s)
C:\swifttest>
===========================================================
Failed Test Case
Building from drive S: folder
S: is the Parallels Desktop \\Mac\home shared folder
===========================================================
C:\Windows\System32>net use s: \\Mac\home
C:\Windows\System32>s:
S:>
S:>cd Documents
S:\Documents>mkdir swifttest
S:\Documents>cd swifttest
S:\Documents\swifttest>swift package init --type executable
Creating executable package: swifttest
Creating Package.swift
Creating README.md
Creating .gitignore
Creating Sources/
Creating Sources\swifttest\main.swift
Creating Tests/
Creating Tests\swifttestTests/
Creating Tests\swifttestTests\swifttestTests.swift
S:\Documents\swifttest>swift build
Building for debugging...
[1/3] Compiling swifttest main.swift
:0: error: unable to rename temporary 'S:\Documents\swifttest.build\x86_64-unknown-windows-msvc\debug\ModuleCache\JOUN6Y2K3VMW\visualc-BBG7FBMY5N21-86bf3e38.pcm.tmp' to output file 'S:\Documents\swifttest.build\x86_64-unknown-windows-msvc\debug\ModuleCache\JOUN6Y2K3VMW\visualc-BBG7FBMY5N21.pcm': 'The parameter is incorrect.'
:1:10: note: in file included from :1:
#include "AssertionReporting.h"
^
C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/AssertionReporting.h:16:10: note: in file included from C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/AssertionReporting.h:16:
#include "SwiftStdint.h"
^
C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/SwiftStdint.h:28:10: error: could not build module 'visualc'
#include <stdint.h>
^
:0: error: could not build C module 'SwiftShims'
S:\Documents\swifttest>
===========================================================
Any ideas ?