-
Notifications
You must be signed in to change notification settings - Fork 743
Description
Current Behavior
I encountered two build issues when trying to compile on macOS:
Undefined template for std::char_traits
Cemu will not build with the latest version of Xcode Command Line Tools (16.3).
Xcode 16.3 had a major version bump for Apple clang to 17.0.0, and with it removed the base template for std::char_traits: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes
I tried installing both arm64 and x64 llvm from Homebrew instead, but ran into other errors during compilation. An earlier version of llvm may work.
Trying to build using GCC from Homebrew did not get past cmake configuration step. If I used the Apple Silicon version then dependencies/vcpkg/buildtrees/detect_compiler for the vcpkg target triplet x64-osx-rel complained about the wrong architecture, and vice versa for the triplet arm64-osx-rel with Intel (I don't even know why it's trying to configure that one). A universal binary version of gcc might work, but I gave up at this point.
Workaround: Downgrade to Xcode Command Line Tools 16.2 (Apple clang version 16.0.0)
Debug build crashes
When using -DCMAKE_BUILD_TYPE=Debug, the executable will crash with this stacktrace:
0 Cemu_debug 0x000000010171df80 _Z20handlerDumpingSignaliP9__siginfoPv + 208
1 libsystem_platform.dylib 0x00007ff81687925d _sigtramp + 29
2 ??? 0x0000000000000000 0x0 + 0
3 libsystem_c.dylib 0x00007ff81672412a raise + 24
4 Cemu_debug 0x0000000100b62a5b _Z17cemu_assert_debugb + 43
5 Cemu_debug 0x0000000101842b5e _ZN7CemuApp15OnAssertFailureEPKwiS1_S1_S1_ + 430
6 Cemu_debug 0x0000000101d4eb48 _ZL22wxDefaultAssertHandlerRK8wxStringiS1_S1_S1_ + 488
7 Cemu_debug 0x0000000101d4bf1a _Z10wxOnAssertPKciS0_S0_PKw + 154
8 Cemu_debug 0x000000010204eb0e _ZN10wxMenuItemC2EP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 206
9 Cemu_debug 0x000000010204ef97 _ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 71
10 Cemu_debug 0x000000010204fcb5 _ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 85
11 Cemu_debug 0x00000001018b32dc _ZN10wxMenuBase6AppendEiRK8wxStringS2_10wxItemKind + 60
12 Cemu_debug 0x00000001018d18b1 _ZN10wxMenuBase15AppendCheckItemEiRK8wxStringS2_ + 49
13 Cemu_debug 0x0000000101a18665 _ZN10MainWindow12RecreateMenuEv + 17877
14 Cemu_debug 0x0000000101a13621 _ZN10MainWindowC2Ev + 833
15 Cemu_debug 0x0000000101a1eca5 _ZN10MainWindowC1Ev + 21
16 Cemu_debug 0x0000000101841abc _ZN7CemuApp6OnInitEv + 2156
17 Cemu_debug 0x000000010201345b _ZN5wxApp10CallOnInitEv + 347
18 Cemu_debug 0x0000000101dbe53e _Z7wxEntryRiPPw + 158
19 Cemu_debug 0x0000000101dbe726 _Z7wxEntryRiPPc + 54
20 Cemu_debug 0x00000001019b8816 _Z10gui_createv + 70
21 Cemu_debug 0x0000000100b2774b main + 59
22 dyld 0x0000000206ec2530 start + 3056
and write this to the log:
[13:38:43.729] Encountered wxWidgets assert!
[13:38:43.729] File: /Users/xxxxxx/.repositories/Cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.5-737796f0e2.clean/src/osx/menuitem_osx.cpp Line: 40
[13:38:43.729] Func: wxMenuItem Cond: id != 0 || pSubMenu != __null
[13:38:43.729] Message: A MenuItem ID of Zero does not work under Mac
Error: signal 5:
Opening the file to line 40 shows a debug assert is triggered in the constructor for wxMenuItem:
wxASSERT_MSG( id != 0 || pSubMenu != NULL , wxT("A MenuItem ID of Zero does not work under Mac") ) ;
Workaround: Use release build
Expected Behavior
- Cemu should build as it does when using Apple Clang version 16.0.0
- Debug build should run
Steps to Reproduce
std::char_traits issue
- macOS with either Xcode 16.3 or Xcode CLT 16.3
- Follow build instructions
- Compilation will fail during
cmake --build build
Debug build issue
- macOS with Xcode CLT 16.2
- Follow build instructions up to build step 3
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_MAKE_PROGRAM=/opt/homebrew/bin/ninja -G Ninjacmake --build build./bin/Cemu_debug
System Info (Optional)
OS: macOS 15.4.1
GPU:
Emulation Settings (Optional)
No response
Logs (Optional)
No response