#65653 closed defect (fixed)
mpd @0.23.8: builds failing for all macOS releases prior to monterey
Reported by: | mascguy (Christopher Nielsen) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | l2dy (Zero King) | |
Port: | mpd |
Description
The following failure is occurring.
../mpd-0.23.8/src/output/plugins/OSXOutputPlugin.cxx:163:3: error: use of undeclared identifier 'kAudioObjectPropertyElementMain'; did you mean 'kAudioObjectPropertyElementName'? kAudioObjectPropertyElementMain, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kAudioObjectPropertyElementName /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:331:5: note: 'kAudioObjectPropertyElementName' declared here kAudioObjectPropertyElementName = 'lchn', ^
Does the latest upstream release require Monterey and later? If so, we should fallback to an earlier release, for Big Sur and prior.
Change History (10)
comment:1 follow-up: 2 Changed 2 years ago by l2dy (Zero King)
comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)
Replying to l2dy:
Unfortunately, a dependency update made all earlier releases fail to build. You may need to backport a patch, see https://github.com/MusicPlayerDaemon/MPD/commit/138738075b95d3d8eae3468daa542c0270965299.
Yes, I'm actively working on that, as it affects a number of ports. See issue:65619
comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | l2dy added |
---|---|
Owner: | changed from l2dy to mascguy |
comment:4 Changed 2 years ago by Christopher Nielsen <mascguy@…>
comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
We can certainly add additional fallbacks for 10.14 and prior, if there's demand.
But at least we now support 10.15 and Big Sur once again, so that's an improvement!
comment:6 Changed 2 years ago by Gcenx
kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
So you’d want to map kAudioObjectPropertyElementMain
to kAudioObjectPropertyElementMaster
for prior versions of macOS.
comment:7 Changed 2 years ago by Gcenx
You’d do something like the following within the relevant header
#ifndef kAudioObjectPropertyElementMain #define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster #endif
comment:8 Changed 2 years ago by Gcenx
I don’t have access to all the SDKs currently as I’m at work but I believe this change happened from the macOS12.sdk
The majority of software there’s days expects to be build against the latest possible SDK and set the minimum target accordingly, however at least on Macports due to rev-upgrade that’s not exactly always possible.
comment:9 Changed 2 years ago by Gcenx
mpd also needs
#ifndef kAudioHardwareServiceDeviceProperty_VirtualMainVolume #define kAudioHardwareServiceDeviceProperty_VirtualMainVolume kAudioHardwareServiceDeviceProperty_VirtualMasterVolume #endif #ifndef kAudioHardwareServiceDeviceProperty_VirtualMainBalance #define kAudioHardwareServiceDeviceProperty_VirtualMainBalance kAudioHardwareServiceDeviceProperty_VirtualMasterBalance #endif
This along with the prior mapping gets mpd to compile on macOS Big Sur where before it wouldn't compile with the MacOSX11.sdk
comment:10 Changed 2 years ago by Gcenx
Some additional info
Also tested on macOS Mojave with PR49 for legacy-support, Xcode11 fails to compile but after blacklisting anything below Xcode12 and Macports pulled in llvm/clang-14 mpd compiled without issue.
Unfortunately, a dependency update made all earlier releases fail to build. You may need to backport a patch, see https://github.com/MusicPlayerDaemon/MPD/commit/138738075b95d3d8eae3468daa542c0270965299.