Skip to content

[SR-9251] Cannot run code that imports Foundation on Linux with latest toolchain: error while loading shared libraries: libicuucswift.so.61: cannot open shared object file: No such file or directory #3591

@benlangmuir

Description

@benlangmuir
Previous ID SR-9251
Radar None
Original Reporter @benlangmuir
Type Bug
Status Closed
Resolution Done
Environment

Ubuntu 18.04

swift-DEVELOPMENT-SNAPSHOT-2018-11-13-a-ubuntu18.04

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @compnerd
Priority Medium

md5: 72bacd2e697a1f289333e4bb3034a3e4

Issue Description:

A Swift binary built with the latest toolchain (swift-DEVELOPMENT-SNAPSHOT-2018-11-13-a-ubuntu18.04) will not load if Foundation has been imported:

$ cat t.swift 
import Foundation
print("hi")

$ swiftc t.swift && ./t
./t: error while loading shared libraries: libicuucswift.so.61: cannot open shared object file: No such file or directory

$ ldd t | grep icu
    libicuucswift.so.61 => not found
    libicui18nswift.so.61 => not found
    libicui18nswift.so.61 => /home/blangmuir/toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-11-13-a-ubuntu18.04/usr/lib/swift/linux/libicui18nswift.so.61 (0x00007f088d37d000)
    libicuucswift.so.61 => /home/blangmuir/toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-11-13-a-ubuntu18.04/usr/lib/swift/linux/libicuucswift.so.61 (0x00007f088cf9d000)
    libicudataswift.so.61 => /home/blangmuir/toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-11-13-a-ubuntu18.04/usr/lib/swift/linux/libicudataswift.so.61 (0x00007f088b3f8000)
    libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f088940e000)
    libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f08858e3000)

It works if I add /usr/lib/swift/linux to /LD_LIBRARY_PATH.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions