When I run nix-shell -p supertux I expect the supertux program to become available/runnable. Instead I get an error message, indicating failure in the configuration phase. I am on nixos-unstable
Running phase: configurePhase
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/doc/SUPERTUX -DCMAKE_INSTALL_INFODIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/man -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/include -DCMAKE_INSTALL_SBINDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/lib -DCMAKE_STRIP=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/strip -DCMAKE_RANLIB=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/ranlib -DCMAKE_AR=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3 -DENABLE_BOOST_STATIC_LIBS=OFF
CMake Warning (dev) at CMakeLists.txt:37 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 15.2.0
-- The CXX compiler identification is GNU 15.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:141 (find_package):
Could not find a package configuration file provided by "boost_system"
(requested version 1.89.0) with any of the following names:
boost_systemConfig.cmake
boost_system-config.cmake
Add the installation prefix of "boost_system" to CMAKE_PREFIX_PATH or set
"boost_system_DIR" to a directory containing one of the above files. If
"boost_system" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:262 (boost_find_component)
CMakeLists.txt:174 (find_package)
-- Configuring incomplete, errors occurred!
error: Cannot build '/nix/store/in6dryywcqygsk71l9gqw1d8i6nyyb67-supertux-0.6.3.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3
Last 25 log lines:
> -- Check for working C compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/gcc - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/g++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> CMake Error at /nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:141 (find_package):
> Could not find a package configuration file provided by "boost_system"
> (requested version 1.89.0) with any of the following names:
>
> boost_systemConfig.cmake
> boost_system-config.cmake
>
> Add the installation prefix of "boost_system" to CMAKE_PREFIX_PATH or set
> "boost_system_DIR" to a directory containing one of the above files. If
> "boost_system" provides a separate development package or SDK, be sure it
> has been installed.
> Call Stack (most recent call first):
> /nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:262 (boost_find_component)
> CMakeLists.txt:174 (find_package)
>
>
> -- Configuring incomplete, errors occurred!
For full logs, run:
nix log /nix/store/in6dryywcqygsk71l9gqw1d8i6nyyb67-supertux-0.6.3.drv
I guess this is part of unstability that comes with the unstable-branch of nixpkgs. What can one do in such a situation? Manually patch the configuration phase in the package.nix file at nixpkgs/pkgs/by-name/su/superTux/package.nix at e764fc9a405871f1f6ca3d1394fb422e0a0c3951 · NixOS/nixpkgs · GitHub ? And build it yourself with nix-build? (I am not that knowledgeable with cmake/whatever boost is)
full error log
Running phase: unpackPhase
@nix { “action”: “setPhase”, “phase”: “unpackPhase” }
unpacking source archive /nix/store/zqb2np0p0yrq8a6hx9zm2l38bx9ax7w5-SuperTux-v0.6.3-Source.tar.gz
source root is SuperTux-v0.6.3-Source
setting SOURCE_DATE_EPOCH to timestamp 1640214235 of file “SuperTux-v0.6.3-Source/external/discord-sdk/src/discord_register_linux.cpp”
Running phase: patchPhase
@nix { “action”: “setPhase”, “phase”: “patchPhase” }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { “action”: “setPhase”, “phase”: “updateAutotoolsGnuConfigScriptsPhase” }
Updating Autotools / GNU config script to a newer upstream version: ./external/SDL_ttf/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./external/SDL_ttf/external/freetype-2.4.12/builds/unix/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./external/SDL_ttf/config.guess
Updating Autotools / GNU config script to a newer upstream version: ./external/SDL_ttf/external/freetype-2.4.12/builds/unix/config.guess
Running phase: configurePhase
@nix { “action”: “setPhase”, “phase”: “configurePhase” }
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/doc/SUPERTUX -DCMAKE_INSTALL_INFODIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/share/man -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/include -DCMAKE_INSTALL_SBINDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3/lib -DCMAKE_STRIP=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/strip -DCMAKE_RANLIB=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/ranlib -DCMAKE_AR=/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/lq95gffpiqfvqkqj8400zcsvzks3zcc8-supertux-0.6.3 -DENABLE_BOOST_STATIC_LIBS=OFF
e\[33mCMake Warning (dev) at CMakeLists.txt:37 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
e\[0m
– The C compiler identification is GNU 15.2.0
– The CXX compiler identification is GNU 15.2.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/gcc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/g++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
e\[31mCMake Error at /nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:141 (find_package):
Could not find a package configuration file provided by “boost_system”
(requested version 1.89.0) with any of the following names:
boost_systemConfig.cmake
boost_system-config.cmake
Add the installation prefix of “boost_system” to CMAKE_PREFIX_PATH or set
“boost_system_DIR” to a directory containing one of the above files. If
“boost_system” provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/nix/store/adv73gqmglkg48w5ql70s778ba6wpbs4-boost-1.89.0-dev/lib/cmake/Boost-1.89.0/BoostConfig.cmake:262 (boost_find_component)
CMakeLists.txt:174 (find_package)
e\[0m
– Configuring incomplete, errors occurred!
nix-info --markdown
- system:
"x86_64-linux"
- host os:
Linux 6.18.12, NixOS, 26.05 (Yarara), 26.05pre948083.0182a3613243
- multi-user?:
yes
- sandbox:
yes
- version:
nix-env (Nix) 2.31.3
- channels(root):
"nixos, nixpkgs"
- channels(REDACTED):
"nixos"
- nixpkgs:
/nix/store/74lrn4968lcj1hhf53lp08wai0dbjamx-nixos/nixos
This is broken upstream (nixpkgs). You should open an issue on the nixpkgs GitHub.
my “fix” for now: use boost186 instead. From the logs we see there is some problem with boost, so replace that with an older version. nix-build works on this. Can someone give “feedback” on this temporary fix?
let pkgs = import <nixpkgs> {};
in
pkgs.stdenv.mkDerivation rec {
pname = "supertux";
version = "0.6.3";
src = pkgs.fetchurl {
url = "https://github.com/SuperTux/supertux/releases/download/v${version}/SuperTux-v${version}-Source.tar.gz";
sha256 = "1xkr3ka2sxp5s0spp84iv294i29s1vxqzazb6kmjc0n415h0x57p";
};
postPatch = ''
sed '1i#include <memory>' -i external/partio_zip/zip_manager.hpp # gcc12
# Fix build with cmake 4. Remove for version >= 0.6.4.
# See <https://github.com/SuperTux/supertux/pull/3093>
substituteInPlace CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 3.1)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/physfs/CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 2.8.12)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/sexp-cpp/CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 3.0)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/squirrel/CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 2.8)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/tinygettext/CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 2.4)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/SDL_ttf/CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 3.0)' \
'cmake_minimum_required(VERSION 4.0)'
substituteInPlace external/discord-sdk/CMakeLists.txt --replace-fail \
'cmake_minimum_required (VERSION 3.2.0)' \
'cmake_minimum_required (VERSION 4.0)'
'';
nativeBuildInputs = with pkgs; [
pkg-config
cmake
];
buildInputs = with pkgs; [
boost186
curl
SDL2
SDL2_image
libSM
libXext
libpng
freetype
libGL
libGLU
glew
glm
openal
libogg
libvorbis
];
cmakeFlags = [ "-DENABLE_BOOST_STATIC_LIBS=OFF" ];
postInstall = ''
mkdir $out/bin
ln -s $out/games/supertux2 $out/bin
'';
meta = {
description = "Classic 2D jump'n run sidescroller game";
homepage = "https://supertux.github.io/";
license = pkgs.lib.licenses.gpl2Plus;
maintainers = with pkgs.lib.maintainers; [ pSub ];
platforms = with pkgs.lib.platforms; linux;
mainProgram = "supertux2";
};
}
Actually, the asiocase is not quite the same. Arch Linux have a patch in their repository.
Would you recommend making an overlay for supertux in /etc/nix/configuartion.nix using an older boost version in the meantime? I just need to change one of the buildInputs to make supertux compile again … I currently have no github account to submit the issue and am interested in how to fix things temporally myself if stuff should break.
Based on the error, it occurs because in boost 1.89 a compatibility layer was removed, so using an older version of boost should be okay.
The old versions of boostare maintained in nixpkgs so you will not have to rebuild boost.
I have opened a PR to fix it in nixpkgs.