使用 distcc 在 Ubuntu 上的 i686 系统上交叉编译 x86_64

发布于 2024-10-11 13:46:15 字数 326 浏览 0 评论 0原文

我正在尝试使用 distcc 在家里设置一个小型构建集群。有两个 x64 系统和 1 个 i686 系统。所有系统都运行 Ubuntu 10.10 并且是最新的。启动构建的系统是 x64。 Distcc 在两个 x64 系统之间工作正常,但发送到 i686 系统的所有构建任务都会失败。

到目前为止:

  • 我已经在该系统上安装了 g++ 的 multilib 包。我可以使用 g++ -m64 在本地交叉编译为 x64
  • 更改了 /usr/lib/distcc/g++ 中的链接以指向显式设置 < code>-m64 参数。

有什么建议吗?

I am attempting to setup a small build cluster at home using distcc. There are two x64 systems and 1 i686 systems. All systems are running Ubuntu 10.10 and are up to date. The system that is initiating the build is x64. Distcc works fine between the two x64 systems but all build tasks sent to the i686 system fail.

So far:

  • I have installed the multilib package for g++ on that system. I am able to cross-compile to x64 locally using g++ -m64
  • Changed the link in /usr/lib/distcc/g++ to point to a script that explicity sets the -m64 parameter.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不一样的天空 2024-10-18 13:46:15

经过更多研究后再次尝试:

GCC 有一个 页面描述 i386 和 x86-64 选项-m64 标志表示生成 64 位代码,但您还需要使用 -march=i686-march= 指定 CPU 类型k8 或类似的,以使用正确的指令集。

由于 distcc 发送 GCC 命令行标志,因此您应该尝试将这些添加到本地运行的 distcc 命令中,并跳过用于设置标志的远程脚本。

如果您在本地 x64 机器上测试架构标志,而没有 distcc,仅使用 g++,那么在使用 distcc 时它应该为您提供正确的二进制文件。

Attempting this one again after more research:

GCC has a page describing the i386 and x86-64 options. The -m64 flag says to generate 64-bit code, but you'll also want to specify the type of CPU with -march=i686 or -march=k8 or similar, to use the correct instruction set.

Since distcc sends the GCC command line flags out, you should try adding these to the distcc command running locally and skip the remote script for setting flags.

If you test the architecture flags on your local x64 machine without distcc, just g++, then it should give you the right binaries when using distcc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文