From 9bb9d548ad4cc84199319853525004f98391b487 Mon Sep 17 00:00:00 2001 From: Faye Chun Date: Fri, 2 Feb 2024 22:00:10 -0500 Subject: stepmania: fix aarch64-linux build by using libpng from nixpkgs Currently, the aarch64-linux build of Stepmania fails with libpng linkage errors: > ld: ../extern/libpng.a(pngrtran.c.o): in function `png_do_read_transformations': > pngrtran.c:(.text+0x4118): undefined reference to `png_riffle_palette_neon' > ld: pngrtran.c:(.text+0x5188): undefined reference to `png_do_expand_palette_rgba8_neon' > ld: pngrtran.c:(.text+0x6268): undefined reference to `png_do_expand_palette_rgb8_neon' > ld: ../extern/libpng.a(pngrutil.c.o): in function `png_read_filter_row': > pngrutil.c:(.text+0x6734): undefined reference to `png_init_filter_functions_neon' > collect2: error: ld returned 1 exit status Stepmania vendors many dependencies in source form in their code repository; it appears that the libpng build configured there seems to be either misconfigured or isn't building correctly under NixOS. I played around with a couple of NEON-related compile flags but couldn't get anything to stick. A workaround that works seems to be building against the Nixpkgs libpng instead. It builds, launch, and (so far) plays correctly on my NixOS-based M1 Air and my PC. --- pkgs/games/stepmania/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkgs/games/stepmania/default.nix') diff --git a/pkgs/games/stepmania/default.nix b/pkgs/games/stepmania/default.nix index bfd871a2a1c14..000b07c5433d9 100644 --- a/pkgs/games/stepmania/default.nix +++ b/pkgs/games/stepmania/default.nix @@ -11,6 +11,7 @@ , gtk2 , libmad , libogg +, libpng , libpulseaudio , libvorbis , udev @@ -51,6 +52,7 @@ stdenv.mkDerivation { gtk2 libmad libogg + libpng libpulseaudio libvorbis udev @@ -59,6 +61,7 @@ stdenv.mkDerivation { cmakeFlags = [ "-DWITH_SYSTEM_FFMPEG=1" + "-DWITH_SYSTEM_PNG=on" "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" ]; @@ -79,8 +82,6 @@ stdenv.mkDerivation { platforms = platforms.linux; license = licenses.mit; # expat version maintainers = with maintainers; [ h7x4 ]; - # never built on aarch64-linux since first introduction in nixpkgs - broken = stdenv.isLinux && stdenv.isAarch64; mainProgram = "stepmania"; }; } -- cgit 1.4.1