(At least) Haskell projects using gtk can't be built:
Building library for termonad-1.1.0.0..
[ 1 of 13] Compiling Paths_termonad ( dist/build/autogen/Paths_termonad.hs, dist/build/Paths_termonad.o )
[ 2 of 13] Compiling Termonad.Prelude ( src/Termonad/Prelude.hs, dist/build/Termonad/Prelude.o )
[ 3 of 13] Compiling Termonad.Gtk ( src/Termonad/Gtk.hs, dist/build/Termonad/Gtk.o )
[ 4 of 13] Compiling Termonad.Config.Vec ( src/Termonad/Config/Vec.hs, dist/build/Termonad/Config/Vec.o )
<no location info>: error:
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.3 for x86_64-unknown-linux):
Dynamic linker not initialised
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
[ 5 of 13] Compiling Termonad.Types ( src/Termonad/Types.hs, dist/build/Termonad/Types.o )
[ 6 of 13] Compiling Termonad.Lenses ( src/Termonad/Lenses.hs, dist/build/Termonad/Lenses.o )
<no location info>: error:
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.3 for x86_64-unknown-linux):
Dynamic linker not initialised
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
[10 of 13] Compiling Termonad.Config ( src/Termonad/Config.hs, dist/build/Termonad/Config.o )
src/Termonad/Config.hs:59:1: warning: [-Wunused-imports]
The import of ‘Termonad.Prelude’ is redundant
except perhaps to import instances from ‘Termonad.Prelude’
To import instances alone, use: import Termonad.Prelude()
|
59 | import Termonad.Prelude hiding ((\\), index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[11 of 13] Compiling Termonad.XML ( src/Termonad/XML.hs, dist/build/Termonad/XML.o )
<no location info>: error:
<command line>: can't load .so/.DLL for: /nix/store/bxn1z7cd6xfk0sbf7lfx7b494i0rkdd2-gi-gtk-3.0.27/lib/ghc-8.6.3/x86_64-linux-ghc-8.6.3/libHSgi-gtk-3.0.27-HjUeo8DG7OPGZlez0Dvqrr-ghc8.6.3.so (/nix/store/bxn1z7cd6xfk0sbf7lfx7b494i0rkdd2-gi-gtk-3.0.27/lib/ghc-8.6.3/x86_64-linux-ghc-8.6.3/libHSgi-gtk-3.0.27-HjUeo8DG7OPGZlez0Dvqrr-ghc8.6.3.so: undefined symbol: gtk_cell_accessible_parent_get_row_header_cells)
Per https://bugs.archlinux.org/task/61486, the problem seems to be a mismatch between what is actually exported by the library and what the interface file says is available (oh, for a single source of truth!).
https://gitlab.gnome.org/GNOME/gtk/commit/95c0f07295fd300ab7f3416a39290ae33585ea6c has a patch that may resolve it---I'm going to try, but of course it means recompiling everything that touches Gtk. Sigh.
Attempt to install the termonad
haskell package.
"x86_64-linux"
Linux 4.20.7, NixOS, 19.03.git.8489ee3 (Koi)
yes
yes
nix-env (Nix) 2.2
""
""
/var/nixup/nixpkgs
I can confirm that the referenced patch resolves the issue.
This issue isn't relevant to 18.09, right? EDIT: termonad
seems to compile fine for me as of 89bf7472a.
I track master, so I'm happy to take your word for it.
It affects gtk 3.24.3, 3.24.4 and 3.24.5 fwiw.
For anyone who wants a local fix on unstable, including the patch in just the gtk3
passed to whatever haskell-gi
components are used should probably do it. For instance, taffybar links correctly with just gi-gdk
depending on a patched gtk3
.
It affects gtk 3.24.3, 3.24.4 and 3.24.5 fwiw.
For anyone who wants a local fix on unstable, including the patch in just the
gtk3
passed to whateverhaskell-gi
components are used should probably do it. For instance, taffybar links correctly with justgi-gdk
depending on a patchedgtk3
.
I haven't been able to construct an expression that does this; could you perhaps share your solution?
@mdormon For taffybar specifically, this overlay should work:
self: super:
let
gtk3 = super.gtk3.overrideAttrs (oa: {
patches = [
(self.fetchpatch {
# missing symbols but exported from gir
url = https://gitlab.gnome.org/GNOME/gtk/commit/95c0f07295fd300ab7f3416a39290ae33585ea6c.patch;
sha256 = "0z9w7f39xcn1cbcd8jhx731vq64nvi5q6kyc86bq8r00daysjwnl";
})
];
});
in
{
haskellPackages = with self.haskell.lib; super.haskellPackages.extend (hself: hsuper: {
gi-gdk = hsuper.gi-gdk.override { inherit gtk3; };
taffybar = hsuper.taffybar.overrideAttrs (oa : {
src = self.fetchFromGitHub {
owner = "taffybar";
repo = "taffybar";
rev = "e382599358bb06383ba4b08d469fc093c11f5915";
sha256 = "0qncwpfz0v2b6nbdf7qgzl93kb30yxznkfk49awrz8ms3pq6vq6g";
};
});
});
}
Using master, I still can't build Taffybar:
<command line>: can't load .so/.DLL for: /nix/store/1lvixr2066lb9069826i9r7djhb1lk5c-gi-gtk-3.0.27/lib/ghc-8.6.3/x86_64-linux-ghc-8.6.3/libHSgi-gtk-3.0.27-8Ml40RERHMfClp1aWsK8RM-ghc8.6.3.so (/nix/store/1lvixr2066lb9069826i9r7djhb1lk5c-gi-gtk-3.0.27/lib/ghc-8.6.3/x86_64-linux-ghc-8.6.3/libHSgi-gtk-3.0.27-8Ml40RERHMfClp1aWsK8RM-ghc8.6.3.so: undefined symbol: gtk_cell_accessible_parent_get_row_header_cells)
Did f9a62dbace5b0f7924f59ade45c750479a6ab0ab undo the change?
Indeed, it looks like https://gitlab.gnome.org/GNOME/gtk/commit/a52431d2b42f3b458a3a2142f6f3e2c4501c1ccc was not backported: https://gitlab.gnome.org/GNOME/gtk/blob/3.24.5/gtk/a11y/gtkcellaccessibleparent.h#L131-135
This should be fixed _again_, ATM in staging-next and staging-19.03.
Thanks @srhb, that overlay helped me today (except I had to change it to oa.patches = oa.patches ++ [ ... ]
).
Most helpful comment
This should be fixed _again_, ATM in staging-next and staging-19.03.