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-8876] Build recent ICU on Linux #3625

Closed
milseman mannequin opened this issue Sep 28, 2018 · 5 comments
Closed

[SR-8876] Build recent ICU on Linux #3625

milseman mannequin opened this issue Sep 28, 2018 · 5 comments

Comments

@milseman
Copy link
Mannequin

milseman mannequin commented Sep 28, 2018

Previous ID SR-8876
Radar None
Original Reporter @milseman
Type Task
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 1
Component/s Foundation, Project Infrastructure, Standard Library
Labels Task
Assignee @spevans
Priority Medium

md5: 6d81b0a7f1a52a5092036698acf6929b

Issue Description:

Linux system ICU is often very old, with both performance issues and the inability to answer recent Unicode.Scalar/Character properties. Swift works best with more recent versions of ICU, so for consistency sake we should have the default Linux build also build a libICU. For further consistency across platforms, we could consider building Apple's open source fork.

@spevans
Copy link
Collaborator

spevans commented Oct 12, 2018

apple/swift#19860

@tkremenek
Copy link
Member

PR merged:

apple/swift@7af28e8

@ole
Copy link
Contributor

ole commented Nov 26, 2018

@spevans Thanks so much for working on this. To clarify, does this mean that Swift binaries on Linux will use this modern ICU lib for all their Unicode needs, regardless of the ICU version that comes with the OS the program is running on?

@spevans
Copy link
Collaborator

spevans commented Nov 26, 2018

Correct, the Linux snapshots now ship with a ICU library, currently 61.1 and use that for stdlib and Foundation:

$ cat hello.swift 
import Foundation

print("Hello")
$ ~/swift-DEVELOPMENT-SNAPSHOT-2018-11-25-a-ubuntu18.04/usr/bin/swiftc hello.swift && ./hello
Hello
ubuntu1804:~ $ ldd hello|grep icu
    libicuucswift.so.61 => /home/spse/swift-DEVELOPMENT-SNAPSHOT-2018-11-25-a-ubuntu18.04/usr/lib/swift/linux/libicuucswift.so.61 (0x00007f669afda000)
    libicui18nswift.so.61 => /home/spse/swift-DEVELOPMENT-SNAPSHOT-2018-11-25-a-ubuntu18.04/usr/lib/swift/linux/libicui18nswift.so.61 (0x00007f669aae4000)
    libicudataswift.so.61 => /home/spse/swift-DEVELOPMENT-SNAPSHOT-2018-11-25-a-ubuntu18.04/usr/lib/swift/linux/libicudataswift.so.61 (0x00007f669876f000)
    libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f6696785000)
    libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f6692c5a000)

Note that the version 60 in that list is used by libXML2 (used by Foundation) which is a system library so it linked to the system ICU (version 60) as part of Ubuntu18.

@ole
Copy link
Contributor

ole commented Nov 26, 2018

Thank you!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 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

3 participants