Ask HN: 为什么 Guix 无法为各种目标构建静态二进制文件?

4作者: tetris119 个月前
Guix 可以使用 `guix build --target <arch>` 为各种不同的目标架构构建软件包,并且可以构建完整的链接库,这些库可以通过 `guix pack --target <arch>` 打包成 tarball 部署到目标机器上…… 但它无法可靠地完成 Nix 可以做到的一件事,即生成单个静态二进制文件。 是什么阻止了它? 许多软件包都是使用 `(build-system gnu-build-system)` 宏编写的。 添加一个 `(build-system gnu-build-system 'static)` 参数,将 configure 步骤更改为使用 `-static` 标志,这有多难?
查看原文
Guix can build for various different targets using `guix build --target &lt;arch&gt;`, and it can build entire linked libraries that can be deployed as a tarball to a target machine via `guix pack --target &lt;arch&gt;`...<p>But it can&#x27;t do the one thing that Nix can do reliably and that is produce a single static binary.<p>What is stopping it?<p>Many packages are written using the `(build-system gnu-build-system)` macro.<p>How hard is it to add a `(build-system gnu-build-system &#x27;static)` parameter, that changes the configure step to use the `-static` flag?