-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
| Previous ID | SR-83 |
| Radar | None |
| Original Reporter | @colemancda |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Attachment: Download
Environment
Ubuntu 14.04 VMWare Fusion
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Package Manager |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: e3676bcb79fba0363bae0879a54c8e91
Issue Description:
I cannot link to the UUID library despite installing uuid-dev package.
Proposed fix:
I believe I know what the problem is. The SPM (Swift Package Manager) seems to be linking against libraries in
/usr/lib. The UUID library in Ubuntu 14.04 is in/usr/lib/x86-linux-gnu/libuuid.so. The fix for this has to be either in Swift, under the Glibc module, or in the SPM.
Log:
coleman@ubuntu:~/Swift/SwiftFoundationExample$ swift build
Compiling Swift Module 'SwiftFoundationExample' (1 sources)
Linking Executable: .build/debug/SwiftFoundationExample
/home/coleman/Swift/SwiftFoundationExample/.build/debug/SwiftFoundation.a(POSIXUUID.swift.o): In function `TFF15SwiftFoundation21POSIXUUIDCreateRandomFT_TVs5UInt8S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0U_FGSpTS0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0T*':
/home/coleman/Swift/SwiftFoundationExample/Packages/SwiftFoundation-1.0.1/Sources/POSIXUUID.swift:35: undefined reference to `uuid_generate'
/home/coleman/Swift/SwiftFoundationExample/.build/debug/SwiftFoundation.a(POSIXUUID.swift.o): In function `TFF15SwiftFoundation28POSIXUUIDConvertToUUIDStringFTVs5UInt8S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0TVs4Int8S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1U_FTGSpTS0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0GSpTS1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1*_T':
/home/coleman/Swift/SwiftFoundationExample/Packages/SwiftFoundation-1.0.1/Sources/POSIXUUID.swift:60: undefined reference to `uuid_unparse'
/home/coleman/Swift/SwiftFoundationExample/.build/debug/SwiftFoundation.a(POSIXUUID.swift.o): In function `TF15SwiftFoundation28POSIXUUIDConvertStringToUUIDFSSGSqTVs5UInt8S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_':
/home/coleman/Swift/SwiftFoundationExample/Packages/SwiftFoundation-1.0.1/Sources/POSIXUUID.swift:85: undefined reference to `uuid_parse'
clang: 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)
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/home/coleman/Swift/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/bin/swift-build-tool", "-f", "/home/coleman/Swift/SwiftFoundationExample/.build/debug/SwiftFoundationExample.o/llbuild.yaml"]