Skip to content
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

[SR-10623] static-executable fully broken now #53023

Closed
weissi opened this issue May 6, 2019 · 3 comments
Closed

[SR-10623] static-executable fully broken now #53023

weissi opened this issue May 6, 2019 · 3 comments

Comments

@weissi
Copy link
Member

@weissi weissi commented May 6, 2019

Previous ID SR-10623
Radar rdar://problem/52529021
Original Reporter @weissi
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, 5.0Regression
Assignee @drexin
Priority Medium

md5: 439c516206eb3602a31e1970c9894bb0

relates to:

Issue Description:

Fully static executables don't work anymore at all:

echo 'print("foo")' > test4.swift && swiftc -static-executable test4.swift

yields

clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToUpper: error: undefined reference to 'u_strToUpper_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToLower: error: undefined reference to 'u_strToLower_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_close: error: undefined reference to 'ubrk_close_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_open: error: undefined reference to 'ubrk_open_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_preceding: error: undefined reference to 'ubrk_preceding_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_following: error: undefined reference to 'ubrk_following_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setText: error: undefined reference to 'ubrk_setText_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setUText: error: undefined reference to 'ubrk_setUText_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUTF8: error: undefined reference to 'utext_openUTF8_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUChars: error: undefined reference to 'utext_openUChars_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_hasBoundaryBefore: error: undefined reference to 'unorm2_hasBoundaryBefore_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_getNFCInstance: error: undefined reference to 'unorm2_getNFCInstance_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_normalize: error: undefined reference to 'unorm2_normalize_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_spanQuickCheckYes: error: undefined reference to 'unorm2_spanQuickCheckYes_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_hasBinaryProperty: error: undefined reference to 'u_hasBinaryProperty_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charAge: error: undefined reference to 'u_charAge_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getIntPropertyValue: error: undefined reference to 'u_getIntPropertyValue_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charName: error: undefined reference to 'u_charName_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToLower: error: undefined reference to 'u_strToLower_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToTitle: error: undefined reference to 'u_strToTitle_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToUpper: error: undefined reference to 'u_strToUpper_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getNumericValue: error: undefined reference to 'u_getNumericValue_61_swift'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

so it seems that we don't add ICU's .a files for the static executables 🙁.

That's swift 5.0.1 on Ubuntu 18.04 but it shouldn't matter as Swift now vendors ICU.

@weissi
Copy link
Member Author

@weissi weissi commented Jul 2, 2019

@swift-ci create

@weissi
Copy link
Member Author

@weissi weissi commented Aug 27, 2019

still an issue on 5.0.2:

$ docker run -it --rm swift:5.0.2 bash -c 'echo "print(\"foo\")" > test4.swift && swiftc -static-executable test4.swift'
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
/usr/bin/ld.gold: error: cannot find -licui18n
/usr/bin/ld.gold: error: cannot find -licuuc
/usr/bin/ld.gold: error: cannot find -licudata
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToUpper: error: undefined reference to 'u_strToUpper_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToLower: error: undefined reference to 'u_strToLower_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_close: error: undefined reference to 'ubrk_close_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_open: error: undefined reference to 'ubrk_open_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_preceding: error: undefined reference to 'ubrk_preceding_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_following: error: undefined reference to 'ubrk_following_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setText: error: undefined reference to 'ubrk_setText_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setUText: error: undefined reference to 'ubrk_setUText_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUTF8: error: undefined reference to 'utext_openUTF8_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUChars: error: undefined reference to 'utext_openUChars_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_hasBoundaryBefore: error: undefined reference to 'unorm2_hasBoundaryBefore_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_getNFCInstance: error: undefined reference to 'unorm2_getNFCInstance_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_normalize: error: undefined reference to 'unorm2_normalize_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_spanQuickCheckYes: error: undefined reference to 'unorm2_spanQuickCheckYes_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_hasBinaryProperty: error: undefined reference to 'u_hasBinaryProperty_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charAge: error: undefined reference to 'u_charAge_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getIntPropertyValue: error: undefined reference to 'u_getIntPropertyValue_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charName: error: undefined reference to 'u_charName_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToLower: error: undefined reference to 'u_strToLower_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToTitle: error: undefined reference to 'u_strToTitle_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToUpper: error: undefined reference to 'u_strToUpper_61_swift'
/usr/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getNumericValue: error: undefined reference to 'u_getNumericValue_61_swift'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

@drexin
Copy link
Member

@drexin drexin commented Apr 22, 2020

This has been fixed in #30864

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants