13 Sep 2025 |
emily | this does mean that -linkmode=internal will produce broken binaries unless you also disable PIE I guess but it doesn't seem like people are really, doing that | 19:05:28 |
emily | I'm also not entirely sure how you would explicitly out of PIE here either but not sure if that will be an issue | 19:06:09 |
emily | we'll see. it's worth trying anyway | 19:06:17 |
Lun | https://github.com/NixOS/nixpkgs/pull/442510/commits/3f163abc84ddffb2fea646f9fa973b503c13d592 ? | 19:06:55 |
dish [Fox/It/She] | seems like theres some stuff not in the right namespace so it breaks | 19:07:53 |
dish [Fox/It/She] | Download arrow-cpp.log | 19:07:54 |
dish [Fox/It/She] | attached excerpt from the failed build log | 19:08:03 |
dish [Fox/It/She] | ahh it truncated a bit hold on | 19:08:43 |
dish [Fox/It/She] | there we go | 19:09:09 |
dish [Fox/It/She] | Download arrow-cpp.log | 19:09:10 |
emily | looks good to me. we should test a normal package on platforms, a package with CGO_ENABLED = 0 , syncthing , something pkgsStatic , maybe some WASI thing although I have no idea what | 19:09:41 |
emily | my #1 fear is basically just something doing -linkmode=internal explicitly and creating an FHS binary | 19:09:53 |
emily | but it doesn't seem like much is doing that | 19:10:13 |
Lun | I can kick off a bigger rebuild (later) if there's a nice way to select targets that are likely to break based on their attrs like there was for things that explicitly hardeningDisabled pie | 19:11:22 |
emily | ooh | 19:11:35 |
emily | Lun: hey sorry I was dumb actually | 19:11:48 |
emily | check this out https://github.com/golang/go/blob/master/src/internal/platform/supported.go#L224-L253 | 19:11:55 |
emily | actual patch is DefaultPIE on everything but ppc64 | 19:12:49 |
emily | and we could even make InternalLinkPIESupported do return false | 19:13:03 |
emily | to ensure that we never sielently produce busted PIEs | 19:13:13 |
emily | (well, and I guess keep the Windows -race case) | 19:13:41 |
dish [Fox/It/She] | good ol 'meant to be compatible but isn't in subtle ways', though disabling the support doesn't seem to impact anything(did pyarrow , utf8proc , and gdal builds, and they all work well, so I'm not anticipating any other issues from this change) | 19:21:52 |
dish [Fox/It/She] | good ol 'meant to be compatible but isn't in subtle ways', though disabling the support doesn't seem to impact anything(did pyarrow , utf8proc , and gdal builds, and they all work well, so I'm not anticipating any issues from this change) | 19:22:37 |
Lun | there being overlapping but not exactly the same checks here and in ld/config.go feels like it implies that that changing both might be needed / there's some subtlety.
I'm not at all familiar with this codebase, how sure are you that changing only platform/supported.go is right? | 19:25:52 |
emily | low, but my understanding is that the thing I originally suggested was for platforms that do not support non-PIE | 19:29:01 |
emily | and makes -buildmode=exe the same as -buildmode=pie | 19:29:06 |
emily | whereas this determines -buildmode=default | 19:29:14 |
emily | so this way we give an opt-out and things that do -buildmode=exe -linkmode=internal will work properly | 19:29:27 |
emily | and then by adjusting InternalLinkPIESupported we can ensure we never produce busted FHS executables | 19:29:41 |
emily | but I am far from confident | 19:29:53 |