Nix + dotnet | 120 Members | |
| 23 Servers |
| Sender | Message | Time |
|---|---|---|
| 24 Sep 2025 | ||
| Maybe you have LD_ vars or nix-ld? In any case it's not patched, which is going to be a problem for building. | 03:28:57 | |
(In case it matters, I used readelf from nixpkgs#llvmPackages_21.bintools) | 03:29:12 | |
| Does build.sh pull in dependencies? Maybe it should be in preBuild. | 03:29:57 | |
| Then it wouldn't get run in fetch, and maybe in a real build the executable would be patched | 03:30:22 | |
| There are definitely projects using nuke in nixpkgs, and I don't remember them having this problem. | 03:31:35 | |
| I believe part of the issue there is that it's using Nuke for part of the build (for CodeGen) and Dotnet for the rest. | 03:32:44 | |
| But why put it in preConfigure rather than preBuild. The restore stuff should stay in preConfigure | 03:35:09 | |
| * But why put it in preConfigure rather than preBuild? The restore stuff should stay in preConfigure | 03:35:24 | |
| Can't say that I remember, but I'll see what I can mess with. Thanks! | 03:35:45 | |
| Here's what I'm trying out now:
| 03:36:50 | |
That fixes it in fetch-deps at least, so let's see if a normal nix build succeeds here. | 03:37:15 | |
| Oh I switched it back to NET 8, whoops - Lemme try a second time. | 03:37:34 | |
| You probably need to keep the restore call in configure and move only the build.sh | 03:38:08 | |
| Good idea, thank ya | 03:38:41 | |
| Fetch stops after configure by default | 03:38:53 | |
Well fetch-deps didn't yell, which is good. | 03:39:59 | |
| Build itself failed.
| 03:42:20 | |
| Wait, why is it trying to look for Net 8? Guess I need to try and troubleshoot that... | 03:42:48 | |
| That executable must target net8, but it should run on 9. Maybe roll forward is disabled or something? | 03:44:47 | |
| I still don't really understand where the executable is coming from. | 03:45:11 | |
It's coming from build/_build.csproj as a CodeGen step before running the "real" build. | 03:46:48 | |
So it definitely isn't expecting net8 at all, great. Guess I'm looking deeper! 😅 | 03:48:18 | |
| https://learn.microsoft.com/en-us/dotnet/core/versions/selection#precedence | 03:48:54 | |
| Yeah it seems to be setting
| 03:49:50 | |
| Try the roll forward options from that link first. It may be fine to target 8 and run on 9 | 03:51:02 | |
Would you say the best solution is likely via env.DOTNET_ROLL_FORWARD = true? | 03:51:35 | |
* Would you say the best solution is likely via env.DOTNET_ROLL_FORWARD = "LatestMajor";? | 03:51:57 | |
| I'd give that a try at least | 03:52:35 | |