-
Notifications
You must be signed in to change notification settings - Fork 469
[SR-9384] Figure out why Foundation integration test for compiling on Linux with -static-stdlib fails #628
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
Comments
Here is the build: |
Disabled in thie PR: swiftlang/swift-integration-tests#45 |
When I was trying this out before I think I just used the The 2nd error looks to be that |
I ran this test myself and there is also an error, We could try and fix up the auto link or alternatively make |
Cool, I think that fixing the PIC thing is easy. The linking ... well, that requires a bit more effort. The problem is that ELF doesn't have autolinking. I've added an extension to LLVM to add support for this to lld. We could hack this via the linker response file that we build. |
I would love if swift on Linux used lld provided lld is ready (that is my only concern). It will enable us to use more advanced features and a higher likelihood of being able to push in features to the linker that we need on Linux without having to leave LLVM land. |
Created #434 for building libdispatch as PIC. Tweaking the CoreFoundation link is a second issue. @gottesmm, I think that the biggest blocker to that is the fact that it requires updating the `update-checkout` and `build-script` monsters. I can tell you that it has been extensively tested and should be considered production ready for Linux (and resultantly, android) x86, x86_64, arm, aarch64. I am unsure if the Linux PPC, PPC64 targets have received as much testing. Windows x86, x86_64 should be considered production ready, the support for Windows arm be considered experimental, and Windows arch64 is missing. @spevans, when you say that CoreFoundation is not linked into Foundation what do you mean? static libraries aren't really linked per se. Should we be including the target objects of CoreFoundation into Foundation? |
Yes, before the CMake changes, $ nm swift-4.2-RELEASE-ubuntu18.04/usr/lib/swift_static/linux/libFoundation.a |grep ' CFHashBytes'
00000000000000f0 T CFHashBytes
U CFHashBytes
[...etc...]
$ nm swift-DEVELOPMENT-SNAPSHOT-2018-11-30-a-ubuntu18.04/usr/lib/swift_static/linux/libFoundation.a |grep ' CFHashBytes'
U CFHashBytes
[...etc...] |
@compnerd I am fine in that case, but I think it is important that a discussion happens on swift-dev. Additionally, instead of conditionally cloning lld only on linux (like we are doing now with ICU), can we just always check it out. It makes it so that I can clone on a Darwin host and then compile on a docker Linux much faster. |
I tested the PIC change and added |
This looks to have been fixed by https://github.com/apple/swift-corelibs-foundation/pull/2850 I locally re-enabled the test disabled in swiftlang/swift-integration-tests#45 and it passed so I think this is now fixed. |
PR to re-enable this test: swiftlang/swift-integration-tests#78 This should work now that |
Additional Detail from JIRA
md5: a5cc649f55665ecc6571bab8d1d28caa
relates to:
Issue Description:
I committed this test thinking that this was working. I am going to disable this and send it over to compnerd/spevans who were the ones messing with this I believe.
From the bot:
And a selection of errors:
The text was updated successfully, but these errors were encountered: