runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

Ubuntu 24.04 (20240922) release - breaking change moving to Swift 6

Open johnmorrell opened this issue 1 year ago • 5 comments

Description

The Ubuntu 24.04 (20240922) update has resulted in a breaking change under Swift 6 resulting in Swift applications which un under previous versions now failing.

Platforms affected

  • [ ] Azure DevOps
  • [X] GitHub Actions - Standard Runners
  • [X] GitHub Actions - Larger Runners

Runner images affected

  • [X] Ubuntu 20.04
  • [X] Ubuntu 22.04
  • [X] Ubuntu 24.04
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] macOS 15
  • [ ] macOS 15 Arm64
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

Image: ubuntu-22.04
Version: 20240922.1.0

Is it regression?

Yes, previously working on: 20240915.1.0

Expected behavior

CLI Swift Application to run.

Actual behavior

CLI Swift Application fails with error:

undefined symbol: $s10Foundation7DecimalVSeAAMc

There is some discussion of this issue here: https://forums.swift.org/t/swift-6-foundation-decimal-issue-on-linux/74714

However attempting to switch to using Swift 5.10.1 before running the application results in the same error.

Repro steps

This is not easily reproduced without a swift application using Foundation Decimal which can be run on the latest image.

johnmorrell avatar Sep 26 '24 10:09 johnmorrell

Hi @johnmorrell , Thank you for bringing this issue to us. We are looking into this issue and will update you on this issue after investigating.

vidyasagarnimmagaddi avatar Sep 26 '24 11:09 vidyasagarnimmagaddi

Hi @johnmorrell , could you share the error logs , for better understanding. thanks

vidyasagarnimmagaddi avatar Sep 26 '24 11:09 vidyasagarnimmagaddi

This is the output of a long standing action and Swift application that had no issues until the update:

Prepare all required actions
Run ./.github/actions/application-schema
  with:
    application_path: /home/runner/.local/bin/publisher
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    GIT_CLONE_PROTECTION_ACTIVE: false
Run SCHEMA=$(/home/runner/.local/bin/publisher schema)
  SCHEMA=$(/home/runner/.local/bin/publisher schema)
  echo "schema_version=$SCHEMA" >> $GITHUB_OUTPUT
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    GIT_CLONE_PROTECTION_ACTIVE: false
/home/runner/.local/bin/publisher: symbol lookup error: /home/runner/.local/bin/publisher: undefined symbol: $s10Foundation7DecimalVSeAAMc
Error: Process completed with exit code 127.

Attempting to resolve by setting Swift version to 5.10.1:

Run swift --version
  swift --version
  
  /home/runner/.local/bin/publisher schema
  
  SCHEMA=$(/home/runner/.local/bin/publisher schema)
  echo "schema_version=$SCHEMA" >> $GITHUB_OUTPUT
  shell: /usr/bin/bash -e {0}
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    GIT_CLONE_PROTECTION_ACTIVE: false
Swift version 5.10.1 (swift-5.10.1-RELEASE)
Target: x86_64-unknown-linux-gnu
/home/runner/.local/bin/publisher: symbol lookup error: /home/runner/.local/bin/publisher: undefined symbol: $s10Foundation7DecimalVSeAAMc
Error: Process completed with exit code 127.

johnmorrell avatar Sep 26 '24 11:09 johnmorrell

This feels more like an issue with Swift 6 on Linux, but as I understand without using a self hosted runner we are unable to reference a previous version?

johnmorrell avatar Sep 26 '24 11:09 johnmorrell

Yes, @johnmorrell , we observed the same issue, swift-6.0-RELEASE . We will perform the required analysis. thanks

vidyasagarnimmagaddi avatar Sep 26 '24 11:09 vidyasagarnimmagaddi

I might be missing something here but whenever using new images trying to build using swift build we now see error error: could not find executable for 'xcode-select', our previous builds do not work erroring with undefined symbol: $s10Foundation4UUIDVMn so at the moment we are unable to rebuild it using new images and not being able to run previously built binaries.

bartszczepaniak avatar Oct 01 '24 08:10 bartszczepaniak

We were able to get our projects building again by migrating to Swift 6, we could not find a way to get them to build under Swift 5.10.

johnmorrell avatar Oct 03 '24 10:10 johnmorrell

We still managed to keep the project as Swift 5 but in order to get it running on new Ubuntu images we needed to rebuilt and release using included Swift 6 tool chain.

bartszczepaniak avatar Oct 03 '24 11:10 bartszczepaniak

The only alternative solution for preventing this from happening would be building our executable using static linking but this comes with a downside of a binary that is over 100MB in size.

Saying that using Musl should work in case of Swift libraries changes on Ubuntu images.

bartszczepaniak avatar Oct 03 '24 11:10 bartszczepaniak

Hi @johnmorrell , The version of swift-6.0 is with the latest ubuntu release. For debugging more on this issue we need sample repro steps , so that we can try to provide a workaround . thanks.

vidyasagarnimmagaddi avatar Oct 04 '24 09:10 vidyasagarnimmagaddi

Thank you, but we have now migrated all out projects to swift-6.0 which has resolved our issues. Attempting to build any swift-5.10 project using Foundation on this image should demonstrate in this issue.

johnmorrell avatar Oct 04 '24 11:10 johnmorrell

Hi @johnmorrell , Thanks for confirming . We are closing this issue..

vidyasagarnimmagaddi avatar Oct 04 '24 11:10 vidyasagarnimmagaddi