Change:
Describe the bug I'm trying to use latest unstable branch in a flake that contains ROOT 6.22.08. The package contains a program . When I try to launch that, I got the following segmentation fault, hinting on build time and runtime conflict for : To Reproduce Steps to reproduce the behavior: from Expected behavior The program should run w/o problem Additional context The command line runs OK, provided that no graphical interface is invoked. Same segmentation fault would occur if in a shell, I do the following: Notify maintainers <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- Metadata Please run and paste the result. Not sure if this is useful, as I tried to install as part of my flake yet I still get this: system: host os: multi-user?: sandbox: version: channels(root): nixpkgs: Maintainer information:
Can you reproduce the crash with ?
Yes:
I don't have an access to NixOS at the moment to reproduce. Do you think you could git-bisect this?
Yes. I'll try to do this sometime this week, if I have time. Just to be sure, everything is OK on macOS?
Yes, it works great:
I did a poorman's bisect with : I think the commit that breaks ROOT is . The commit immediately before that still has a working ROOT (6.18).
On a side, I first tried with the following: But complains: Do you have any suggestion to make this automated bisect work?
git-bisect expects certain return codes to be returned. Perhaps you could try wrapping it in
That is helpful. Google says this is an old problem [1], so it has probably to do with incomplete afterimage unvendoring. [1] https://root-
In the end, the problem was this one: https://root-
Wow, this is a very old "problem" then. I guess previously was not used as a build input so that we never noticed this.

Discussion:
<del> { lib, stdenv, fetchurl, zlib }: </del> <ins> { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib , static ? stdenv.hostPlatform.isStatic , withX ? !stdenv.isDarwin }: </ins> stdenv.mkDerivation { pname = "libAfterImage";

sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf"; }; <del> buildInputs = [ zlib ]; </del> <ins> patches = [ # add back --with-gif option (fetchpatch { name = "libafterimage-gif.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-gif.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; sha256 = "16pa94wlqpd7h6mzs4f0qm794yk1xczrwsgf93kdd3g0zbjq3rnr"; }) # fix build with newer giflib (fetchpatch { name = "libafterimage-giflib5-v2.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-giflib5-v2.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; sha256 = "0qwydqy9bm73cg5n3vm97aj4jfi70p7fxqmfbi54vi78z593brln"; stripLen = 1; }) # fix build with newer libpng (fetchpatch { name = "libafterimage-libpng15.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-libpng15.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; sha256 = "1qyvf7786hayasfnnilfbri3p99cfz5wjpbli3gdqj2cvk6mpydv"; }) # fix an ldconfig problem (fetchpatch { name = "libafterimage-makefile.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-makefile.in.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; sha256 = "1n6fniz6dldms615046yhc4mlg9gb53y4yfia8wfz6szgq5zicj4"; }) ]; patchFlags = [ "-p0" ]; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11; preConfigure = '' rm -rf {libjpeg,libpng,libungif,zlib}/ substituteInPlace Makefile.in  --replace "include .depend" "" '' + lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile.in  --replace "-soname," "-install_name,$out/lib/" ''; configureFlags = [ "--with-gif" "--disable-mmx-optimization" "--${if static then "enable" else "disable"}-staticlibs" "--${if !static then "enable" else "disable"}-sharedlibs" ] ++ lib.optional withX "--with-x"; </ins> meta = with lib; { homepage = "http://www.afterstep.org/afterimage/";