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

Potential issue with upcoming Swift 5.7/Nightly toolchain #14

Open
nhubbard opened this issue Jun 7, 2022 · 4 comments
Open

Potential issue with upcoming Swift 5.7/Nightly toolchain #14

nhubbard opened this issue Jun 7, 2022 · 4 comments

Comments

@nhubbard
Copy link

nhubbard commented Jun 7, 2022

Describe the bug
Note that this is more of a "heads up" issue; I don't know if they will actually apply once Swift 5.7 and Xcode 14 exit beta. It may necessitate a maintainer of AudioKitEX filing a Radar issue.


When building any application that has a dependency on AudioKitEX with the upcoming Swift 5.7 or nightly Swift toolchains in Xcode 14.0 beta, the build will fail when attempting to build the CAudioKitEX component with the following error in DSPBase.h:133:

Screen Shot 2022-06-07 at 12 07 20

This issue is present in both the release and main branch versions of AudioKitEX.

To Reproduce
Steps to reproduce the behavior:

  1. Install Xcode 14 beta.
  2. Install either the trunk snapshot or the Swift 5.7 development snapshot.
  3. Open any project that uses AudioKitEX, such as the AudioKit Cookbook.
  4. Select either one of the prerelease toolchains from the Xcode > Toolchains menu.
  5. Attempt to build the project using any scheme and target combination.
  6. The build will fail with the error from the screenshot.

Author's note: My project doesn't use STKAudioKit, but another error was raised when I was recreating the issue with the Cookbook app. It was in Skini.cpp:142, and the error was Missing '#include <stdlib.h>'; 'atof' must be declared before it is used.

Expected behavior
The build should have completed and my application/Cookbook should have launched.

Screenshots
Error screenshot is in description of bug.

Details (please complete the following information):

  • Type: 2021 MacBook Pro w/ M1 Pro CPU
  • OS: macOS Monterey 12.4
  • Xcode: 14.0 beta
  • Swift: Nightly and 5.7 development toolchains
  • AudioKit Version: Latest release and main branch

Additional context
I'm happy to provide any additional context, if necessary.

@wtholliday
Copy link
Member

Is fixing this as simple as adding #include <atomic> in DSPBase.h? Otherwise do you know how to fix it?

@nhubbard
Copy link
Author

nhubbard commented Jun 8, 2022

So I tried that, and it only lead to more build issues and Xcode complaining that I modified a read only copy of a package dependency; I'll try to capture a screenshot.

I'm almost certain that this is just a bug in the Swift and Objective-C beta/nightly compiler suite, but I'm not much of an Objective-C programmer so I can't say that for certain.

@aure
Copy link
Member

aure commented Jun 9, 2022

I fixed AudioKit and AudioKitEX for Swift 5.7, but the STK had a host of problems with that toolchain.

@aure
Copy link
Member

aure commented Jun 9, 2022

SporthAudioKit also has some deep-looking issues

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

3 participants