AudioKit Cookbook v.5 build fails (xcode 13.2.1)

166 Views Asked by At

I have been trying to build, to no avail, the Cookbook under Xcode 13.2.1. I get "Analyze Failed" with the following errors:

Stk:

Command CompileSwiftSources failed with a nonzero exit code

Semantic issues (20): (some of the error messages appear with varying array sizes, I quote only one for brevity):

  • No template named num_get (istream)
  • No template named bitset (istream)
  • Implicit instantiation of undefined template std::ostream (sstream, istream)
  • Invalid operands to binary expression ('std::ostringstream' (aka 'basic_ostringstream') and 'const char [60]') (instrmnt.h, Filter.h, Whistle.cpp)
  • Invalid operands to binary expression ('std::ostream' (aka 'basic_ostream') and 'char') (Stk.h)

Cookbook Project: 5 semantic issues similar to those above

AudioKit: Command CompileSwiftSources failed with a nonzero exit code

Any suggestions to get this going? I am at a complete loss. I am targeting iOS 15. I'll be happy to provide additional information, if needed.

For reference here are the versions of the Cookbook and dependencies that I'm using:

  • Cookbook (?, 5/2/2022 commit)
  • AudioKit 5.4.1
  • AudioKitEx 5.4.0
  • AudioKitUI (?, 5/3/22 commit)
  • DunneAudioKit 5.4.1
  • KissFFT 1.0.0
  • SoundpipeAudioKit 4.4.1
  • SporthAudioKIt 5.3.1
  • STKAudioKit 5.3.0
3

There are 3 best solutions below

4
Nick C. On

Does it look like all the Swift Packages were loaded properly? I'm on that same Xcode version so it should be working. Here are a few things to try:

• Select File > Packages > Resolve Package Version

• Delete the app from your device/simulator if you ran it previously on another Cookbook version

• Restart Xcode and select Product > Clean Build Folder

0
Torrontés On

A fresh install of Xcode did the trick. Go figure. Thanks everyone for your suggestions and information.

0
Nik On

For me this happened the second time. I was working on a pure C++ command line project in Xcode 14.1 and suddenly couldn't build it anymore. I couldn't build anything if it had #include <iostream> line.

Reinstalling Xcode fixed this problem. Thanks for the tip! Here is what I did eventually:

  • Deleted Xcode 14.1 from /Applications
  • Deleted /Library/Developer/CommandLineTools
  • Deleted ~/Library/Developer/Xcode/DerivedData/
  • Rebooted
  • Reinstalled Xcode from .xip archive and reinstalled CommandLineTools for Xcode 14.1 from .pkg