Skip to content

SDL_compat: fix build on Darwin#405464

Closed
Rhys-T wants to merge 1 commit intoNixOS:masterfrom
Rhys-T:fix-SDL_compat-darwin
Closed

SDL_compat: fix build on Darwin#405464
Rhys-T wants to merge 1 commit intoNixOS:masterfrom
Rhys-T:fix-SDL_compat-darwin

Conversation

@Rhys-T
Copy link
Contributor

@Rhys-T Rhys-T commented May 9, 2025

Now that libGLU is null on macOS (#400427), the install_name_tool command was being passed -add_rpath without an actual path argument after it, and was throwing an error as a result. This change filters out any nulls from buildInputs before building the command line.

ZHF: #403336

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Now that libGLU is `null` on macOS (NixOS#400427), the `install_name_tool`
command was being passed `-add_rpath` without an actual path argument
after it, and was throwing an error as a result. This change filters out
any `null`s from `buildInputs` before building the command line.
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 9, 2025
@nix-owners nix-owners bot requested a review from peterhoeg May 9, 2025 03:45
@Rhys-T Rhys-T mentioned this pull request May 9, 2025
13 tasks
@JohnRTitor
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 405464

Logs: https://github.com/JohnRTitor/nixpkgs-review-gha/actions/runs/14921525938


x86_64-darwin

⏩ 14 packages marked as broken and skipped:
  • SDL_stretch
  • barrage
  • blender
  • freedroid
  • guile-sdl
  • hheretic
  • hhexen
  • hivelytracker
  • onscripter-en
  • powermanga
  • pterm
  • sfxr
  • tecnoballz
  • tinyemu
❌ 44 packages failed to build:
  • SDL_mixer
  • SDL_mixer.dev
  • btanks
  • dosbox
  • dwarf-fortress (dwarf-fortress-packages.dwarf-fortress, dwarf-fortress-packages.dwarf-fortress_0_47_05)
  • dwarf-fortress-packages.dwarf-fortress-original
  • dwarf-fortress-packages.dwarf-fortress_0_44_12
  • dwarf-therapist (dwarf-fortress-packages.dwarf-therapist)
  • egoboo
  • frozen-bubble
  • frozen-bubble.devdoc
  • gmu
  • gnuradio
  • gnuradioMinimal
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
  • gqrx (gqrx-portaudio)
  • gqrx-gr-audio
  • grafx2
  • grafx2.man
  • hyperrogue
  • jimtcl
  • keen4
  • mp3blaster
  • np2kai
  • odamex
  • open-watcom-v2
  • open-watcom-v2-unwrapped
  • openocd
  • openocd-rp2040
  • perl538Packages.SDL
  • perl538Packages.SDL.devdoc
  • perl540Packages.SDL
  • perl540Packages.SDL.devdoc
  • rott
  • rott-shareware
  • smpeg
  • smpeg.dev
  • tinygo
  • trunk-recorder
  • unscii
  • unscii.extra
✅ 40 packages built:
  • SDL (SDL_compat)
  • SDL_Pango
  • SDL_gfx
  • SDL_image
  • SDL_image.dev
  • SDL_net
  • SDL_sound
  • SDL_ttf
  • asap
  • asap.dev
  • ballerburg
  • cgterm
  • cheesecutter
  • chickenPackages_5.chickenEggs.sdl-base
  • curseofwar-sdl
  • dgen-sdl
  • goattracker
  • goattracker-stereo
  • haskellPackages.SDL
  • haskellPackages.SDL-gfx
  • haskellPackages.SDL-gfx.data
  • haskellPackages.SDL-gfx.doc
  • haskellPackages.SDL-image
  • haskellPackages.SDL-image.data
  • haskellPackages.SDL-image.doc
  • haskellPackages.SDL-ttf
  • haskellPackages.SDL-ttf.data
  • haskellPackages.SDL-ttf.doc
  • haskellPackages.SDL.data
  • haskellPackages.SDL.doc
  • haskellPackages.elerea-sdl
  • haskellPackages.elerea-sdl.doc
  • katawa-shoujo
  • mjpegtoolsFull
  • mjpegtoolsFull.lib
  • perl538Packages.AlienSDL
  • perl538Packages.AlienSDL.devdoc
  • perl540Packages.AlienSDL
  • perl540Packages.AlienSDL.devdoc
  • qodem

aarch64-darwin

⏩ 14 packages marked as broken and skipped:
  • SDL_stretch
  • barrage
  • blender
  • freedroid
  • guile-sdl
  • hheretic
  • hhexen
  • hivelytracker
  • onscripter-en
  • powermanga
  • pterm
  • sfxr
  • tecnoballz
  • tinyemu
❌ 29 packages failed to build:
  • btanks
  • dosbox
  • egoboo
  • frozen-bubble
  • frozen-bubble.devdoc
  • gmu
  • gnuradio
  • gnuradioMinimal
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
  • gqrx (gqrx-portaudio)
  • gqrx-gr-audio
  • grafx2
  • grafx2.man
  • jimtcl
  • keen4
  • mp3blaster
  • open-watcom-v2
  • open-watcom-v2-unwrapped
  • openocd
  • openocd-rp2040
  • perl538Packages.SDL
  • perl538Packages.SDL.devdoc
  • perl540Packages.SDL
  • perl540Packages.SDL.devdoc
  • tinygo
  • trunk-recorder
✅ 48 packages built:
  • SDL (SDL_compat)
  • SDL_Pango
  • SDL_gfx
  • SDL_image
  • SDL_image.dev
  • SDL_mixer
  • SDL_mixer.dev
  • SDL_net
  • SDL_sound
  • SDL_ttf
  • asap
  • asap.dev
  • ballerburg
  • cgterm
  • chickenPackages_5.chickenEggs.sdl-base
  • curseofwar-sdl
  • dgen-sdl
  • goattracker
  • goattracker-stereo
  • haskellPackages.SDL
  • haskellPackages.SDL-gfx
  • haskellPackages.SDL-gfx.data
  • haskellPackages.SDL-gfx.doc
  • haskellPackages.SDL-image
  • haskellPackages.SDL-image.data
  • haskellPackages.SDL-image.doc
  • haskellPackages.SDL-ttf
  • haskellPackages.SDL-ttf.data
  • haskellPackages.SDL-ttf.doc
  • haskellPackages.SDL.data
  • haskellPackages.SDL.doc
  • haskellPackages.elerea-sdl
  • haskellPackages.elerea-sdl.doc
  • hyperrogue
  • mjpegtoolsFull
  • mjpegtoolsFull.lib
  • odamex
  • perl538Packages.AlienSDL
  • perl538Packages.AlienSDL.devdoc
  • perl540Packages.AlienSDL
  • perl540Packages.AlienSDL.devdoc
  • qodem
  • rott
  • rott-shareware
  • smpeg
  • smpeg.dev
  • unscii
  • unscii.extra

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label May 9, 2025
@Rhys-T
Copy link
Contributor Author

Rhys-T commented May 9, 2025

Just realized that #405305 already handles this build failure a different way. Should we close this in favor of that one?

@LordGrimmauld
Copy link
Contributor

Imo yes this should be closed - ultimately, the previous rpath things were hacks, and there is better ways to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants