Skip to content

Revert "[cmake] Find ICU in CoreFoundation." #1756

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

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

milseman
Copy link
Member

@milseman milseman commented Nov 8, 2018

Reverts #1746

@milseman
Copy link
Member Author

milseman commented Nov 8, 2018

@swift-ci please test

@milseman
Copy link
Member Author

milseman commented Nov 8, 2018

@drodriguez
Copy link
Contributor

I’m OK with reverting this. I asked Michael to do it. It will give me some time to setup a VM to check that I can reproduce the problem.

@shahmishal shahmishal merged commit 215245b into master Nov 8, 2018
@jrose-apple jrose-apple deleted the revert-1746-cmake-icu-to-core-foundation branch November 8, 2018 01:43
@spevans
Copy link
Contributor

spevans commented Nov 8, 2018

@drodriguez The problem is that the find_package(ICU..) in CoreFoundation never finds the correct location and defaults to the system one with the header file in /usr/include.
It works in the parent Foundation directory because build-script-impl passes overriding -DICU_.. flags to cmake for swift-corelibs-foundation. I would remove the find_package(ICU) in CoreFoundation altogether and just let the parent pass the location of the include directory as that is all that needs to be correct anyway.

@milseman
Copy link
Member Author

milseman commented Nov 8, 2018

@drodriguez @spevans I'm now seeing this on the package bot:

10:57:10 env: '/home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-16_04/icu/icu4c/source/runConfigureICU': No such file or directory

Any ideas what could be going on? Is this related to the revert or something completely different?

https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04//2577/console

@drodriguez
Copy link
Contributor

@milseman: for some reason, the script has checked out the first commit of the repository:

10:45:26  > git show-ref --tags -d # timeout=10
10:45:26 JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData
10:45:26 Multiple candidate revisions
10:45:26 Scheduling another build to catch up with OSS - Swift Package - Ubuntu 16.04 (master)
10:45:26 Checking out Revision 1568e2d239301084ab451c597c6c7c5c2effab3e (refs/tags/icu4j-release-3-0-d02)
10:45:26  > git config core.sparsecheckout # timeout=10
10:45:26  > git checkout -f 1568e2d239301084ab451c597c6c7c5c2effab3e
10:45:27 Commit message: "This commit was manufactured by cvs2svn to create tag 'release-3-0-d02'."

I don’t know if the Jenkins message is the one causing the problem. I can look at the checkout script later if you want, but probably someone else can find the problem faster than me.

@spevans
Copy link
Contributor

spevans commented Nov 8, 2018

@milseman I don't think the ICU branch has been added to the swift-5 section of utils/update_checkout/update-checkout-config.json. Could that be causing issues?

            "aliases": ["swift-5.0-branch"],
            "repos": {
                "llvm": "swift-5.0-branch",
                "clang": "swift-5.0-branch",
                "compiler-rt": "swift-5.0-branch",
                "swift": "swift-5.0-branch",
                "lldb": "swift-5.0-branch",
                "cmark": "master",
                "llbuild": "master",
                "swiftpm": "master",
                "swift-syntax": "master",
                "swift-corelibs-xctest": "master",
                "swift-corelibs-foundation": "master",
                "swift-corelibs-libdispatch": "master",
                "swift-integration-tests": "master",
                "swift-xcode-playground-support": "master",
                "ninja": "release"
            }
        }

I think the package CI runs different commands to the test-ci and I cant see what update-checkout command it is running.

@drodriguez
Copy link
Contributor

@spevans: I think I found the problem. The patch that this reverted is OK. It forwards ICU_ROOT, which is one of the variables passed from the build script, and it should be the only variable that find_package needs (but we can forward all of them if you prefer).

The problem, for me at least, is the typo in #1745. When I fix that, the script works only with ICU_ROOT. Probably the top level will simply need ICU_ROOT if we fix that typo, but works because all the variables are specified anyway.

I will try to figure out what’s going on with #1745. Then I will try to redo the patch that was reverted with this lessons applied.

Sorry for all the problems.

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.

4 participants