Skip to content

Linking tests with SwiftWasm 5.5 snapshots requires additional linker flags #3891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MaxDesiatov opened this issue Nov 18, 2021 · 4 comments
Closed
Labels
release Issues with the release version

Comments

@MaxDesiatov
Copy link

Currently tests fail to build without additional flags passed to swift build when using wasm-5.5-SNAPSHOT-2021-11-16-a toolchain. The required flags are -Xlinker -licuuc -Xlinker -licui18n, there weren't previously needed with SwiftWasm 5.4.

Without them we get these linker errors:

wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFRegularExpression.c.obj): undefined symbol: uregex_useAnchoringBounds_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFRegularExpression.c.obj): undefined symbol: uregex_close_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFRegularExpression.c.obj): undefined symbol: uregex_close_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_trans_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_close_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_openU_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_openU_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_openU_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_openU_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_close_64
wasm-ld: error: /Users/maxd/Library/Developer/Toolchains/swift-wasm-5.5-SNAPSHOT-2021-11-16-a.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(CFStringTransform.c.obj): undefined symbol: utrans_close_64
...
@MaxDesiatov
Copy link
Author

@kateinoigakukun could this be related to recent autolinking changes?

@MaxDesiatov
Copy link
Author

Ah, this could be one of the manifestations of #3707, right?

@MaxDesiatov MaxDesiatov mentioned this issue Nov 18, 2021
8 tasks
@kateinoigakukun
Copy link
Member

@MaxDesiatov 5.5 branch doesn't have -public-autolink-library feature. It's only available in main branch, so this issue is not fixed in 5.5 toolchain.

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Nov 18, 2021

Ok, since I can easily work around this by passing these flags in carton, I'm not going to dig into it just for 5.5. But will keep the issue open for posterity, at least until we release 5.6 or whatever the next version, just to make sure it's fixed in those later versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Issues with the release version
Projects
None yet
Development

No branches or pull requests

2 participants