1

我希望我的 Jenkins 安装(在 Windows 上)利用具有 distcc 的从机来减少编译时间。

我在从属设备上使用 Cygwin 来运行 distcc,但在配置过程中遇到问题,即"./configure"。配置会进行编译器检查,但由于我使用 CMake 为嵌入式设备进行交叉编译以生成构建文件,因此我假设我不需要将所有这些信息指定给 distcc。

我尝试使用以下方法明确设置它:

导出 CC=path/to/compiler

但是,这会导致错误:

$ ./configure --prefix=/usr/local
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for gcc... path/to/compiler.exe
checking whether the C compiler works... yes
checking for C compiler default output file name... conftest.elf
checking for suffix of executables... .elf
checking whether we are cross compiling... configure: error: in `/distcc-3.2rc1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

我相信 --build 配置正确,因为我将通过 Cygwin 运行 distcc,但其他变量的值尚不清楚。

有人用这种设置成功过吗?我缺少任何其他设置或有任何提示/提示资源?似乎没有如何在 Windows 机器上进行配置。

4

2 回答 2

0

通常从 ./configure --help 您可以看到通知构建系统您要编译将在不同系统(HOST)上运行的程序的选项

系统类型: --
build=BUILD 配置构建在 BUILD [猜测]
--host=HOST 交叉编译构建程序以在 HOST [BUILD] 上运行

另请参阅,对于 Automake:

https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html

于 2017-02-17T12:54:27.463 回答
0

对于可能不熟悉这种安装类型的任何其他人,这种情况下的编译器是指用于构建 distcc 程序本身(GCC 和 Make)的编译器。

就我而言,由于我将在所有机器上的 Cygwin 上运行 distcc,我不需要交叉编译 - 因此我可以简单地让 automake 猜测 build/host/target 选项(需要从 automake 移动 config.guess 和 config.sub 文件进入 distcc)。

于 2017-02-23T07:15:21.153 回答