Skip to content

Fix Wii U build on macOS with devkitPPC r50 / GCC 14+ - #103

Open
patters-match wants to merge 1 commit into
AloUltraExt:masterfrom
patters-match:fix/macos-build
Open

Fix Wii U build on macOS with devkitPPC r50 / GCC 14+#103
patters-match wants to merge 1 commit into
AloUltraExt:masterfrom
patters-match:fix/macos-build

Conversation

@patters-match

@patters-match patters-match commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Makefile: TARGET_WII_U was being evaluated after OSX_BUILD in the platform detection chain, causing Wii U cross-compilation builds on macOS to be misidentified as native macOS builds. Reordered so TARGET_WII_U is checked first. Also guards the SHA1SUM assignment to avoid errors when the tool is absent.
  • src/pc/audio/audio_sdl2.c: adds missing #include <stdio.h>. Tested with devkitPPC r50; GCC 14+ no longer implicitly pulls it in via other headers.

Additional macOS build notes

The following are required to build on macOS but are not part of this patch:

  • macOS ships with GNU make 3.81 (2006), which is too old. Install a newer version via Homebrew and use gmake instead of make:
    brew install make
  • The bundled armips tool fails to build from source on macOS. Build it separately from its own repo (which has a proper CMake setup) and install it to PATH, then the tools build will detect and use it automatically:
    git clone --recursive https://github.com/Kingcom/armips /tmp/armips-build
    cd /tmp/armips-build && mkdir build && cd build
    cmake ..
    make
    sudo cp armips /usr/local/bin/
  • Build the remaining tools explicitly with Clang, followed by the main build:
    gmake -C tools CC=clang CXX=clang++
  • Build the main target, and use this mod to wuhbtool to integrate the boot sound. I used Claude Code to rip the excellent boot screen and icon assets from the previously available .wuhb binary, and Claude was able to extract bootSound.btsnd from the Installer release once I had decrypted the files:
    gmake TARGET_WII_U=1 HIGH_FPS_PC=1 VERSION=us -j$(sysctl -n hw.logicalcpu)
    
    wuhbtool build/us_wiiu/sm64.us.f3dex2e.rpx build/us_wiiu/sm64.us.f3dex2e.wuhb \
      --name="Super Mario 64" \
      --short-name="SM64" \
      --author="AboodXD, AloXado320" \
      --icon=build/us_wiiu/iconTex.tga \
      --tv-image=build/us_wiiu/bootTvTex.tga \
      --drc-image=build/us_wiiu/bootDrcTex.tga \
      --boot-sound=build/us_wiiu/bootSound.btsnd

Test plan

  • Wii U cross-compilation build completes on macOS without errors
  • macOS build target still works as before (I can't test that on macOS since it has a hard dependency on gcc as semantics, unavailable on Darwin).

- Makefile: check TARGET_WII_U before OSX_BUILD in platform detection
  chain to avoid misidentifying Wii U builds; guard SHA1SUM assignment
- audio_sdl2.c: add missing <stdio.h> include required by GCC 14+

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patters-match patters-match changed the title Fix build on macOS with devkitPPC r50 / GCC 14+ Fix Wii U build on macOS with devkitPPC r50 / GCC 14+ Jun 24, 2026
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.

1 participant