Comments (3)
I hope that the issue is fixed in c7557be, if the build passes it would be tagged as a new 5.3 snapshot tonight. Let's wait and see.
from swift.
I think this exact issue will be fixed in tonight's snapshot, at least not able to reproduce it locally anymore thanks to c7557be. Nevertheless, there's a different issue with SwiftPM on macOS, which prevents it from working properly. I think it has something to be with how libPackageDescription.dylib
that belongs to SwiftPM is compiled. If you completely clean your .build
directory (for any package, not just Tokamak) you get this error:
error: manifest parse error(s):
<unknown>
The breakage happens when the Package.swift
manifest path is compiled, you can infer by passing the -v
flag to swift build
and checking where exactly the error occurs:
/Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-13-a/usr/bin/swiftc -L /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-13-a/usr/lib/swift/pm/4_2 -lPackageDescription -Xlinker -rpath -Xlinker /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-13-a/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.15 -swift-version 5 -I /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-13-a/usr/lib/swift/pm/4_2 -sdk /Applications/Xcode-11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -package-description-version 5.2.0 /Users/maxd/Documents/Tokamak/Package.swift -o /var/folders/r4/5d00qxmn0rz1v00hb9lv3fdr0000gn/T/TemporaryDirectory.MvuBHz/tokamak-manifest
/var/folders/r4/5d00qxmn0rz1v00hb9lv3fdr0000gn/T/TemporaryDirectory.MvuBHz/tokamak-manifest -fileno 7 sandbox-exec -p '(version 1)
(deny default)
(import "system.sb")
(allow file-read*)
(allow process*)
(allow sysctl*)
(allow file-write*
(regex #"^/private/var/tmp/org\.llvm\.clang.*")
(regex #"^/var/folders/r4/5d00qxmn0rz1v00hb9lv3fdr0000gn/T/org\.llvm\.clang.*")
(regex #"^/private/var/folders/r4/5d00qxmn0rz1v00hb9lv3fdr0000gn/T/org\.llvm\.clang.*")
(regex #"^/private/var/folders/r4/5d00qxmn0rz1v00hb9lv3fdr0000gn/C/org\.llvm\.clang.*")
(subpath "/Users/maxd/Documents/Tokamak/.build")
)
'
/Users/maxd/Documents/Tokamak: error: manifest parse error(s):
<unknown>
Note that I'm using 2020-06-13-a
snapshot in the above output, that's the oldest snapshot where the issue is reproduced. 2020-06-12-a
snapshot is working fine. I've also tried to compile the manifest file separately by 2020-06-13-a
and 2020-06-12-a
versions of the compiler, but using the same version of the libPackageDescription.dylib
module from either 2020-06-13-a
or 2020-06-12-a
. Testing these different combinations, I think that the issues is caused by libPackageDescription.dylib
that became broken in 2020-06-13-a
and is still broken in the latest snapshots for both swiftwasm-release/5.3
and swiftwasm
branches. Looking at file sizes, we can also see that something happened to the library that significantly changed its binary size starting with the 2020-06-13-a
snapshot:
892K /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-11-a/usr/lib/swift/pm/4_2/libPackageDescription.dylib
892K /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/usr/lib/swift/pm/4_2/libPackageDescription.dylib
752K /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-13-a/usr/lib/swift/pm/4_2/libPackageDescription.dylib
756K /Users/maxd/.swiftenv/versions/swift-wasm-5.3-SNAPSHOT-2020-07-03-a/usr/lib/swift/pm/4_2/libPackageDescription.dylib
752K /Users/maxd/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-22-a/usr/lib/swift/pm/4_2/libPackageDescription.dylib
There don't seem to be any changes between 2020-06-12-a
and 2020-06-13-a
in the SwiftPM itself, I think something changed in the compiler that made it miscompile the library.
I'm going to research this further, need to investigate what exactly is different between those two compiler versions and how to fix it.
from swift.
Haven't seen this reproduced in long time, closing as outdated.
from swift.
Related Issues (20)
- DEVELOPMENT-SNAPSHOT in release version HOT 2
- CI failure: cannot guarantee tail call due to mismatched parameter counts HOT 2
- Enable `swiftasynccall` calling convention with tail-call feature HOT 2
- Workaround wasm platform compiler issue HOT 5
- SwiftWasm 5.10 release HOT 4
- Make Swift SDK host platform independent HOT 2
- Fatal error during compilation (Functions with 'no-prototype' attribute must take varargs) HOT 2
- The test executable fails to run due to call stack exhausted (swift-wasm-DEVELOPMENT-SNAPSHOT-2024-03-22-a) HOT 5
- XCTest requires access to host file system HOT 2
- XMLParser use requires shim to include libxml2.a HOT 3
- Cannot install swift-wasm-DEVELOPMENT-SNAPSHOT-2024-03-30-a-ubuntu20.04_aarch64.artifactbundle.zip HOT 3
- Roadmap: WASI Preview2 Support
- Support Swift SDK in vscode-swift
- Cannot import Foundation when using a host platform independent SDK HOT 6
- undefined symbols (RegexParser) HOT 2
- Thread and RunLoopMode.common in not available on WASM HOT 1
- SwiftWasm 6.0 release
- wasm-ld: error: swiftrt.o: undefined symbol: swift_addNewDSOImage HOT 2
- Overwriting a file with `Data.write(to:)` causes an error
- Embedded Wasm Build Is Needlessly Slow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.