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-83] Can't link to UUID library #5334
Comments
I believe I know what the problem is. The SPM (Swift Package Manager) seems to be linking against libraries in |
So fixing the issue at the Swift level has been declined apple/swift#276 This only leaves fixing it at the Package manager level. The issue seems to be that my module is linking against the |
/cc @ddunbar |
I'm working on a proposal for this problem. There are two other tickets open here too for this issue if you want to see some other discussion. |
@mxcl Awesome! Can you give me links to the other discussions pls? |
I've PRed a workaround for this issue, #107. If that PR is merged, we can say otherLinkerOptions:["-L/usr/lib/x86-linux-gnu/"] to work around this bug. |
I believe this was intended to be solved with the pkg-config work, can someone verify if it is? |
Using pkgConfig property in Package.swift resolves this issue. Here is the log from a sample package I tested on. /home/ankit/swift.org/swiftpm/.build/debug/swiftc -module-name User -incremental -emit-dependencies -emit-module -emit-module-path /tmp/ankit/User/.build/debug/User.swiftmodule -output-file-map /tmp/ankit/User/.build/debug/User.build/output-file-map.json -num-threads 8 -c /tmp/ankit/User/Sources/main.swift -I /tmp/ankit/User/.build/debug -j8 -D SWIFT_PACKAGE -Onone -g -enable-testing -Xcc -fmodule-map-file=/tmp/ankit/User/Packages/UUID-1.0.0/module.modulemap -Xcc -I/usr/include/uuid -L/usr/lib/x86_64-linux-gnu -luuid -module-cache-path /tmp/ankit/User/.build/debug/ModuleCache /home/ankit/swift.org/swiftpm/.build/debug/swiftc -Xlinker '-rpath=$ORIGIN' -g -L/tmp/ankit/User/.build/debug -o /tmp/ankit/User/.build/debug/User -emit-executable -Xcc -I/usr/include/uuid '-L/usr/lib/x86_64-linux-gnu' -luuid /tmp/ankit/User/.build/debug/User.build/main.swift.o |
Attachment: Download
Environment
Ubuntu 14.04 VMWare Fusion
Additional Detail from JIRA
md5: e3676bcb79fba0363bae0879a54c8e91
Issue Description:
I cannot link to the UUID library despite installing
uuid-dev
package.Proposed fix:
Log:
The text was updated successfully, but these errors were encountered: