Skip to content

[CMake] StringProcessing: Disable CMake compiler check #80364

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
Mar 28, 2025

Conversation

etcwilde
Copy link
Member

The CMake compiler checks depend on StringProcessing being implemented. The old build system may not have rebuilt the module, which will cause the compiler check to fail. Disable the CMake compiler verification.

The CMake compiler checks depend on StringProcessing being implemented.
The old build system may not have rebuilt the module, which will cause
the compiler check to fail. Disable the CMake compiler verification.
@etcwilde etcwilde requested a review from compnerd March 28, 2025 05:04
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde
Copy link
Member Author

etcwilde commented Mar 28, 2025

Started seeing this failure on some of the smoke-test runs:

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.30/Modules/CMakeTestSwiftCompiler.cmake:43 (message):
  The Swift compiler

    "/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/bin/swiftc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/swift-stdlib-macosx-x86_64-StringProcessing-prefix/src/swift-stdlib-macosx-x86_64-StringProcessing-build/CMakeFiles/CMakeScratch/TryCompile-BVrSRw'
    
    Run Build Command(s): /usr/local/bin/ninja -v cmTC_50107
    [1/2][ 50%][0.304s] /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx13.0 -j 12 -num-threads 12 -c  -module-name cmTC_50107  -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -incremental -output-file-map CMakeFiles/cmTC_50107.dir//output-file-map.json  /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/swift-stdlib-macosx-x86_64-StringProcessing-prefix/src/swift-stdlib-macosx-x86_64-StringProcessing-build/CMakeFiles/CMakeScratch/TryCompile-BVrSRw/main.swift
    FAILED: CMakeFiles/cmTC_50107.dir/main.swift.o 
    /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx13.0 -j 12 -num-threads 12 -c  -module-name cmTC_50107  -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -incremental -output-file-map CMakeFiles/cmTC_50107.dir//output-file-map.json  /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/swift-stdlib-macosx-x86_64-StringProcessing-prefix/src/swift-stdlib-macosx-x86_64-StringProcessing-build/CMakeFiles/CMakeScratch/TryCompile-BVrSRw/main.swift
    <unknown>:0: error: compiled module was created by an older version of the compiler; rebuild '_StringProcessing' and try again: /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/macosx/_StringProcessing.swiftmodule/x86_64-apple-macos.swiftmodule
    ninja: build stopped: subcommand failed.
    
    

  

  CMake will not be able to correctly generate this project.

This patch should fix this issue.

@milseman milseman merged commit d36b067 into swiftlang:main Mar 28, 2025
2 of 3 checks passed
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.

2 participants