Skip to content

sdl3-image: 3.2.6 -> 3.4.0, fix compilation with stb#482633

Merged
pbsds merged 1 commit into
NixOS:masterfrom
evysgarden:sdl3-image-3.4.0
Jan 24, 2026
Merged

sdl3-image: 3.2.6 -> 3.4.0, fix compilation with stb#482633
pbsds merged 1 commit into
NixOS:masterfrom
evysgarden:sdl3-image-3.4.0

Conversation

@evysgarden

Copy link
Copy Markdown
Contributor

Update sdl3-image to 3.4.0

Release details: https://github.com/libsdl-org/SDL_image/releases/tag/release-3.4.0

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@evysgarden evysgarden self-assigned this Jan 22, 2026
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Jan 22, 2026
@evysgarden

Copy link
Copy Markdown
Contributor Author

running review on x86_64 linux rn

@evysgarden

Copy link
Copy Markdown
Contributor Author

my internet broke down, so it'll be a few hours

@LordGrimmauld

Copy link
Copy Markdown
Contributor

This is a major release. How much breakage in consumers do you expect? As in, should we backport or not?

@evysgarden

evysgarden commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

This is a major release. How much breakage in consumers do you expect? As in, should we backport or not?

from what I can see, this version only adds new functionality. I don't think it would break anything

@evysgarden evysgarden marked this pull request as draft January 22, 2026 11:26
@evysgarden

Copy link
Copy Markdown
Contributor Author

i changed this to draft for now. it depends on sdl3-3.4.0

@evysgarden

evysgarden commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

depends on #475854 (currently in staging)

@evysgarden evysgarden changed the base branch from master to staging January 22, 2026 12:11
github-actions[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot closed this Jan 22, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jan 22, 2026
@github-actions github-actions Bot dismissed their stale review January 22, 2026 12:12

Review dismissed automatically

@marcin-serwin

marcin-serwin commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

No point in targeting staging with so few rebuilds, I would just wait for #479279.

it depends on sdl3-3.4.0

In that case it can't be backported to stable since it's still on sdl3-3.2.x. I'm aware of at least one breaking change in sdl-3.4.0 so I wouldn't backport it unless we have a good reason to do so.

@evysgarden

Copy link
Copy Markdown
Contributor Author

alr, will rebase tmrw

@evysgarden evysgarden changed the base branch from staging to master January 23, 2026 11:03
@nixpkgs-ci nixpkgs-ci Bot closed this Jan 23, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jan 23, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot dismissed their stale review January 23, 2026 11:04

Review dismissed automatically

@evysgarden

evysgarden commented Jan 23, 2026

Copy link
Copy Markdown
Contributor Author

done rebasing now. sry for all the noise. will wait until 3.4.0 is merged into master now

just noticed that sdl3 3.4.0 is in master already. will fix some compilation errors reopen the pull request

@evysgarden

Copy link
Copy Markdown
Contributor Author

this is not building anymore with the following log from cmake:

> CMake Error at /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
>   Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
> Call Stack (most recent call first):
>   /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
>   /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/FindPNG.cmake:193 (find_package_handle_standard_args)
>   CMakeLists.txt:877 (find_package)

Setting SDLIMAGE_PNG_LIBPNG to false fixes compilation but disables apng support. I'm not quite sure why this is happening.

Will look at it later, gotta eat now. Feel free to look into it.

@evysgarden

Copy link
Copy Markdown
Contributor Author

fixed it by disabling libpng when stb is used.

@evysgarden

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 482633
Commit: 8bf0d67e364e4a6ef4e3e45c64ba7d137bfc91ca


x86_64-linux

❌ 3 packages failed to build:
  • brutespray
  • medusa
  • medusa.man
✅ 36 packages built:
  • budgie-control-center
  • budgie-control-center.debug
  • crowbar
  • crowbar.dist
  • freerdp
  • gnome-connections
  • gnome-control-center
  • gnome-control-center.debug
  • gnome-remote-desktop
  • gtk-frdp
  • guacamole-server
  • kdePackages.krdc
  • kdePackages.krdc.debug
  • kdePackages.krdc.dev
  • kdePackages.krdc.devtools
  • kdePackages.krdp
  • kdePackages.krdp.debug
  • kdePackages.krdp.dev
  • kdePackages.krdp.devtools
  • phosh
  • phosh-mobile-settings
  • python313Packages.pysdl3
  • python313Packages.pysdl3.dist
  • python314Packages.pysdl3
  • python314Packages.pysdl3.dist
  • remmina
  • sdl3-image
  • sdl3-image.dev
  • sdl3-image.lib
  • tauon
  • tauon.dist
  • weston
  • winboat
  • x11docker
  • xwayland-run
  • xwayland-run.man

Error logs: `x86_64-linux`
medusa
  442 |   pResponseCallback = response_callback;
      |                     ^
ssh.c:398:6: note: 'response_callback' declared here
  398 | void response_callback(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract)
      |      ^~~~~~~~~~~~~~~~~
ssh.c:495:11: error: passing argument 4 of 'libssh2_userauth_keyboard_interactive_ex' from incompatible pointer type [8;;https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Warning-Options.html#index-Wincompatible-pointer-types�-Wincompatible-pointer-types8;;�]
  495 |       if (libssh2_userauth_keyboard_interactive(session, szLogin, pResponseCallback) )
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           |
      |           void (*)(void)
/nix/store/s42wjlhq35xd2yxksiwy2zwj9a4km8nm-libssh2-1.11.1-dev/include/libssh2.h:798:42: note: expected 'void (*)(const char *, int,  const char *, int,  int,  const LIBSSH2_USERAUTH_KBDINT_PROMPT *, LIBSSH2_USERAUTH_KBDINT_RESPONSE *, void **)' but argument is of type 'void (*)(void)'
  798 |                                          LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC
      |                                          ^
make[3]: *** [Makefile:781: ssh.o] Error 1
make[3]: Leaving directory '/build/source/src/modsrc'
make[2]: *** [Makefile:418: all-recursive] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:446: all-recursive] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:344: all] Error 2

