Skip to content

Fix macOS CI by building against openssl@3 - #13

Open
tedmalone wants to merge 2 commits into
surrogatefrom
ted/fix-macos-ci-openssl3
Open

Fix macOS CI by building against openssl@3#13
tedmalone wants to merge 2 commits into
surrogatefrom
ted/fix-macos-ci-openssl3

Conversation

@tedmalone

Copy link
Copy Markdown

Homebrew no longer carries openssl@1.1, so the macOS job fails in setup — before any Go code is compiled:

Warning: No available formula with the name "openssl@1.1".
Did you mean openssl@3.5, openssl@3.0, openssl@4 or openssl@3?
Error: Process completed with exit code 1

Nothing in the tree changed; the formula went away underneath it. The last green macOS run on this repo was 2026-06-03, and the next one — 08-03 — failed this way. Every PR to this repo fails the same way today, #12 among them.

Change

The three openssl@1.1 references become openssl@3.

The symlink step is hardened while it's being touched. macos-latest is arm64 now, so brew's prefix is /opt/homebrew, not /usr/local — and a bare ln -s into /usr/local/include fails outright if the link is already there. mkdir -p plus ln -sfn at an explicit target is idempotent whichever state the runner is in.

The Test step already passes C_INCLUDE_PATH/LIBRARY_PATH explicitly, so the symlink is only there for cgo that hardcodes <openssl/...>; keeping it, just making it not fail the job.

Scope

CI only — no Go code touched. Targets surrogate so #12 picks it up on rebase.

Homebrew no longer carries openssl@1.1, so `brew install openssl@1.1`
fails outright and the macOS job dies in setup, before any Go code is
compiled:

  Warning: No available formula with the name "openssl@1.1".
  Error: Process completed with exit code 1

The last green macOS run was 2026-06-03; nothing in the tree changed, the
formula went away underneath it. Every PR to this repo fails the same way
today, #12 among them.

Moves the three references to openssl@3, and hardens the symlink step
while it is being touched: macos-latest is arm64 now, so brew's prefix is
/opt/homebrew rather than /usr/local, and a bare `ln -s` into
/usr/local/include fails if the link is already there. `mkdir -p` plus
`ln -sfn` at an explicit target is idempotent either way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@maraino maraino left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We don't need to add the link in /usr/local/include

Comment thread .github/workflows/test.yml Outdated
Comment on lines +59 to +61
run: |
sudo mkdir -p /usr/local/include
sudo ln -sfn "$(brew --prefix openssl@3)/include/openssl" /usr/local/include/openssl

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is not necessary, you're already adding the C_INCLUDE_PATH bellow. Tested on a macOS with openssl in /opt/homebrew/...

$ brew --prefix openssl@3
/opt/homebrew/opt/openssl@3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch — removed the Link openssl step (6e00673). The Test step already points cgo at the headers/libs via C_INCLUDE_PATH/LIBRARY_PATH using brew --prefix openssl@3, which resolves on both the Intel (/usr/local) and Apple Silicon (/opt/homebrew) layouts, so the /usr/local/include/openssl symlink was redundant. Thanks!

@hslatman hslatman changed the title ci: build macOS against openssl@3 Fix macOS CI by building against openssl@3 Aug 12, 2026
The Test step already points cgo at the headers/libs via
C_INCLUDE_PATH/LIBRARY_PATH using `brew --prefix openssl@3`, which resolves on
both Intel (/usr/local) and Apple Silicon (/opt/homebrew) runners. The
/usr/local/include/openssl symlink is a leftover from the Intel-only layout and
is no longer needed. Per review feedback from @maraino.
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