I am testing distcc and I found this tutorial very easy to follow, I should say that I am able to compile llvm
using CMake + Ninja
and CMake + Makefiles
using distcc
and docker
with no problems. Since I am particularly interested in Makefiles, I looked at the files produced by CMake + Ninja
and all I saw was that distcc
is added as a prefix to the compiler (e.g. distcc /usr/bin/gcc
). So I thought that if I create a small project using only Makefiles I could possibly add distcc
and things will magically work. Well, looks like I am missing something because all I get is:
$ ./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'
By running the llvm
example I discarded all docker
connection and distcc
configuration issues, I tried to search for any ideas/examples on the internet but most of the people use CMake
which is not my case. Suggestions are welcome, I based my demo project on a real project I am working on, so that's how basically the Makefile
look like.
I don't know what I am missing...
Versions:
Just for reference:
$ 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.