Skip to content

Port to ghcr.io/ps2homebrew/ps2homebrew:main (new PS2SDK + GCC 15) - #18

Draft
AKuHAK with Copilot wants to merge 2 commits into
masterfrom
copilot/make-compilable-with-latest-docker
Draft

Port to ghcr.io/ps2homebrew/ps2homebrew:main (new PS2SDK + GCC 15)#18
AKuHAK with Copilot wants to merge 2 commits into
masterfrom
copilot/make-compilable-with-latest-docker

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

The project failed to build with the current ghcr.io/ps2homebrew/ps2homebrew:main Docker image due to breaking changes in the new PS2SDK and stricter GCC 15 behavior.

CI

  • Container: ps2dev/ps2dev:v1.0ghcr.io/ps2homebrew/ps2homebrew:main
  • Fix deprecated ::set-output$GITHUB_OUTPUT
  • Upgrade actions/checkout and upload-artifact to v4

New SDK header guards (NEWLIB_PORT_AWARE)

New SDK gates fileio.h/fileXio_rpc.h/io_common.h behind #ifndef NEWLIB_PORT_AWARE. Added #define NEWLIB_PORT_AWARE before those includes in all affected PS2 driver files.

API renames & type changes

  • fio_dirent_tio_dirent_t (browser.c)
  • ee_thread_tee_thread_status_t for ReferThreadStatus (cd/cd.c)
  • libjpg.hlibjpg_ps2_addons.h; jpgOpenFILE+jpgReadImagejpgFromFILE which returns a jpgData* with buffer already populated

GCC 15 strictness fixes

  • Implicit function declarations are now errors — added forward declarations for FCEUD_NetworkClose, FCEUD_SendData, FCEUD_RecvData, FCEUD_NetplayText (fceu.c, netplay.c)
  • void FDSSound() conflicted with definition void FDSSound(int c) — GCC 15 treats () as (void) (fds.c)
  • int true = 1; int false = 0; conflicts with stdbool.h now pulled in transitively — removed (cnfsettings.c)
  • asprintf gated behind __GNU_VISIBLE — added #define _GNU_SOURCE (general.c)

libcdvd header conflicts

libcdvd-common.h defines #define CdCallback sceCdCallback etc., causing redefinition conflicts with local declarations in cdvd_iop.h. Replaced all local struct definitions and function declarations with typedefs to SDK types:

typedef sceCdRMode   CdRMode;
typedef sceCdlFILE   CdlFILE;
typedef sceCdlLOCCD  CdlLOCCD;
typedef sceCdCLOCK   CdCLOCK;

Kept only CdFlushCache and CdGetSize which are locally implemented.

Makefile

  • Add -ljpeg_ps2_addons for jpgFromFILE
  • Add -Wl,--allow-multiple-definition to resolve duplicate zlib symbols (bundled src/zlib/ vs system libz.a)

Copilot AI changed the title Fix compilation with ghcr.io/ps2homebrew/ps2homebrew:main Docker image Port to ghcr.io/ps2homebrew/ps2homebrew:main (new PS2SDK + GCC 15) Jun 13, 2026
Copilot AI requested a review from AKuHAK June 13, 2026 09:11
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