apple / apple/swift-binary-parsing

Trouble running example PNG parser and `swift test`.

Open
#8 14 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
387
Forks
24
Avg merge
1h 3m
Merged PRs (30d)
2

Description

Hi, I'm having trouble running the example `swift run parser-test Data/PNG/tiny.png` as well as running `swift test`.

Installed using `swiftly`

MacOS 15.5 (24F74)
`main` commit `d4724d1d6f5da8526320f1990df9e2bd59dd2911`
```console
➜ swift-binary-parsing git:(main) swift --version
Apple Swift version 6.2-dev (LLVM 3c4a54b02dd62b7, Swift a40a7be6945a895)
Target: arm64-apple-macosx15.0
Build config: +assertions
```

### Checklist
- [x] If possible, I've reproduced the issue using the `main` branch of this package
- [x] I've searched for [existing GitHub issues](https://github.com/apple/swift-binary-parsing/issues)

### Steps to Reproduce
I have cloned the repo and successfully built the project using `swift build -c release` but when running the example command `swift run parser-test Data/PNG/tiny.png` I get the error listed above.

```console
➜ swift-binary-parsing git:(main) swift run parser-test Data/PNG/tiny.png
[1/1] Planning build
Building for debugging...
[1/1] Write swift-version-78A6468B061A2804.txt
Build of product 'parser-test' complete! (1.01s)
dyld[4434]: Symbol not found: _$ss7RawSpanVMn
Referenced from: <78C33C96-E864-33AB-9775-024ABF9B7582> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/parser-test
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib
```

I also get the following error when running `swift test`. I'm not sure what "reinstalling the bundle" means though. I have tired reinstalling the toolchain and rebooting my computer.

```console
[#DeprecatedDeclaration]:
warning: input verification failed
note: while processing /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/BinaryParsingMacros-tool.build/SyntaxVisitorPredicate.swift.o
[209/209] Linking swift-binary-parsingPackageTests
Build complete! (46.23s)
The bundle “swift-binary-parsingPackageTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
(dlopen(/Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests, 0x0109): Symbol not found: _$ss7RawSpanVMn
Referenced from: <74755BC8-9B1F-3A23-B3E7-93B40E7EAB16> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib)
swiftpm_testing_helper/Entrypoint.swift:34: Fatal error: Failed to open test bundle at path /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests: dlopen(/Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests, 0x0101): Symbol not found: _$ss7RawSpanVMn
Referenced from: <74755BC8-9B1F-3A23-B3E7-93B40E7EAB16> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib
error: Exited with unexpected signal code 5
```

### Expected behavior

The example should run and test should at least build.

### Actual behavior

```console
➜ swift-binary-parsing git:(main) swift run parser-test Data/PNG/tiny.png
[1/1] Planning build
Building for debugging...
[1/1] Write swift-version-78A6468B061A2804.txt
Build of product 'parser-test' complete! (1.01s)
dyld[4434]: Symbol not found: _$ss7RawSpanVMn
Referenced from: <78C33C96-E864-33AB-9775-024ABF9B7582> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/parser-test
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib
```

```console
[#DeprecatedDeclaration]:
warning: input verification failed
note: while processing /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/BinaryParsingMacros-tool.build/SyntaxVisitorPredicate.swift.o
[209/209] Linking swift-binary-parsingPackageTests
Build complete! (46.23s)
The bundle “swift-binary-parsingPackageTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
(dlopen(/Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests, 0x0109): Symbol not found: _$ss7RawSpanVMn
Referenced from: <74755BC8-9B1F-3A23-B3E7-93B40E7EAB16> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib)
swiftpm_testing_helper/Entrypoint.swift:34: Fatal error: Failed to open test bundle at path /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests: dlopen(/Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests, 0x0101): Symbol not found: _$ss7RawSpanVMn
Referenced from: <74755BC8-9B1F-3A23-B3E7-93B40E7EAB16> /Users/zane/Downloads/swift-binary-parsing/.build/arm64-apple-macosx/debug/swift-binary-parsingPackageTests.xctest/Contents/MacOS/swift-binary-parsingPackageTests
Expected in: <26919DE5-6960-3FDC-BBDC-4E6C8C8470B1> /usr/lib/swift/libswiftCore.dylib
error: Exited with unexpected signal code 5
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.