| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix typo
|
| | |
|
|\ \
| | |
| | | |
Improve Dockerfile
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Discard -Xpreprocessor and following argument for remote compilation,…
|
|/ /
| |
| |
| | |
this switch is recognized by gcc and clang, and clang warns about unused command-line args: -Wunused-command-line-argument warning
|
|\ \
| | |
| | | |
typo fix
|
|/ / |
|
|\ \
| | |
| | | |
src/dopt.c: increase arg_max_jobs limit to max int
|
|/ /
| |
| |
| | |
Issue #452. jobs limit
|
|\ \
| | |
| | | |
Fix various source documentation typos
|
| | |
| | |
| | | |
Found via `codespell -q 3 -S ./ChangeLog -L ake,ba,msdos,paralel,te`
|
|\ \ \
| |/ /
|/| | |
Update INSTALL
|
|/ /
| |
| | |
There was `autoconf` missing in ubuntu example :)
|
|\ \
| | |
| | |
| | |
| | | |
Improved cross-rewriting on non-x86 systems
Tested on aarch64 (Debian).
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unfortunately autoconf and GCC don't agree on the system name:
- On arm (aarch64): `GNU_HOST` is `aarch64-unknown-linux-gnu`,
and GCC triple is `aarch64-linux-gnu` instead.
- On rpm-based x86_64 distros: `GNU_HOST` is `x86_64-pc-linux-gnu`,
and GCC triple is `x86_64-redhat-linux`
Therefore ask the compiler (when running distcc configure script)
how to correctly identify it.
Closes: #440
ALTBUG: 40425
|
|\ \
| | |
| | | |
Restrict number of retries when backoff is disabled
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the commit a7dd5cf90e8c ("Try a new host after failing to
connect instead of immediately falling back to localhost") distcc
tries to choose a different host on connection/protocol errors.
However when backoff is disabled (DISTCC_BACKOFF_PERIOD=0)
distcc keeps retrying forever.
To avoid the problem limit the number of retries (currently to 3)
when backoff is disabled.
Closes: #434
|
| | | |
|
|\ \ \
| | | |
| | | | |
Improved cross-compilation with clang
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With this patch I can cross-compile Linux kernel with clang and distcc.
Otherwise both remote compilation and local fallback fail like this:
cat > foo.c <<-EOF
int main(int argc, char **argv) { return 0; }
EOF
env DISTCC_HOSTS=127.0.0.1 distcc clang -c --target=aarch64-linux-gnu- -o foo.o foo.c
error: unknown target triple 'unknown', please use -triple or -arch
distcc[304773] ERROR: compile foo.c on 127.0.0.1 failed
distcc[304773] (dcc_build_somewhere) Warning: remote compilation of 'foo.c' failed, retrying locally
distcc[304773] Warning: failed to distribute foo.c to 127.0.0.1, running locally instead
error: unknown target triple 'unknown', please use -triple or -arch
distcc[304773] ERROR: compile foo.c on localhost failed
Linux' kernel makefiles specify the target arch with `--target=foo`,
and distcc expects `-target foo`, hence the problem.
Closes: #416
|
|\ \ \ \
| |_|/ /
|/| | | |
distccd: add --oom-score-adj option (Linux only)
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This new option sets /proc/self/oom_score_adj in prefork worker child
processes. This can afford users a bit of protection against a scenario
in which many concurrent compilation jobs cause an out-of-memory
condition that prompts the kernel's OOM killer to kill a process that is
not so "disposable" as a distccd worker.
This commit adds a new Autoconf test to check whether the host system
type (that is, the type of the system on which the compiled binaries are
to be run) is Linux. The new --oom-score-adj option is implemented only
if the host system type is Linux.
|
|\ \ \
| | | |
| | | | |
masquerade mode improvements for rpm-based systems
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On ARM64 rpm-based distros GCC bits are installed into
`/usr/lib64/gcc` and `/usr/libexec/gcc` directories. However
`update-distcc-symlinks` does not scan these directories.
As a result `update-distcc-symlinks` does NOT create symlinks to
* versioned GCC binaries (`gcc-8`, `gcc-10`, etc)
* fully qualified GCC binaries (`aarch64-linux-gnu-gcc-8`, etc)
With this patch `update-distcc-symlinks` correctly work on such
systems.
Closes: #435
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As of now distcc uses $libdir/distcc as a "masquerade" directory.
However in RPM-based distros libdir is /usr/lib64 on 64-bit hosts.
This patch changes symlinks directory to $prefix/lib so it's
always /usr/lib (both for 64-bit and 32-bit hosts).
As a result masquerading can be configured according to the manual,
and exactly in the same way for 64-bit and 32-bit hosts, i.e.
PATH=/usr/lib/distcc:$PATH make -j32
|
|\ \ \
| | | |
| | | | |
distccd: keep looking for approved compilers in /usr/lib/distcc ...
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`dcc_check_compiler_whitelist` bails out if $prefix/lib/distcc
directory does not exists. With this patch it keeps looking
in /usr/lib/distcc instead.
Closes: #431
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
distccd looks for approved compilers in $prefix/lib/distcc.
However update-distcc-symlinks always creates symlinks in /usr/lib.
Thus if distcc is installed in a custom directory (`--prefix=/opt`,
or `--prefix=$HOME`) distccd will refuse compilation jobs even
after running `update-distcc-symlinks`.
This patch adjusts `update-distcc-symlinks` so it creates
symlinks in $prefix/lib/distcc. As a side effect it's possible
to use `update-distcc-symlinks` without root permissions.
Related: #431
|
|\ \ \
| | | |
| | | | |
Revert "Skip distributing LTO cc invocations"
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 8dacd28d888210753e9457eb31175d8e2a1c348e.
The "LTO invocations are not worth distributing" statement is in
general wrong. GCC generates the (target) machine code for every
compilation unit even with `-flto` (so it makes sense to distribute
these). And the whole program analysis is not guaranteed to be
the bottleneck of the build. As a matter of fact distributing
LTO compilations reduces the build time of LLVM/clang, GCC, and
other programs (especially C++ ones).
Closes: #428
|
|\ \ \ \
| |/ / /
|/| | | |
dcc_gcc_rewrite_fqn: increase buffer size by one, hopefully avoiding heap corruption
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On ALT Linux I've run into the following bug:
distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
free(): invalid next size (fast)
Aborted (core dumped)
Apparently dcc_gcc_rewrite writes beyond the allocated memory:
valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0)
==11382==
==11382== 1 errors in context 1 of 5:
==11382== Invalid write of size 1
==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd
==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382==
==11382==
==11382== 1 errors in context 2 of 5:
==11382== Invalid write of size 1
==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd
==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
and ALT Linux' hardened glibc does not quite like that.
Correctly compute the `newcmd_len` to avoid the problem.
ALTBUG: #40425
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
fix: make uninstall failed
Inserts missing semicolon
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
parse_command: pass through Xclang argument
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
prefork: use available cores more efficiently
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Observed behavior
-----------------
When compiling a big C project (Linux kernel) with
distcc compilation nodes never use 100% of CPU time, instead a system
is 25 -- 40% idle (despite --jobs is set to 3x the number of cores).
Analysis
--------
Linux kernel consists of many relatively small C sources and header
files. Compiling a single source file typically takes a fraction of
a second (although there are quite a number of "heavier" sources).
`dcc_preforked_child` exits after 50 requests. Thus a typical lifetime
of a worker process is just a few seconds. However `dcc_create_kids`
sleeps for a second after every fork. Also `dcc_preforked_child` sleeps
for yet another second. Which is >= 25% of a typical child lifetime.
As a result distccd is unable to use available CPU time (system load
is always <= 75% during the compilation).
Fix
---
Removed `sleep` from `dcc_preforking_parent` and `dcc_create_kids`.
Also made `dcc_preforked_child` process compilation jobs for at least
60 seconds.
Result
------
Kernel compilation time (two 6-core nodes) reduced almost 2x:
before: 20 minutes, after: 12 minutes
Closes: #420
|
|\ \ \
| |/ /
|/| | |
Skip distributing LTO cc invocations
|
|/ / |
|
|\ \
| | |
| | | |
Fix memory and file descriptor leaks
|
| | |
| | |
| | |
| | |
| | | |
asprintf() returns -1 on failure, which evaluates to true, and the
resulting string is undefined in this case.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove debug print that is no longer needed
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
At least that is what the experts in #gtk are telling me.
"Unless you want to support libgnome, which was deprecated long before
GNOME3 was released: yes, you can drop it."
|