| 10 Jul 2025 |
jrick | err, i have tried, and failed lol | 20:51:54 |
kdn | yeah, CGO_ENABLED=0 go build works fine on NixOS | 20:52:15 |
diamond (it/its) | yeah for the explicit purpose of cross-building i wouldn't bother with PIE | 20:55:57 |
diamond (it/its) | or i guess just build a Nix OCI container instead | 20:56:14 |
jrick | the issue with building static pie executables is that you need the target platform's ld.so and essentially embed it into the final binary | 20:57:05 |
jrick | it works if you have the file and can set the appropriate go flags to link with it | 20:57:45 |
jrick | but makes cross compiling a nightmare | 20:57:49 |
kdn | I'd love to, but the team uses goreleaser to build for few-teen targets including different architectures, containers & operating systems | 20:58:28 |
diamond (it/its) | hm ic | 21:00:36 |
kdn | I just wanted to adjust my local build to whatever they're running so I can make a proper entrypoint | 21:01:08 |
diamond (it/its) | i mean in terms of building containers for usage, whether it's Nix-built or FROM alpine Dockerfile-built doesn't matter too much | 21:02:58 |