Skip to content

Fix cairo-gtk/cairo-fb builds on macOS by using dynamic linking#3

Open
jasonmj wants to merge 3 commits intomainfrom
fix-macos-dynamic-linking
Open

Fix cairo-gtk/cairo-fb builds on macOS by using dynamic linking#3
jasonmj wants to merge 3 commits intomainfrom
fix-macos-dynamic-linking

Conversation

@jasonmj
Copy link
Copy Markdown
Collaborator

@jasonmj jasonmj commented Apr 8, 2026

Summary

  • On macOS, pkg-config --static causes linker failures because macOS does not support fully static linking
  • Added a platform check (uname) for both cairo-gtk and cairo-fb targets: use dynamic linking on Darwin, static linking on Linux
  • No behavior change on Linux

Test Plan

  • Build with SCENIC_LOCAL_TARGET=cairo-gtk on macOS succeeds
  • Build with SCENIC_LOCAL_TARGET=cairo-fb on macOS succeeds
  • Linux builds remain unaffected (static linking still used)

On macOS (Darwin), pkg-config --static pulls in xcb/xdmcp transitive
dependencies that are unavailable in Nix-based environments, causing
linker failures. macOS uses dynamic libraries by default, so --static
is unnecessary. Use dynamic linking (without --static) on Darwin for
the cairo-gtk and cairo-fb targets.
@jasonmj jasonmj self-assigned this Apr 8, 2026
@jasonmj jasonmj requested a review from abelino April 8, 2026 15:56
jasonmj added 2 commits April 8, 2026 12:31
OTP 24.2 prebuilt binaries are not available for Ubuntu 24.04, which
ubuntu-latest now resolves to. Pin to ubuntu-22.04 where OTP 24.2 builds
exist. Also bump actions/checkout from v3 to v4 to address Node.js 20
deprecation warning.
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