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

XCode iOS builds fail after using AdvancedSecurityCodeqlInit task #1899

Open
geertbleyen opened this issue Sep 22, 2023 · 2 comments
Open

XCode iOS builds fail after using AdvancedSecurityCodeqlInit task #1899

geertbleyen opened this issue Sep 22, 2023 · 2 comments

Comments

@geertbleyen
Copy link

geertbleyen commented Sep 22, 2023

Environment

Version of codeql-action: v2.14.6
Programming Language: Swift
Self-Hosting agent platform: MacOS 13.5.2
Build Target platform: iOS 16.2
Using Azude Devops Services

Issue

After using the AdvancedSecurityCodeqlInit task in our pipeline, the subsequent task which builds our application for iOS (Using the xcode task in Azure Devops) no longer builds correctly.
From what I gather from the logs, after running the task AdvancedSecurityCodeqlInit, xcode no longer builds the correct platform and uses the wrong SDK and fails (uses MacOS platform and SDK, instead of iOS)
Running the same xcodebuild commandline from the terminal yields a successful build.
Running the same pipeline with the AdvancedSecurityCodeql tasks removed also yield a successful build.

Logs

AdvancedSecurityCodeqlInit.log
xcodebuild.log

@AlexDenisov
Copy link

Hi @geertbleyen, looking at the logs it seems that the build is actually correct (modulo that it fails 😅): the macOS part is building Swift package descriptions. What fails is some weird mismatch between Swift toolchains while building those packages, e.g.:

// Slightly reformatted for readability
/Users/svcp_adsagtmotion/azagents/A1-mac/_work/2/s/Packages/SpeechRecognition/Package.swift:1:8: error: failed to build module 'Foundation'; 
this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.9 (swiftlang-5.9.0.123.203 clang-1500.0.37.1)',
while this compiler is 'Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)').
Please select a toolchain which matches the SDK.

CodeQL doesn't support Swift 5.9 yet so I'm not sure where the toolchain discrepancy is coming from.

@geertbleyen
Copy link
Author

We are using XCode 15 RTM (forgot to mention in the environment info), which does use Swift 5.9 by default.
I understand what you mean with the MacOS platform/sdk bit, so yeah, it's not the crosscompile issue I presumed it would be. But I also don't know where these 2 different swift 5.9 toolchains would be coming from.

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

No branches or pull requests

2 participants