Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-ups for macOS #291

Merged
merged 4 commits into from
May 18, 2024
Merged

Fix-ups for macOS #291

merged 4 commits into from
May 18, 2024

Conversation

barracuda156
Copy link
Contributor

  1. Precompiled headers target is wrong in CMake and breaks the build with GCC:
    https://gitlab.kitware.com/cmake/cmake/-/issues/25656
    https://gitlab.kitware.com/cmake/cmake/-/issues/25514

  2. <unistd.h> is missing.

  3. AudioComponent* stuff is in AudioUnit framework, at least on some systems:
    https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.8.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AudioComponent.h

@barracuda156
Copy link
Contributor Author

And just in case, while linking to AudioUnit may not be required on the latest macOS versions, it works fine:

[100%] Linking CXX executable abaddon
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/abaddon.dir/link.txt --verbose=ON
/usr/bin/clang++ -pipe -I/opt/local/libexec/openssl3/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk CMakeFiles/abaddon.dir/src/MurmurHash3.cpp.o CMakeFiles/abaddon.dir/src/abaddon.cpp.o CMakeFiles/abaddon.dir/src/audio/devices.cpp.o CMakeFiles/abaddon.dir/src/audio/ma_impl.cpp.o CMakeFiles/abaddon.dir/src/audio/manager.cpp.o CMakeFiles/abaddon.dir/src/components/cellrenderermemberlist.cpp.o CMakeFiles/abaddon.dir/src/components/cellrendererpixbufanimation.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/cellrendererchannels.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/channellist.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/channellisttree.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlistfolderitem.cpp.o CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlistguilditem.cpp.o CMakeFiles/abaddon.dir/src/components/channeltabswitcherhandy.cpp.o CMakeFiles/abaddon.dir/src/components/chatinput.cpp.o CMakeFiles/abaddon.dir/src/components/chatinputindicator.cpp.o CMakeFiles/abaddon.dir/src/components/chatlist.cpp.o CMakeFiles/abaddon.dir/src/components/chatmessage.cpp.o CMakeFiles/abaddon.dir/src/components/chatwindow.cpp.o CMakeFiles/abaddon.dir/src/components/completer.cpp.o CMakeFiles/abaddon.dir/src/components/draglistbox.cpp.o CMakeFiles/abaddon.dir/src/components/friendslist.cpp.o CMakeFiles/abaddon.dir/src/components/lazyimage.cpp.o CMakeFiles/abaddon.dir/src/components/memberlist.cpp.o CMakeFiles/abaddon.dir/src/components/progressbar.cpp.o CMakeFiles/abaddon.dir/src/components/ratelimitindicator.cpp.o CMakeFiles/abaddon.dir/src/components/voiceinfobox.cpp.o CMakeFiles/abaddon.dir/src/components/volumemeter.cpp.o CMakeFiles/abaddon.dir/src/dialogs/confirm.cpp.o CMakeFiles/abaddon.dir/src/dialogs/friendpicker.cpp.o CMakeFiles/abaddon.dir/src/dialogs/setstatus.cpp.o CMakeFiles/abaddon.dir/src/dialogs/textinput.cpp.o CMakeFiles/abaddon.dir/src/dialogs/token.cpp.o CMakeFiles/abaddon.dir/src/dialogs/verificationgate.cpp.o CMakeFiles/abaddon.dir/src/discord/activity.cpp.o CMakeFiles/abaddon.dir/src/discord/auditlog.cpp.o CMakeFiles/abaddon.dir/src/discord/ban.cpp.o CMakeFiles/abaddon.dir/src/discord/channel.cpp.o CMakeFiles/abaddon.dir/src/discord/discord.cpp.o CMakeFiles/abaddon.dir/src/discord/emoji.cpp.o CMakeFiles/abaddon.dir/src/discord/guild.cpp.o CMakeFiles/abaddon.dir/src/discord/httpclient.cpp.o CMakeFiles/abaddon.dir/src/discord/interactions.cpp.o CMakeFiles/abaddon.dir/src/discord/invite.cpp.o CMakeFiles/abaddon.dir/src/discord/member.cpp.o CMakeFiles/abaddon.dir/src/discord/message.cpp.o CMakeFiles/abaddon.dir/src/discord/objects.cpp.o CMakeFiles/abaddon.dir/src/discord/permissions.cpp.o CMakeFiles/abaddon.dir/src/discord/relationship.cpp.o CMakeFiles/abaddon.dir/src/discord/role.cpp.o CMakeFiles/abaddon.dir/src/discord/snowflake.cpp.o CMakeFiles/abaddon.dir/src/discord/sticker.cpp.o CMakeFiles/abaddon.dir/src/discord/store.cpp.o CMakeFiles/abaddon.dir/src/discord/user.cpp.o CMakeFiles/abaddon.dir/src/discord/usersettings.cpp.o CMakeFiles/abaddon.dir/src/discord/voiceclient.cpp.o CMakeFiles/abaddon.dir/src/discord/webhook.cpp.o CMakeFiles/abaddon.dir/src/discord/websocket.cpp.o CMakeFiles/abaddon.dir/src/emojis.cpp.o CMakeFiles/abaddon.dir/src/filecache.cpp.o CMakeFiles/abaddon.dir/src/http.cpp.o CMakeFiles/abaddon.dir/src/imgmanager.cpp.o CMakeFiles/abaddon.dir/src/misc/chatutil.cpp.o CMakeFiles/abaddon.dir/src/misc/events.cpp.o CMakeFiles/abaddon.dir/src/notifications/notifications.cpp.o CMakeFiles/abaddon.dir/src/platform.cpp.o CMakeFiles/abaddon.dir/src/remoteauth/remoteauthclient.cpp.o CMakeFiles/abaddon.dir/src/remoteauth/remoteauthdialog.cpp.o CMakeFiles/abaddon.dir/src/settings.cpp.o CMakeFiles/abaddon.dir/src/startup.cpp.o CMakeFiles/abaddon.dir/src/state.cpp.o CMakeFiles/abaddon.dir/src/util.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/auditlogpane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/banspane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/emojispane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/infopane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/invitespane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/memberspane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettings/rolespane.cpp.o CMakeFiles/abaddon.dir/src/windows/guildsettingswindow.cpp.o CMakeFiles/abaddon.dir/src/windows/mainwindow.cpp.o CMakeFiles/abaddon.dir/src/windows/pinnedwindow.cpp.o CMakeFiles/abaddon.dir/src/windows/profile/mutualfriendspane.cpp.o CMakeFiles/abaddon.dir/src/windows/profile/mutualguildspane.cpp.o CMakeFiles/abaddon.dir/src/windows/profile/userinfopane.cpp.o CMakeFiles/abaddon.dir/src/windows/profilewindow.cpp.o CMakeFiles/abaddon.dir/src/windows/threadswindow.cpp.o CMakeFiles/abaddon.dir/src/windows/voicesettingswindow.cpp.o CMakeFiles/abaddon.dir/src/windows/voicewindow.cpp.o CMakeFiles/abaddon.dir/src/notifications/notifier_gio.cpp.o -o abaddon  -Wl,-rpath,/opt/local/lib libqrcodegen.a subprojects/ixwebsocket/libixwebsocket.a /opt/local/lib/libfontconfig.dylib /opt/local/lib/libspdlog.1.13.0.dylib /opt/local/lib/libsqlite3.dylib /opt/local/lib/libgtkmm-3.0.dylib /opt/local/lib/libgdkmm-3.0.dylib /opt/local/lib/libgdk-3.0.dylib /opt/local/lib/libgtk-3.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libglibmm-2.4.dylib /opt/local/lib/libgiomm-2.4.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libpangomm-1.4.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libharfbuzz.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/libpangoft2-1.0.dylib /opt/local/lib/libcairomm-1.0.dylib /opt/local/lib/libatkmm-1.6.dylib /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libsigc-2.0.dylib /opt/local/lib/libcurl.dylib /opt/local/lib/libz.dylib /opt/local/lib/libhandy-1.dylib subprojects/keychain/libkeychain.a -framework CoreFoundation -framework CoreAudio -framework AudioToolbox -framework AudioUnit librnnoise.a /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libz.dylib /opt/local/lib/libfmt10/libfmt.10.2.1.dylib -framework CoreFoundation -framework Security /opt/local/lib/libopus.dylib /opt/local/lib/libsodium.dylib
ld: warning: reexported library with install name '/opt/local/lib/libunwind.1.dylib' found at '/opt/local/lib/libunwind.1.dylib' couldn't be matched with any parent library and will be linked directly
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_net_abaddon/abaddon/work/build'
[100%] Built target abaddon

This is on Sonoma / aarch64

src/platform.cpp Outdated Show resolved Hide resolved
@ouwou ouwou merged commit cba2f6c into uowuo:master May 18, 2024
9 checks passed
@barracuda156 barracuda156 deleted the darwin branch May 19, 2024 01:43
@barracuda156
Copy link
Contributor Author

@ouwou Thank you for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants