!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

561 Members
121 Servers

Load older messages


SenderMessageTime
21 Dec 2024
@p14:matrix.orgp14 *

Anyone else wondering what I'm talking about it's these two derivations: (nixpkgs @ 087408a407440892c1b00d80360fd64639b8091d)

nix-store --query -R $(nix-instantiate --system aarch64-darwin -A llvmPackages) | grep llvm-src-16
/nix/store/g0w6vxlsapnd0asv939aj8pdwjbqj2mm-llvm-src-16.0.6.drv
/nix/store/yhzv33cm9bx6sb5i0pvz4s9ikll4sgaj-llvm-src-16.0.6.drv
11:41:40
@paparodeo:matrix.org@paparodeo:matrix.org linux does the same thing I believe. nix-store --query -R $(nix-instantiate -A stdenv) shows xgcc and gcc built and I believe xgcc is the 1st throw away one and gcc is the one used for the stdenv. 11:55:49
@paparodeo:matrix.org@paparodeo:matrix.org pkgs/stdenv/linux/default.nix and the darwin one have some comments to why they build twice and matches with your intuition. 11:59:14
@reckenrode:matrix.orgRandy EckenrodeThere are some limitations due to input addressing, but building multiple times during the bootstrap is intentional. The bootstrap is attempting to follow a traditional compiler bootstrap build where the target compiler is used to build itself.15:01:15
@reckenrode:matrix.orgRandy Eckenrode * 15:01:37
@reckenrode:matrix.orgRandy Eckenrode(Limitations like having to use the originally built libc++ instead of building libc++&c with the target compiler.)15:01:57
@reckenrode:matrix.orgRandy EckenrodeI would be surprised if that’s what is happening with lldbPlugins unless it’s somehow accidentally capturing a package from the bootstrap that isn’t build otherwise.15:03:19
@reckenrode:matrix.orgRandy EckenrodeIdeally, once the bootstrap is finished, everything should be using the same llvmPackages_X version that was built for Darwin.15:03:41
@reckenrode:matrix.orgRandy EckenrodeWith recent changes, that would include both Rust and cross using the bootstrapped LLVM (which is much better than it used to be).15:04:03
* @reckenrode:matrix.orgRandy Eckenrode
In reply to @reckenrode:matrix.org
I would be surprised if that’s what is happening with lldbPlugins unless it’s somehow accidentally capturing a package from the bootstrap that isn’t build otherwise.
looks at the PR
15:12:27
@reckenrode:matrix.orgRandy EckenrodeOh, yeah. It’s probably that. The LLVM derivation can be messy like that, capturing (or not) unexpected things.15:12:56
@dimitarnestorov:matrix.orgDimitar joined the room.19:47:21
23 Dec 2024
@fgrsnau:matrix.org@fgrsnau:matrix.org changed their display name from fgrsnau to Stefan.23:41:15
24 Dec 2024
@xin:xiny.lixinHi everyone! I encountered this issue today: https://github.com/NixOS/nixpkgs/issues/305858. I also tried ruby.withPackages and got the same result. I'm trying to understand the reason behind this and potentially fix it. Could anyone point me in the right direction or suggest where I should start looking?04:36:42
@xin:xiny.lixin Oh, I guess I should use python3.pythonOnBuildForHost for this purpose? 05:22:49
@xin:xiny.lixinI found that several packages are still using python3.withPackages under nativeBuildInputs. Maybe we should do a treewide fix?10:22:40
25 Dec 2024
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.orgHow could I get myself a riscv32-unknown-elf gcc?21:50:16
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.orgnixpkgs doesnt like it as a crossPlatform21:50:37
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.orgto clarify, it should run on x86_64-linux, but produce binaries for riscv22:19:29
@kuruczgy:matrix.orgkuruczgy riscv32-none-elf works for me, not sure how "unknown" is different from "none" (if this is something bare metal then none should be correct) 23:14:07
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.org
In reply to @kuruczgy:matrix.org
riscv32-none-elf works for me, not sure how "unknown" is different from "none" (if this is something bare metal then none should be correct)
a different program im using expects unknown :/
23:15:11
@kuruczgy:matrix.orgkuruczgy (Also it's crossSystem not crossPlatform, but hopefully that's just a typo in your message and not your code.) 23:15:13
@kuruczgy:matrix.orgkuruczgy I assume you are getting "error: Unknown kernel: unknown" when you try riscv32-unknown-elf. riscv32-unknown-none-elf does seem to work. What does this "different program" depend on exactly? Expecting crossPlatform to be a particular string sounds quite strange 23:21:48
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.orgim trying to get riscof to work, and it asks for a specific gcc toolchain23:22:41
@genericnerdyusername:matrix.org@genericnerdyusername:matrix.orgi could replace all uses of unknown with none, but im already out of my depth, i dont want to add more points of failure23:23:08
@kuruczgy:matrix.orgkuruczgy Ah I see, it hardcodes the riscv32-unknown-elf prefix everywhere. Nixpkgs will always include the kernel name in the prefix, so you cannot have it without none: https://github.com/NixOS/nixpkgs/blob/444c1e08d4fc93dd5a53ff052397d2d2b26dfe7a/lib/systems/parse.nix#L542 23:38:29
@kuruczgy:matrix.orgkuruczgy You probably want to define some aliases somehow. (Or just search&replace in the whole source in patchPhase -unknown-elf with -unknown-none-elf 23:39:31
@kuruczgy:matrix.orgkuruczgy * You probably want to define some aliases somehow. (Or just search&replace in the whole source in something like patchPhase -unknown-elf with -unknown-none-elf) 23:39:52
26 Dec 2024
@10leej:matrix.org@10leej:matrix.org joined the room.01:41:00
@10leej:matrix.org@10leej:matrix.org left the room.01:41:51

Show newer messages


Back to Room ListRoom Version: 6