swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.75k stars 1.35k forks source link

[SR-14000] [SPM] [Windows10] TSCUtility/Triple.swift:152: Fatal error: could not determine host triple: malforme #4455

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-14000
Radar rdar://problem/72864701
Original Reporter lihansey (JIRA User)
Type Bug
Environment - virtualbox win10 on macOS. - How to setup up windows dev env? Maybe using [virtual-machines](https://developer.microsoft.com/zh-cn/windows/downloads/virtual-machines/) could save much time.
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: a9e4aa2dd6e2457cf344467517231e3b

Issue Description:

Hello dev:

when using [swift-windows-toolchain 2020 12 20 snapshot](https://dev.azure.com/compnerd/swift-build/_build/results?buildId=44103&view=artifacts&pathAsName=false&type=publishedArtifacts)

to build a demo project

[compnerd/swift-win32](https://github.com/compnerd/swift-win32)

by `SPM`, but `SPM` build fail like below:

```

c:\Users\User\Downloads\swift-win32>swift build TSCUtility/Triple.swift:152: Fatal error: could not determine host triple: malformed error: unable to invoke subcommand: C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift-build.exe ()

```

And

@compnerd said:

> I happened to come across this on GitHub actions once. I think that this is a bug in SPM, and is transient. Re-running the command seemed to be fine on GitHub at least. I think that reporting the issue on bugs.swift.org might be reasonable.

> [More detail](https://github.com/compnerd/swift-win32/issues/327#issuecomment-751395160)

The solution maybe metioned on :
google/swift-jupyter#103 (comment)

typesanitizer commented 3 years ago

@swift-ci create