Skip to content

macOS Intel CI#135

Closed
TheMrIron2 wants to merge 16 commits into
masterfrom
fix-macos-cli
Closed

macOS Intel CI#135
TheMrIron2 wants to merge 16 commits into
masterfrom
fix-macos-cli

Conversation

@TheMrIron2
Copy link
Copy Markdown
Contributor

Working macOS CI builds with GitHub actions.

Main changes:

  • Added macos-15-intel as stable target with correct staging
  • Fixed broken dependencies (zlib)
  • Clean build - brew checks intelligently for existing python3.11 and installs deps as normal
  • Made macOS non-blocking alongside Ubuntu

Messy commit history due to CI retesting so squash and merge if approved.

Comment thread scripts/001-binutils-PPU.sh Outdated
Comment on lines +12 to +13
if [ ! -f config.guess ]; then wget --continue https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess; fi
if [ ! -f config.sub ]; then wget --continue https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.sub; fi
Copy link
Copy Markdown
Contributor

@bucanero bucanero Jun 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't use this mirror with old config files. I think we can do the same you did on ps3libraries repo, and add the get_config script, that tries to download but has a fallback.

Also we remove the duplicate download on gcc/binutils/ppu/spu and have a single download point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, thanks for the catch.

@TheMrIron2 TheMrIron2 marked this pull request as draft June 6, 2026 20:43
@TheMrIron2
Copy link
Copy Markdown
Contributor Author

This PR can't proceed as long as ps3libraries is blocking. Changes to ps3libraries are currently affecting the reliability of the toolchain wholesale. Will reopen once it stabilises.

@zeldin
Copy link
Copy Markdown
Member

zeldin commented Jun 6, 2026

The utime.h thing was already fixed in the newlib-1.20.0-PS3 repo, and the patch updated from that.

Don't go making manual changes to newlib-1.20.0-PS3.patch, it's autogenerated from the repo.

@TheMrIron2
Copy link
Copy Markdown
Contributor Author

The utime.h thing was already fixed in the newlib-1.20.0-PS3 repo, and the patch updated from that.

Don't go making manual changes to newlib-1.20.0-PS3.patch, it's autogenerated from the repo.

That’s what I thought too, but I was hitting an issue with it during CI runs. Maybe I wasn’t rebasing, I’ll roll back and try it again today.

@TheMrIron2
Copy link
Copy Markdown
Contributor Author

It's still occurring on latest CI, https://github.com/ps3dev/ps3toolchain/actions/runs/27085703145/job/79939629234?pr=135

2026-06-07T07:25:08.7570963Z In file included from /home/runner/work/ps3toolchain/ps3toolchain/ps3dev/ppu/powerpc64-ps3-elf/include/utime.h:8:0,
2026-06-07T07:25:08.7571939Z                  from /home/runner/work/ps3toolchain/ps3toolchain/build/ps3libraries/build/libnfs/lib/libnfs.c:30:
2026-06-07T07:25:08.7572962Z /home/runner/work/ps3toolchain/ps3toolchain/ps3dev/ppu/powerpc64-ps3-elf/include/sys/utime.h:10:3: error: unknown type name 'time_t'
2026-06-07T07:25:08.7573641Z    time_t actime;
2026-06-07T07:25:08.7573967Z    ^~~~~~
2026-06-07T07:25:08.7574383Z /home/runner/work/ps3toolchain/ps3toolchain/ps3dev/ppu/powerpc64-ps3-elf/include/sys/utime.h:11:3: error: unknown type name 'time_t'
2026-06-07T07:25:08.7574835Z    time_t modtime;
2026-06-07T07:25:08.7575000Z    ^~~~~~
2026-06-07T07:25:08.8298601Z make[1]: *** [/home/runner/work/ps3toolchain/ps3toolchain/ps3dev/base_rules:69: libnfs.o] Error 1
2026-06-07T07:25:08.8300534Z gmake: *** [ps3_ppu/Makefile.PS3_PPU:74: build-ppu] Error 2
2026-06-07T07:25:08.8303552Z ../scripts/030-libnfs.sh: Failed.
2026-06-07T07:25:08.8306251Z ../scripts/009-ps3libraries.sh: Failed.

@zeldin do you know what the root cause of this is?

@zeldin
Copy link
Copy Markdown
Member

zeldin commented Jun 7, 2026

@TheMrIron2 The root cause has been fixed already, but since your fix-macos-cli branch does not contain the fix you need to rebase it on current master first.

TheMrIron2 and others added 16 commits June 7, 2026 10:13
Replaced a bad path. On modern macOS, both `TARGET_OS_MAC` and `__APPLE__` can be visible. So the old "no fdopen()” path runs and the macro replaces fdopen() with NULL and corrupts it.
Same behaviour as ps3libraries - check Savannah, and if not, fall back on local copy
sys/utime.h declares utimbuf using time_t, but does not include a header that declares time_t. This breaks libraries that include <utime.h> directly, eg libnfs.
Include <sys/types.h> earlier so the header is self-contained.
This reverts commit 9475164.
@zeldin
Copy link
Copy Markdown
Member

zeldin commented Jun 7, 2026

BTW, this PR seems to contain two completely orthogonal things:

  1. Adding a macos build to the CI
  2. Refactoring the fetching of config.sub and config.guess

These should be split into two separate (and appropriately named) PRs before merge.

@TheMrIron2
Copy link
Copy Markdown
Contributor Author

That did the trick, Ubuntu CI is back to passing. Still getting the hang of this! A lot of moving parts here haha.

Yes, one bled into the other as I worked on it, Savannah was hanging some CI attempts. I'll split them up once I verify macOS is clean. Thanks!

@TheMrIron2
Copy link
Copy Markdown
Contributor Author

Closing in favour of two separated PRs.

@TheMrIron2 TheMrIron2 closed this Jun 7, 2026
This was referenced Jun 7, 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.

3 participants