@evysgarden

Copy link
Copy Markdown
Contributor Author

the medusa package not building seems unrelated, there's an issue for that here: #481545

@evysgarden evysgarden marked this pull request as ready for review January 23, 2026 13:45

@jansol jansol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is indeed a "major" release in terms of new additions but existing API / ABI from previous stable 3.x releases is expected to remain unchanged.

@marcin-serwin marcin-serwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is not building anymore with the following log from cmake:

This is because libpng is now always used for PNG images even with stb backend enabled, see libsdl-org/SDL_image#666.

fixed it by disabling libpng when stb is used.

IMO the correct way is to move libpng to unconditional buildInputs and leave stb enabled to match upstream defaults:

diff --git a/pkgs/by-name/sd/sdl3-image/package.nix b/pkgs/by-name/sd/sdl3-image/package.nix
index 528a06a499..cdce69d3f4 100644
--- a/pkgs/by-name/sd/sdl3-image/package.nix
+++ b/pkgs/by-name/sd/sdl3-image/package.nix
@@ -48,10 +48,10 @@
     libtiff
     libwebp
     libjxl
+    libpng
   ]
   ++ (lib.optional (!stdenv.hostPlatform.isDarwin) libavif)
   ++ (lib.optionals (!enableSTB) [
-    libpng
     libjpeg
   ]);

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jan 23, 2026
@evysgarden

evysgarden commented Jan 23, 2026

Copy link
Copy Markdown
Contributor Author

@marcin-serwin fair enough, though I'm not sure if we should leave stb enabled by default

@marcin-serwin

Copy link
Copy Markdown
Contributor

The update commit should contain the libpng fix otherwise it doesn't build so it will be harder to bisect in the future.

I'm not sure if we should leave stb enabled by default

The upstream uses stb by default but I don't have a strong opinion on that, up to you.

@evysgarden evysgarden changed the title sdl3-image: 3.2.6 -> 3.4.0 sdl3-image: 3.2.6 -> 3.4.0, fix compilation with stb Jan 23, 2026
@evysgarden

Copy link
Copy Markdown
Contributor Author

squashed to one commit now, will keep stb enabled by default

@evysgarden

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 482633
Commit: cd9901b04e567ddc48bce63e9f4ef3f2fed9d6a6


x86_64-linux

❌ 3 packages failed to build:
  • brutespray
  • medusa
  • medusa.man
✅ 36 packages built:
  • budgie-control-center
  • budgie-control-center.debug
  • crowbar
  • crowbar.dist
  • freerdp
  • gnome-connections
  • gnome-control-center
  • gnome-control-center.debug
  • gnome-remote-desktop
  • gtk-frdp
  • guacamole-server
  • kdePackages.krdc
  • kdePackages.krdc.debug
  • kdePackages.krdc.dev
  • kdePackages.krdc.devtools
  • kdePackages.krdp
  • kdePackages.krdp.debug
  • kdePackages.krdp.dev
  • kdePackages.krdp.devtools
  • phosh
  • phosh-mobile-settings
  • python313Packages.pysdl3
  • python313Packages.pysdl3.dist
  • python314Packages.pysdl3
  • python314Packages.pysdl3.dist
  • remmina
  • sdl3-image
  • sdl3-image.dev
  • sdl3-image.lib
  • tauon
  • tauon.dist
  • weston
  • winboat
  • x11docker
  • xwayland-run
  • xwayland-run.man

Error logs: `x86_64-linux`
medusa
  442 |   pResponseCallback = response_callback;
      |                     ^
ssh.c:398:6: note: 'response_callback' declared here
  398 | void response_callback(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract)
      |      ^~~~~~~~~~~~~~~~~
ssh.c:495:11: error: passing argument 4 of 'libssh2_userauth_keyboard_interactive_ex' from incompatible pointer type [8;;https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Warning-Options.html#index-Wincompatible-pointer-types�-Wincompatible-pointer-types8;;�]
  495 |       if (libssh2_userauth_keyboard_interactive(session, szLogin, pResponseCallback) )
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           |
      |           void (*)(void)
/nix/store/s42wjlhq35xd2yxksiwy2zwj9a4km8nm-libssh2-1.11.1-dev/include/libssh2.h:798:42: note: expected 'void (*)(const char *, int,  const char *, int,  int,  const LIBSSH2_USERAUTH_KBDINT_PROMPT *, LIBSSH2_USERAUTH_KBDINT_RESPONSE *, void **)' but argument is of type 'void (*)(void)'
  798 |                                          LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC
      |                                          ^
make[3]: *** [Makefile:781: ssh.o] Error 1
make[3]: Leaving directory '/build/source/src/modsrc'
make[2]: *** [Makefile:418: all-recursive] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:446: all-recursive] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:344: all] Error 2

@evysgarden

Copy link
Copy Markdown
Contributor Author

the medusa package not building seems unrelated, there's an issue for that here: #481545

.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jan 23, 2026
@pbsds

pbsds commented Jan 24, 2026

Copy link
Copy Markdown
Member

Thank you!

@pbsds pbsds added this pull request to the merge queue Jan 24, 2026
Merged via the queue into NixOS:master with commit 5d2c427 Jan 24, 2026
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants