!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

554 Members
119 Servers

Load older messages


SenderMessageTime
5 Jul 2021
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels joined the room.19:21:38
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels 19:49:35
6 Jul 2021
@nurelin:matrix.orgnurelin joined the room.11:43:42
@7c6f434c:nitro.chat7c6f434c left the room.15:50:41
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels changed their display name from spacesbot to spacesbot - keeps a log of public NixOS channels.22:11:42
9 Jul 2021
@vika:matrix.nice.sampler.fivika (she/her) 🏳️‍⚧️ set a profile picture.16:38:59
11 Jul 2021
@sternenseemann:systemli.orgsterniRedacted or Malformed Event11:30:34
@sternenseemann:systemli.orgsterniRedacted or Malformed Event12:44:59
@ius:nltrix.netius When crossSystem is set when importing nixpkgs, aren't all entries outside of buildPackages supposed to target the cross architecture? 13:32:13
@ius:nltrix.netius
"powerpc-unknown-linux-musl"

nix-repl> hello
«derivation /nix/store/6axas7kiammp06swr9kr8582jm82lyag-hello-powerpc-unknown-linux-musl-2.10.drv»

nix-repl> getent
«derivation /nix/store/j97rd009di0d19z592zn6qvvmzmbw9ks-getent-1003.1-2008.drv»```
13:32:28
@ius:nltrix.netius *
"powerpc-unknown-linux-musl"

nix-repl > hello
«derivation /nix/store/6axas7kiammp06swr9kr8582jm82lyag-hello-powerpc-unknown-linux-musl-2.10.drv»

nix-repl > getent
«derivation /nix/store/j97rd009di0d19z592zn6qvvmzmbw9ks-getent-1003.1-2008.drv»```
13:32:54
@ius:nltrix.netius *
nix-repl > stdenv.targetPlatform.config
"powerpc-unknown-linux-musl"

nix-repl > hello
«derivation /nix/store/6axas7kiammp06swr9kr8582jm82lyag-hello-powerpc-unknown-linux-musl-2.10.drv»

nix-repl > getent
«derivation /nix/store/j97rd009di0d19z592zn6qvvmzmbw9ks-getent-1003.1-2008.drv»```
13:33:34
@sternenseemann:systemli.orgsterni ius: getent likely only sets name and not pname / version, so the config isn't mangled into the final derivation name 13:33:58
@ius:nltrix.netiushmm, so you're saying it should target ppc, yet just doesn't have a mangled name?13:34:46
@ius:nltrix.netiusCause I ran into a build failure of one of its dependencies, and ended up being confused whether it should be a cross package or not.13:35:54
@sternenseemann:systemli.orgsterni
In reply to @ius:nltrix.net
hmm, so you're saying it should target ppc, yet just doesn't have a mangled name?
yes
13:36:30
@sternenseemann:systemli.orgsternigetent is a wrapper derivation generated using runCommand, so it doesn't have the pname/version split13:37:06
@ius:nltrix.netiusRight, if I build it separately I can see it builds a derivation of the mangled version as well as the wrapper. In that case, the issue is in the dependency13:38:13
@ius:nltrix.netius
ar x /nix/store/y7z59i6l25m46jdqgqxjpbzsq4npd9mb-compat-netbsd-9.1-powerpc-unknown-linux-musl/lib/libnbcompat.a db.lo
# file db.lo
db.lo: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
13:42:45
@ius:nltrix.netius

Git history tells me it should cross compile, but I don't see how that's supposed to work looking at the source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/bsd/netbsd/default.nix#L160

    # the build system re-runs `./configure` with `HOST_CC` (which is their
    # name for Build CC) as a compiler to make `defs.mk`, which is installed
    depsBuildBuild = [ buildPackages.stdenv.cc ] ++ commonDeps;
    HOST_CC = "${buildPackages.stdenv.cc.targetPrefix}cc";
13:48:40
@ius:nltrix.netius It seems to run configure with a correct --host, but then run it again with CC set to the build cc, then make afterwards obviously results in wrong output 13:51:03
12 Jul 2021
@rick:matrix.ciphernetics.nlRick (Mindavi) joined the room.08:17:49
@rick:matrix.ciphernetics.nlRick (Mindavi)Hey! Just found out there's a room for cross-compilation :)08:19:23
@domenkozar:matrix.orgDomen Kožar ius: nice, see https://github.com/NixOS/patchelf/issues/283 12:25:04
@sternenseemann:systemli.orgsterni Domen Kožar: btw we can have fork()ing binaries with binfmt_misc in user space however the executable formats need to be registered via /proc first, so this is inherently impure, sadly 13:44:14
@domenkozar:matrix.orgDomen Kožar sterni (he/him): does that require sudo? 13:44:56
@sternenseemann:systemli.orgsterniyes13:50:51
@sternenseemann:systemli.orgsternihttps://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html13:50:52
13 Jul 2021
@siraben:matrix.orgsiraben
In reply to @rick:matrix.ciphernetics.nl
Hey! Just found out there's a room for cross-compilation :)
it's awesome 😎
01:38:10
15 Jul 2021
@piegames:matrix.orgpiegames How can I get a pkgs.pkgsCross.myCustomSystem? Where is pkgsCross defined? 10:00:42

Show newer messages


Back to Room ListRoom Version: 6