为makefile配置distcc

问题描述 投票:0回答:1

我正在测试distcc,发现该tutorial非常容易理解,我应该说我可以使用llvm编译CMake + Ninja,并且可以使用CMake + Makefilesdistcc编译docker,而无需问题。由于我特别了解Makefile,因此我查看了CMake + Ninja生成的文件,所看到的只是distcc作为前缀添加到编译器(例如distcc /usr/bin/gcc)。因此,我认为,如果仅使用Makefile创建small project,则可以添加distcc,一切都会神奇地起作用。好吧,看来我缺少了一些东西,因为我得到的只是:

$ ./mk.sh image

make[1]: Entering directory '/home/user/sandbox/distcc-makefiles'
Compiling Lib/Print.c
Compiling Boot/Main.c
distcc[16644] ERROR: compile Boot/Main.c on 172.17.0.2/1 failed
distcc[16644] (dcc_build_somewhere) Warning: remote compilation of 'Boot/Main.c' failed, retrying locally
distcc[16644] Warning: failed to distribute Boot/Main.c to 172.17.0.2/1, running locally instead
distcc[16644] (dcc_please_send_email_after_investigation) Warning: remote compilation of 'Boot/Main.c' failed, retried locally and got a different result.
distcc[16643] ERROR: compile Lib/Print.c on 172.17.0.2/1 failed
distcc[16643] (dcc_build_somewhere) Warning: remote compilation of 'Lib/Print.c' failed, retrying locally
distcc[16643] Warning: failed to distribute Lib/Print.c to 172.17.0.2/1, running locally instead
distcc[16643] (dcc_please_send_email_after_investigation) Warning: remote compilation of 'Lib/Print.c' failed, retried locally and got a different result.
make[1]: Leaving directory '/home/user/sandbox/distcc-makefiles'

[通过运行llvm示例,我放弃了所有docker连接和distcc配置问题,我试图在Internet上搜索任何想法/示例,但是大多数人都使用CMake,这不是我的情况。欢迎提出建议,我的演示项目基于我正在研究的真实项目,因此Makefile基本上是这样。

我不知道我在想什么...

版本

仅供参考:

$ distcc --version
distcc 3.1 x86_64-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Oct 19 2017 11:05:18
Copyright (C) 2002, 2003, 2004 by Martin Pool.
Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer.
Portions Copyright (C) 2007-2008 Google.
$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
$ make --version
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
makefile cmake distcc
1个回答
0
投票
我强烈建议使用distcc手册页中记录的MASQUERADE
© www.soinside.com 2019 - 2024. All rights reserved.