steinbergmedia / vst3sdk

VST 3 Plug-In SDK
Other
1.65k stars 162 forks source link

3.7.4_build_25: Fails to build: unknown type name '_Bool' #88

Closed yurivict closed 2 years ago

yurivict commented 2 years ago

clang-12 fails to build it:

In file included from /disk-samsung/freebsd-ports/audio/vst3sdk/work/vst3sdk-3.7.4_build_25/pluginterfaces/base/funknown.cpp:59:
/usr/include/stdatomic.h:186:17: error: unknown type name '_Bool'
typedef _Atomic(_Bool)                  atomic_bool;
                ^
/usr/include/stdatomic.h:186:26: error: C++ requires a type specifier for all declarations
typedef _Atomic(_Bool)                  atomic_bool;
~~~~~~~                                 ^
/usr/include/stdatomic.h:378:17: error: unknown type name '_Bool'
static __inline _Bool
                ^
/usr/include/stdatomic.h:382:10: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile atomic_bool *' (aka 'volatile int *') invalid)
        return (atomic_exchange_explicit(&__object->__flag, 1, __order));
                ^                        ~~~~~~~~~~~~~~~~~
/usr/include/stdatomic.h:242:2: note: expanded from macro 'atomic_exchange_explicit'
        __c11_atomic_exchange(object, desired, order)
        ^                     ~~~~~~
/usr/include/stdatomic.h:389:2: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile atomic_bool *' (aka 'volatile int *') invalid)
        atomic_store_explicit(&__object->__flag, 0, __order);
        ^                     ~~~~~~~~~~~~~~~~~
/usr/include/stdatomic.h:256:2: note: expanded from macro 'atomic_store_explicit'
        __c11_atomic_store(object, desired, order)
        ^                  ~~~~~~
/usr/include/stdatomic.h:393:17: error: unknown type name '_Bool'
static __inline _Bool
                ^
6 errors generated.

OS: FreeBSD 13

scheffle commented 2 years ago

It looks more like a toolchain problem on FreeBSD 13 with clang 12. stdatomic.h is a standard library header, see https://en.cppreference.com/w/cpp/header/stdatomic.h

scheffle commented 2 years ago

Should be fixed with the version 3.7.5.