!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

702 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/140 Servers

Load older messages


SenderMessageTime
20 Nov 2025
@opna2608:matrix.orgPuna
In reply to @magic_rb:matrix.redalder.org
anyone have any pointers for the cross compiling GHC itself issue? i would like to get some kind of GHC for armv6l if at all possible (would also help the riscv people)
you could also bootstrap by packaging a ghc built by debian
21:43:03
@opna2608:matrix.orgPunaoh wait, v6... only if they have that one ig21:44:51
@magic_rb:matrix.redalder.orgmagic_rbi think itll build, its been building for 26 minutes now21:45:21
@magic_rb:matrix.redalder.orgmagic_rbwhether itll be funtional, who knows21:45:26
@magic_rb:matrix.redalder.orgmagic_rbif i want to upcompile to 984 id have to first go through 966 right? i recall something about them using extensions where are at least two minor releases old21:50:10
@opna2608:matrix.orgPuna cross-compiled haskell.compiler.ghc94 just segfaulted the moment i tried to do anything with it on ppc64. maybe it does better on armv6 though.
otherwise, trixie has a prebuilt ghc 9.6.6 for armel that you could yoink for bootstrapping, I think that should work for armv6?
https://packages.debian.org/trixie/ghc
21:58:01
@magic_rb:matrix.redalder.orgmagic_rbnot sure21:59:28
@magic_rb:matrix.redalder.orgmagic_rbarmel and armhf are not very descriptive21:59:35
@opna2608:matrix.orgPunahttps://wiki.debian.org/ArmEabiPort https://wiki.debian.org/ArmHardFloatPort22:00:03
@magic_rb:matrix.redalder.orgmagic_rbah armel is armv6 but not HF22:00:07
@magic_rb:matrix.redalder.orgmagic_rbi think?22:00:12
@opna2608:matrix.orgPuna

The ARM EABI port (armel) is the default port in Debian for ARM architecture versions 4T, 5T, and 6.

From Debian 10 (buster), 4T is no longer supported and the armel baseline was updated to 5T. If you have 4T hardware, please use Debian stretch or upgrade your hardware.

22:00:36
@opna2608:matrix.orgPunaand armhf says that it needs v722:00:56
@magic_rb:matrix.redalder.orgmagic_rbyeah22:01:15
@magic_rb:matrix.redalder.orgmagic_rbwell, im gonna let the GHC we have finish crossing and see22:01:26
@magic_rb:matrix.redalder.orgmagic_rb Puna youll never believe what i got 22:09:43
@opna2608:matrix.orgPuna50/5022:09:59
@magic_rb:matrix.redalder.orgmagic_rb
$ ./result/bin/ghci
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault (core dumped)

:(

22:10:14
@opna2608:matrix.orgPunai'd believe it22:10:20
@magic_rb:matrix.redalder.orgmagic_rbthough tbf im also running this through fucking qemu which isnt helping probably22:10:36
@magic_rb:matrix.redalder.orgmagic_rbcan hetzner VMs execute armv6? probably not22:10:53
@opna2608:matrix.orgPunaif you do wanna go the debian GHC way, you can yoink code from this https://github.com/NixOS/nixpkgs/pull/43925822:10:59
@alex:tunstall.xyzAlex
In reply to @opna2608:matrix.org
cross-compiled haskell.compiler.ghc94 just segfaulted the moment i tried to do anything with it on ppc64. maybe it does better on armv6 though.
otherwise, trixie has a prebuilt ghc 9.6.6 for armel that you could yoink for bootstrapping, I think that should work for armv6?
https://packages.debian.org/trixie/ghc
Try overriding it to force an unregisterised build (there is an option in the arguments for this).
22:14:26
21 Nov 2025
@opna2608:matrix.orgPuna

that works, neat!

puna@Yubel ~> /nix/store/vyxi39wvrq4kzr0d18q4vplrczhh7ijk-ghc-powerpc64-unknown-linux-gnuabielfv1-9.4.8/bin/ghci
GHCi, version 9.4.8: https://www.haskell.org/ghc/  :? for help
ghci> :load /dev/shm/peano.hs
[1 of 2] Compiling Main             ( /dev/shm/peano.hs, interpreted )
Ok, one module loaded.
ghci> toPeano 21             
Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Zero))))))))))))))))))))
00:04:00
@magic_rb:matrix.redalder.orgmagic_rbHowd you overwrite it? Show code00:04:25
@opna2608:matrix.orgPuna
↪ nix-build --no-out-link --max-jobs 1 --cores 30 -E '
  with import ./. { };

  pkgsCross.ppc64-elfv1.haskell.compiler.ghc94.override {
    enableUnregisterised = true;
  }'
00:04:46
@magic_rb:matrix.redalder.orgmagic_rb Ill have to do the same most likely 00:04:51
@magic_rb:matrix.redalder.orgmagic_rbDidnt they plan to remove unregistered builds?00:05:00
@magic_rb:matrix.redalder.orgmagic_rbThough, theyve been planning to remove unregistered ever since i know what GHC is, sooo probably not happening soon00:05:39
@alex:tunstall.xyzAlex
In reply to @magic_rb:matrix.redalder.org
Didnt they plan to remove unregistered builds?
That's no good if GHC can't generate valid code with NCG/LLVM for your platform.
Anyway, it might not be needed for newer GHCs (IIRC with RISC-V changing Nixpkgs version without changing GHC fixed the registerised segfault).
00:08:53

Show newer messages


Back to Room ListRoom Version: 6