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

build: switch swift-corelibs-foundation to CMake #20032

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

compnerd
Copy link
Collaborator

swift-corelibs-foundation has had a CMake based build system for a while
now. Switch the official builds over to it.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test

@gottesmm
Copy link
Member

Nice! @compnerd does this mean that we don't need to use the weird build.py thing on Linux anymore?

@compnerd
Copy link
Collaborator Author

@gottesmm, yeap, that build.py can go away once this is merged!

@gottesmm
Copy link
Member

Awesome! Another of the swift project's build systems bites the dust!

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@compnerd
Copy link
Collaborator Author

Ugh, FindICU was added in CMake 3.7. Time to replicate.

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@gottesmm
Copy link
Member

@compnerd Took a quick look at the error. I think that somethings are getting imported wrong from the Framework. See:

01:03:31 /home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift-corelibs-foundation/Foundation/NSCalendar.swift:15:35: error: type 'CFCalendarUnit' (aka 'UInt') has no member 'day'
01:03:31 internal let kCFCalendarUnitDay = CFCalendarUnit.day.rawValue
01:03:31 ^~~~~~~~~~~~~~ ~~~

Clearly it is expected to be an enum I think.

@compnerd
Copy link
Collaborator Author

@gottesmm ... that sounds very likely. Yes, it is an enum (see CoreFoundation.framework/Headers/CFCalendar.h). That would explain why it works for me locally but fails on the build bot!

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@compnerd
Copy link
Collaborator Author

@gottesmm, @DougGregor - okay, this now reproduces the weird failure with plutil:

15:33:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift-corelibs-foundation/Tools/plutil/main.swift:205:80: error: cannot call value of non-function type 'DisplayType'
15:33:55                 fatalError("plists should have strings as keys but got a \(type(of: $0.0))")
15:33:55                                                                            ~~~~^
15:33:55 /home/buildnode/jenkins/workspace/swift-PR-Linux@2/branch-master/swift-corelibs-foundation/Tools/plutil/main.swift:305:42: error: cannot call value of non-function type 'DisplayType'
15:33:55         fatalError("unhandled type \(type(of: plist))")
15:33:55                                      ~~~~^

@millenomi - you may be interested in this as well.

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test Linux platform

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - 3eb408909e1b967d999539bd7fbee8b055903f83

@millenomi
Copy link
Contributor

Please test with following PRs:
apple/swift-corelibs-foundation#1720

@swift-ci please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - a5f6a4944c8ffd9ecd7741d2faf654f0635b7791

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388

@swift-ci please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - a5f6a4944c8ffd9ecd7741d2faf654f0635b7791

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388

@swift-ci please test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - a5f6a4944c8ffd9ecd7741d2faf654f0635b7791

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - a5f6a4944c8ffd9ecd7741d2faf654f0635b7791

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

3 similar comments
@gottesmm
Copy link
Member

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@gottesmm
Copy link
Member

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@gottesmm
Copy link
Member

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 59b86e19de73664ad10567c9bc7ea810cc24f2bb

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

1 similar comment
@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 8458734dd0c386aa1aa6eea1e6768000e893687d

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 8458734dd0c386aa1aa6eea1e6768000e893687d

@compnerd
Copy link
Collaborator Author

Please test with following PRs:
apple/swift-corelibs-foundation#1720
apple/swift-llbuild#388
apple/swift-package-manager#1833

@swift-ci please test Linux platform

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 8458734dd0c386aa1aa6eea1e6768000e893687d

@compnerd
Copy link
Collaborator Author

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - d25e70397e6ae45e084906f5b3d7afb730e62788

@compnerd
Copy link
Collaborator Author

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - d25e70397e6ae45e084906f5b3d7afb730e62788

swift-corelibs-foundation has had a CMake based build system for a while
now.  Switch the official builds over to it.
@compnerd
Copy link
Collaborator Author

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - d25e70397e6ae45e084906f5b3d7afb730e62788

@compnerd
Copy link
Collaborator Author

compnerd commented Nov 1, 2018

@spevans
Copy link
Collaborator

spevans commented Nov 1, 2018

@compnerd Will this still build and install the libFoundation.a static library?

@compnerd
Copy link
Collaborator Author

compnerd commented Nov 1, 2018

@spevans I have a patch to do that, but, this is a sufficiently complicated change that I want to split it into two changes.

@spevans
Copy link
Collaborator

spevans commented Nov 2, 2018

@compnerd I think this may be causing some issues with xctest not being able to find CoreFoundation.h on macOS, see:

https://ci.swift.org/view/Pull%20Request/job/swift-corelibs-foundation-PR-macOS/139/consoleFull#12153878463122a513-f36a-4c87-8ed7-cbc36a1ec144

https://ci.swift.org/view/Pull%20Request/job/swift-corelibs-foundation-PR-macOS/138/console

/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/usr/local/include/CoreFoundation/module.modulemap:2:21: error: umbrella header 'CoreFoundation.h' not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants