15 Sep 2025 |
emily | it's not hard to adapt stuff to newer versions | 13:50:54 |
emily | just slightly tedious sometimes | 13:50:59 |
Alex | In reply to @emilazy:matrix.org it's not hard to adapt stuff to newer versions This one's non-trivial... Actually something wrong with Hugs' version of base IIRC (maybe a slightly less old base could be patched in?)
ERROR "libraries/bootlib/Foreign/C/Types.hs":173 - Undefined type constructor "NotReallyAType"
| 13:54:22 |
John Ericson | Oo Haven caught up in all of this, but I like where things are going | 13:54:21 |
John Ericson | *haven't | 13:54:25 |
emily | this is at runtime? | 13:55:12 |
emily | smells like latent UB in Hugs that's getting exposed | 13:55:23 |
Alex | Nope, build time. | 13:55:29 |
emily | but that's not C | 13:55:39 |
emily | I mean it's Hugs outputting that right | 13:55:50 |
emily | so it's Hugs runtime | 13:55:55 |
Alex | The NotReallyAType comes from base's autoconf script somehow not finding the corresponding Haskell type for a few C types. | 13:56:31 |
emily | I see | 13:58:14 |
emily | probably there are new warnings/errors in GCC confusing it | 13:58:32 |
emily | that happens a lot in autoconf | 13:58:41 |
emily | check config.log | 13:58:43 |
emily | you'll probably see some ancient looking C program that needs adapting | 13:58:56 |
emily | you should of course autoreconfHook and get it on latest autotools | 13:59:10 |
Alex | Thanks for the advice. I'll take a look when I get to work on the PRs. | 14:05:39 |
bglgwyng | I realized that I diagnosed the issue wrong | 15:02:06 |
bglgwyng | {
packages.zlib1 = (pkgs.haskellPackages.zlib).override { zlib = pkgs.zlib; };
# it works
packages.zlib2 = (pkgs.haskellPackages.callCabal2nix "zlib" inputs.zlib-src { }).override { zlib = pkgs.zlib; };
# it works
packages.splitmix1 = (pkgs.haskellPackages.splitmix).override { testu01 = null; };
# it doesn't work
packages.splitmix2 = (pkgs.haskellPackages.callCabal2nix "splitmix" inputs.splitmix-src { }).override { testu01 = null; };
};
Only the last one failed with 'error: function 'anonymous lambda' called without required argument 'testu01''
| 15:02:33 |
bglgwyng | Here is the reproducer https://github.com/bglgwyng/haskellPackages-override | 15:02:59 |
bglgwyng | * {
packages.zlib1 = (pkgs.haskellPackages.zlib).override { zlib = pkgs.zlib; };
# it works
packages.zlib2 = (pkgs.haskellPackages.callCabal2nix "zlib" inputs.zlib-src { }).override { zlib = pkgs.zlib; };
# it works
packages.splitmix1 = (pkgs.haskellPackages.splitmix).override { testu01 = null; };
# it doesn't work
packages.splitmix2 = (pkgs.haskellPackages.callCabal2nix "splitmix" inputs.splitmix-src { }).override { testu01 = null; };
};
Only the last one failed with error: function 'anonymous lambda' called without required argument 'testu01'
| 15:03:21 |
bglgwyng | I can see testu01 in the arguments of cabal2nix-splitmix, but somehow the override failed. | 15:04:08 |
keypusher | I have a hard time getting protoc (on the PATH) while building a package with callCabal2Nix. It's used by cabal extension. | 15:20:20 |
keypusher | Are there any tricks to troubleshooting that? | 15:21:06 |
sterni (he/him) | keypusher: cabal2nix does not really have the ability to do that automatically since Cabal does not allow specifying a dependency on a build tool that is not itself a Cabal package. You need to use addBuildTools or the like from haskell.lib.compose . | 15:32:07 |
sterni (he/him) | bglgwyng: on what system does packages.splitmix2 fail to evaluate? | 15:36:34 |
keypusher | Oh ok. I tried googling "haskell.lib.compose addBuildtools" but came up a bit short. You don't happen to have some useful url? | 15:37:31 |
keypusher | thanks btw! | 15:37:53 |