!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

724 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org145 Servers

Load older messages


SenderMessageTime
26 Apr 2025
@sternenseemann:systemli.orgsterni (he/him)but it may be possible, not sure. 11:38:32
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)I can also let loongson guys to compile an ideal binary tarball if it really doesn't work11:39:58
@emilazy:matrix.orgemilywe don't put anything not built by Hydra on tarballs.nixos.org12:01:20
@emilazy:matrix.orgemily I guess just fetchurling something wouldn't be the end of the world though, we already have some mystery-meat third-party binaries in tree… 12:01:38
@emilazy:matrix.orgemilybut we'd really prefer to avoid it if at all possible of course12:01:53
@emilazy:matrix.orgemilybinaries from Hydra >> binaries from upstream >>> all other binaries12:02:16
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)
=> nix-build -A pkgsCross.loongarch64-linux.haskell.packages.ghc984.ghc
evaluation warning: build: x86_64-linux host: x86_64-linux target: loongarch64-linux
this derivation will be built:
  /nix/store/dpwqr9489b1mkgmili5fpxci31if3n2a-loongarch64-unknown-linux-gnu-ghc-9.8.4.drv

Well

12:49:15
@emilazy:matrix.orgemily huh. host should be loongarch64-linux unless you use buildPackages? 12:50:47
@emilazy:matrix.orgemilysplicing issue maybe?12:51:02
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)
In reply to @emilazy:matrix.org
splicing issue maybe?
Very likely
12:51:29
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) Because the attribute is referenced from buildPackages: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/haskell-packages.nix#L482 13:04:18
@sternenseemann:systemli.orgsterni (he/him) haskell.packages.*.ghc is like stdenv.cc 13:04:56
@sternenseemann:systemli.orgsterni (he/him) haskell.compiler.* would be cross compiled 13:05:10
@emilazy:matrix.orgemily hm, wouldn't it make more sense to use buildPackages explicitly for that? 13:08:49
@emilazy:matrix.orgemily I assume that pkgsCross.foo.* is going to have host foo unless * starts with buildPackages. (with stdenv as an unfortunate exception) 13:09:20
@emilazy:matrix.orgemilyI guess there are probably other unfortunate exceptions already though.13:09:31
@emilazy:matrix.orgemilyWTB universe without the GNU idea of cross…13:10:01
@sternenseemann:systemli.orgsterni (he/him)as said, it’s like stdenv with all the weirdness involved, this is probably the best way to do it. You can’t even do an equivalent of libc/cc split13:26:18
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) I think I'm on the right track now. The performance impact of enableUnregisterised is really huge 14:36:42
@ashinnv:matrix.orgMr Mayhem changed their display name from Magnolia Mayhem to Magnolia Mayhem: Rallycar Mailman.14:40:29
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) @sterni I now get to the same point you got in https://gitlab.haskell.org/ghc/ghc/-/issues/22006 now 15:37:01
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)The log says "Run Ghc CompileHs Stage1" but the resulting ghc is stage015:38:16
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) But if, say, I put this ghc into the derivation again, it would start complaining about hostPlatform != buildPlatform 15:39:17
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)Like they said in https://gitlab.haskell.org/ghc/ghc/-/issues/22006#note_448234 and https://gitlab.haskell.org/ghc/ghc/-/wikis/building/cross-compiling#terminology-and-background15:40:55
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)"build must equal host"15:41:06
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) But someone wrote here https://bbs.loongarch.org/d/150-ghc-loongarch that they did cross compile to loongarch64 2 years ago with ghc 9.6 and they just used --target=loongarch64-unknown-linux-gnu and hadrian/build, nothing special 15:43:43
@alex:tunstall.xyzAlex

Make used nonstandard cross terminology and the configure script was designed to match.

Hadrian fixed that confused terminology, but the configure script was never updated to match.

16:00:37
27 Apr 2025
@sternenseemann:systemli.orgsterni (he/him)What makes you say that? stage0 is passed in (i.e. the bootstrap compiler), so you can't really get it out.09:38:10
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)
In reply to @sternenseemann:systemli.org
What makes you say that? stage0 is passed in (i.e. the bootstrap compiler), so you can't really get it out.
The resulting binary is x86_64-x86_64-loong64,instead of x86_64-loong64-loong64
09:39:26
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)build-host-target09:39:36

Show newer messages


Back to Room ListRoom Version: 6