| 3 Apr 2024 |
jrick | oh nvm, i see other internal packages are passing hmmmm | 15:43:02 |
jrick | not sure if the .test binary is missing, or something it is trying to spawn.. | 15:47:02 |
jrick | how can i observe what is happening inside of the test/build sandbox? | 16:00:32 |
jrick | hmm ok, got to same error in a nix develop shell, let's see.. | 17:57:14 |
jrick | [jrick@elsa:~/nixos/tmp/source]$ go test -c ./internal/staging/primitives
[jrick@elsa:~/nixos/tmp/source]$ ldd ./primitives.test
statically linked
[jrick@elsa:~/nixos/tmp/source]$ ./primitives.test
Could not start dynamically linked executable: ./primitives.test
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
| 17:59:11 |
jrick | uhh | 17:59:13 |
jrick | qbit: halp :D | 18:00:23 |
jrick | ah it's a pie executable, hmmm | 18:01:34 |
jrick | i think all the other passing tests link to net, and are using the external linker, let me confirm | 18:03:14 |
jrick | yeah it's just these test executables that get compiled to static pie that are broken. wacky | 18:07:48 |
jrick | [jrick@elsa:~/nixos/tmp/source]$ go test -c -ldflags=-linkmode=external ./internal/staging/primitives/
[jrick@elsa:~/nixos/tmp/source]$ ./primitives.test
PASS
| 18:15:48 |
jrick | so ldflags in the attrset is being ignored when building tests, only the regular commands in the build stage | 18:16:37 |
jrick | i uh.. not sure how to fix that. i don't think you can pass along ldflags in GOFLAGS can you? | 18:17:33 |
jrick | guess you can | 18:18:28 |
jrick | yeah, there's nothing like https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/go/module.nix#L218 for the checkPhase | 18:22:21 |
jrick | hmm what's a trivial go module to include for the repro writeup :) | 18:38:27 |
jrick | can't use net or cgo | 18:38:43 |
@qbit:tapenet.org | Mmmm | 18:43:00 |
jrick | huh, ok false alarm. i saw this because i was writing my own checkPhase | 18:51:21 |
| 4 Apr 2024 |
jrick | it looks like some .info files are missing with proxyVendor for transitive module requirements that aren't actually imported at all | 18:03:28 |
jrick | this breaks go list -m all | 18:03:36 |
| Diamond (it/she) changed their profile picture. | 18:30:18 |
jrick | hmm, and i don't think overrideAttrs are passed through to the buildGoModule argument. or at least not all of them are | 18:52:10 |
jrick | i'm too new to nix to know if that's a bug or not :) | 18:52:36 |
jrick | i can override checkPhase with it, which makes sense because that comes from mkDerivation, but i can't pass in proxyVendor=true for example, which is unique to buildGoModule | 18:55:55 |
@qbit:tapenet.org | wonder if https://github.com/NixOS/nixpkgs/pull/284568 helps with it at all? | 20:16:35 |
@qbit:tapenet.org | what is it you are doing? can you paste the codes? | 20:16:45 |
jrick | can in a sec, that pr looks promising | 20:17:28 |
jrick | these are the logs i see though, https://gist.githubusercontent.com/jrick/4987872fdb5293bdbab73388566cbb22/raw/16a6c270d39d7bdb90e5220361f8a7d57864cd2a/gistfile1.txt has the errors (i expected i would need to patch out the tests, but it seems this bug is doing that for me :D), and https://gist.githubusercontent.com/jrick/1465c134f98334d6651e4912a8f94ef4/raw/656bc1a204665d2702ab69cd1afc407cae65d69e/gistfile1.txt shows all the files in the proxy'd module cache. note how there are missing .info files but only for modules this project doesn't import packages from | 20:18:44 |
jrick | * these are the logs i see though, https://gist.githubusercontent.com/jrick/4987872fdb5293bdbab73388566cbb22/raw/16a6c270d39d7bdb90e5220361f8a7d57864cd2a/gistfile1.txt has the errors (i expected i would need to patch out the lints, but it seems this bug is doing that for me :D), and https://gist.githubusercontent.com/jrick/1465c134f98334d6651e4912a8f94ef4/raw/656bc1a204665d2702ab69cd1afc407cae65d69e/gistfile1.txt shows all the files in the proxy'd module cache. note how there are missing .info files but only for modules this project doesn't import packages from | 20:19:08 |