mimium-org / mimium

mimium (MInimal Musical medIUM) a programming language as an infrastructure for sound and music.
https://mimium.org
Mozilla Public License 2.0
273 stars 9 forks source link

RtAudio fails to build on macOS & GCC #3

Open tomoyanonymous opened 4 years ago

tomoyanonymous commented 4 years ago

Seems like a bug in CoreAudio header files.


[cmake] [ 33%] Building CXX object CMakeFiles/rtaudio.dir/RtAudio.cpp.o
[cmake] In file included from /Users/tomoya/codes/mimium/build/rtaudio-src/RtAudio.h:891,
[cmake]                  from /Users/tomoya/codes/mimium/build/rtaudio-src/RtAudio.cpp:44:
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected unqualified-id before '^' token
[cmake]   162 | (^AudioObjectPropertyListenerBlock)(    UInt32                              inNumberAddresses,
[cmake]       |  ^
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected ')' before '^' token
[cmake]   162 | (^AudioObjectPropertyListenerBlock)(    UInt32                              inNumberAddresses,
[cmake]       | ~^
[cmake]       |  )
[cmake] In file included from /Users/tomoya/codes/mimium/build/rtaudio-src/RtAudio.h:891,
[cmake]                  from /Users/tomoya/codes/mimium/build/rtaudio-src/RtAudio.cpp:44:
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:400:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
[cmake]   400 |                                         AudioObjectPropertyListenerBlock    inListener)             __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
[cmake]       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:421:41: error: 'AudioObjectPropertyListenerBlock' has not been declared
[cmake]   421 |                                         AudioObjectPropertyListenerBlock    inListener)             __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
[cmake]       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected unqualified-id before '^' token
[cmake]   804 | (^AudioDeviceIOBlock)(  const AudioTimeStamp*   inNow,
[cmake]       |  ^
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected ')' before '^' token
[cmake]   804 | (^AudioDeviceIOBlock)(  const AudioTimeStamp*   inNow,
[cmake]       | ~^
[cmake]       |  )
[cmake] /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1343:37: error: 'AudioDeviceIOBlock' has not been declared
[cmake]  1343 |                                     AudioDeviceIOBlock                          inIOBlock)                              __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
[cmake]       |                                     ^~~~~~~~~~~~~~~~~~
drewc commented 10 months ago

I get the same error and wondering if you've managed to fix it?

pajzd commented 2 months ago

idem dito: : :

[ 4%] Building CXX object rtaudio/CMakeFiles/rtaudio.dir/RtAudio.cpp.o In file included from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.h:890, from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:44: /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected unqualified-id before '^' token 162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses, | ^ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected ')' before '^' token 162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses, | ~^ | ) In file included from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.h:890, from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:44: /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:400:41: error: 'AudioObjectPropertyListenerBlock' has not been declared 400 | AudioObjectPropertyListenerBloc inListener) OSX_AVAILABLE_STARTING(MAC_10_7, IPHONE_7_0); | ^~~~~~~ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:421:41: error: 'AudioObjectPropertyListenerBlock' has not been declared 421 | AudioObjectPropertyListenerBloc inListener) OSX_AVAILABLE_STARTING(MAC_10_7, IPHONE_7_0); | ^~~~~~~ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected unqualified-id before '^' token 804 | (^AudioDeviceIOBlock)( const AudioTimeStamp inNow, | ^ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected ')' before '^' token 804 | (^AudioDeviceIOBlock)( const AudioTimeStamp inNow, | ~^ | ) /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1343:37:error: 'AudioDeviceIOBlock' has not been declared 1343 | AudioDeviceIOBlock inIOBlock) OSX_AVAILABLE_STARTING(MAC_10_7, __IPHONE_7_0); | ^~~~~~ /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp: In function 'void pulseaudio_callback(void)': /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:8516:15: error: 'sched_getscheduler' was not declared in this scope 8516 | (sched_getscheduler(0) == SCHED_RR ? "" : "NOT ") << | ^~~~~~ make[2]: [rtaudio/CMakeFiles/rtaudio.dir/RtAudio.cpp.o] Error 1 make[1]: [rtaudio/CMakeFiles/rtaudio.dir/all] Error 2 make: *** [all] Error 2

drewc commented 2 months ago

Hey,

From a quick glance and a few years of experience that means the program relies on Apple libraries and header files. Apple's system header files use non-standard features (blocks: ^ symbol), which gcc doesn't support but clang does.

Although I'm not a member of the development or support for RtAudio, so this could be wrong: It does not build under GCC as is.

I can suggest using clang. If you want a modern version install it via homebrew or macports in the LLVM packages.

Cheers,

Drew Crampsie

On Tue, Sep 24, 2024 at 2:45 PM pajzd @.***> wrote:

idem dito: : :

[ 4%] Building CXX object rtaudio/CMakeFiles/rtaudio.dir/RtAudio.cpp.o In file included from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.h:890, from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:44: /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected unqualified-id before '^' token 162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses, | ^ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected ')' before '^' token 162 | (^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses, | ~^ | ) In file included from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.h:890, from /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:44: /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:400:41: error: 'AudioObjectPropertyListenerBlock' has not been declared 400 | AudioObjectPropertyListenerBloc inListener) OSX_AVAILABLE_STARTING(MAC_10_7, IPHONE_7_0); | ^~~~~~~ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:421:41: error: 'AudioObjectPropertyListenerBlock' has not been declared 421 | AudioObjectPropertyListenerBloc inListener) OSX_AVAILABLE_STARTING(MAC_10_7, IPHONE_7_0); | ^~~~~~~ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected unqualified-id before '^' token 804 | (^AudioDeviceIOBlock)( const AudioTimeStamp inNow, | ^ /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:804:2: error: expected ')' before '^' token 804 | (^AudioDeviceIOBlock)( const AudioTimeStamp inNow, | ~^ | ) /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1343:37:error: 'AudioDeviceIOBlock' has not been declared 1343 | AudioDeviceIOBlock inIOBlock) OSX_AVAILABLE_STARTING(MAC_10_7, __IPHONE_7_0); | ^~~~~~ /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp: In function 'void pulseaudio_callback(void)': /Users/lesupralittoralofbrownnoise/cppsketch/ext/rtaudio/RtAudio.cpp:8516:15: error: 'sched_getscheduler' was not declared in this scope 8516 | (sched_getscheduler(0) == SCHED_RR ? "" : "NOT ") << | ^~~~~~ make[2]: [rtaudio/CMakeFiles/rtaudio.dir/RtAudio.cpp.o] Error 1 make[1]: [rtaudio/CMakeFiles/rtaudio.dir/all] Error 2 make: *** [all] Error 2

— Reply to this email directly, view it on GitHub https://github.com/mimium-org/mimium/issues/3#issuecomment-2372444244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADVTXLMSDOCEFW4CZI25LDZYHMPBAVCNFSM6AAAAABOZGMNMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZSGQ2DIMRUGQ . You are receiving this because you commented.Message ID: @.***>

tomoyanonymous commented 2 months ago

Thanks for reporting. Actually, this repository is no longer maintained as you may see and I'm rewriting entire system with rust now.

https://github.com/tomoyanonymous/mimium-rs

It's almost ready to release, I'll post the announce on this repo soon.