!UNVBThoJtlIiVwiDjU:nixos.org

Staging

286 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.05 | Review Reports: https://malob.github.io/nix-review-tools-reports/99 Servers

Load older messages


SenderMessageTime
14 Sep 2025
@lt1379:matrix.orgLun

am I doing something silly with testVersion

      > Version string '2.0.8' not found!
       > The output was:
       > syncthing v2.0.8 "Hafnium Hornet" (go1.25.0 linux-amd64) nix@nix 1980-01-01 00:00:00 UTC [noupgrade]
      syncthing-internal = testers.testVersion { package = syncthingTest.overrideAttrs {
          ldflags = [ "-buildmode=internal" ];
        };
      };
15:15:43
@emilazy:matrix.orgemilymy current thinking is that despite the heritage of Plan 9 compilers that are meant to not be confused about cross, upstream is, sadly, confused about cross15:15:44
@emilazy:matrix.orgemily you'll make Alyssa sad with that overrideAttrs 15:16:28
@emilazy:matrix.orgemilynot sure about the failure there15:16:36
@lt1379:matrix.orgLuncouldn't find anything in-tree using internal15:16:48
@emilazy:matrix.orgemily also it's not a buildmode 15:17:15
@emilazy:matrix.orgemily it's a linkmode 15:17:22
@lt1379:matrix.orgLunoops15:17:43
@emilazy:matrix.orgemily I think anything with CGO_ENABLED = 0; right? 15:18:18
@emilazy:matrix.orgemilysince it should default15:18:21
@lt1379:matrix.orgLunah nice15:18:36
@emilazy:matrix.orgemilywe want to ensure that those things produce PIEs with the right interpreter15:18:44
@emilazy:matrix.orgemily I wonder how those would even work with -buildmode=pie 15:26:51
@emilazy:matrix.orgemilyit seems like either way we'd be producing dodgy executables15:26:56
@emilazy:matrix.orgemilyprobably cross conditional vs. not should just be down to whatever upstream wants there15:27:14
@emilazy:matrix.orgemilysince they don't really have any non-broken interface15:27:24
@emilazy:matrix.orgemilythe ultimate tragedy of Nixpkgs is that it is less confused about cross than anything else in the world15:27:49
@emilazy:matrix.orgemily

also this is scary

# OpenBSD static linking requires PIE
15:29:40
@emilazy:matrix.orgemilygood thing OpenBSD probably doesn't work very much or we might have to figure out static PIE sooner15:29:53
@lt1379:matrix.orgLunUpdated the PR, no more GO_EXTLINK_ENABLED and internal linker seems to work now15:55:17
@emilazy:matrix.orgemilyI'll take a look16:54:09
@emilazy:matrix.orgemily btw i wonder why Go doesn't just produce static PIEs when CGO_ENABLED=0 16:54:16
@emilazy:matrix.orgemilyI guess they just didn't implement it in their internal linker and don't want to use the external one if they don't have to16:54:27
@emilazy:matrix.orgemilythe change we're doing is sort of "workflow-breaking" in that previously turning off cgo gave you a static binary with no libc dependency16:54:39
@emilazy:matrix.orgemilythe ideal would be static PIE if they're not linking to anything and otherwise dynamic PIE but16:54:51
@emilazy:matrix.orgemily Lun: what kind of binary does a CGO_ENABLED = 0; package get with your PR? and does pkgsStatic produce static non-PIEs for Go stuff now (both CGO_ENABLED = 0; and not)? 16:55:21
@emilazy:matrix.orgemily we might have to document "if you want a static Go thing use pkgsStatic") 16:55:27
@emilazy:matrix.orgemily * we might have to document "if you want a static Go thing use pkgsStatic" 16:55:28
@emilazy:matrix.orgemilyah you have a test16:58:04
@emilazy:matrix.orgemily can we have a pkgsStatic test too? 16:58:28

Show newer messages


Back to Room ListRoom Version: 6