Potential bug with JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE

Juce 8.0.1 here. I’m getting undefined symbols like os_workgroup_t on a library build on macOS Ventura (13.6) with minimum target macOS 10.13 using Xcode 14.3.1.

Is JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE intended to be 1 in this context? Workgroups are certainly not available on macOS 10.13.

In file juce_AudioWorkGroup_mac.h there’s

#if (defined (MAC_OS_VERSION_11_0) || defined (__IPHONE_14_0))
 #define JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE    1
#else
 #define JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE    0
#endif

where I guess it should be

#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_14_0)

Is that correct?

I think you’re probably right in that we need to check the minimum required version. We’ll aim to get a fix up for this soon.

Good to know. I wasn’t sure whether that feature might possibly be guarded at runtime somewhere down in the code. Like skipping it depending on the runtime OS.

Audio plugins and apps compiled fine here though. It seems odd that this library is the only project that comes up with the undefined symbols. It was also created by Projucer.

Hmm that is odd we do have some @available calls to guard other parts of the code so possibly this was intended. We’ll try and take a closer look at some point but I’m afraid it probably won’t be today.

It looks like the @available checks are intended to ensure backwards compatibility at runtime, while JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE merely ensures the SDK is available to compile.

So this might be an issue with the library build.

This fixes it in AppConfig.h at the top:

#include <os/workgroup.h>

For whatever reason this file is is no longer included with the library build after upgrading to Juce 8. This may or may not be specific to my project (some odd side effect). I only know it worked with Juce 7.

1 Like