public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] silencing distcc with systemd
@ 2024-03-30  5:38 Daniel Frey
  2024-03-31 20:57 ` [gentoo-user] " Daniel Frey
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Frey @ 2024-03-30  5:38 UTC (permalink / raw
  To: gentoo-user

Hi all,

I've moved a couple of machines from openrc to systemd.

I have discovered this odd problem. On openrc, distcc was quiet during 
building packages. It would obey environment variable set in /etc/env.d:

DISTCC_DIR=/var/distcc
DISTCC_ENABLE_DISCREPANCY_EMAIL=
DISTCC_FALLBACK=1
DISTCC_SAVE_TEMPS=0
DISTCC_SSH=
DISTCC_TCP_CORK=
DISTCC_VERBOSE=0

This currently shows up in the enviroment (checked with `set`.)

However, on systemd it spams messages in build logs:

distccd[290662] (dcc_check_compiler_masq) Warning: 
x86_64-pc-linux-gnu-g++ on distccd's path is 
/usr/lib/distcc/bin/x86_64-pc-linux-gnu-g++ and really a link to 
/usr/bin/distcc
distcc[293558] (dcc_trace_version) distcc 3.4 x86_64-pc-linux-gnu; built 
Mar 28 2024 05:05:38
distcc[293558] (dcc_recursion_safeguard) safeguard: 1
distcc[293558] (dcc_recursion_safeguard) safeguard level=1
distcc[293558] (main) compiler name is "x86_64-pc-linux-gnu-g++"
distcc[293558] (dcc_set_path) setting 
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin
distcc[293558] exec on localhost: x86_64-pc-linux-gnu-g++ -O2 -pipe 
-march=znver3 -felide-constructors -fno-strict-aliasing -pie -fPIC 
-fstack-protector --param=ssp-buffer-size=4 -Wconversion 
-Wno-sign-conversion -fno-omit-frame-pointer -Wall -Wenum-compare 
-Wenum-conversion -Wextra -Wformat-security -Wmissing-braces 
-Wno-format-truncation -Wno-init-self -Wno-nonnull-compare 
-Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla 
-Wwrite-strings -std=gnu++11 -fvisibility=hidden -o 
/tmp/distccd_9988a064.o -c /tmp/distccd_998ea064.ii
distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not 
a directory
distcc[293558] (dcc_spawn_child) forking to execute: 
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=znver3 -felide-constructors 
-fno-strict-aliasing -pie -fPIC -fstack-protector 
--param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion 
-fno-omit-frame-pointer -Wall -Wenum-compare -Wenum-conversion -Wextra 
-Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self 
-Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual 
-Wnon-virtual-dtor -Wvla -Wwrite-strings -std=gnu++11 
-fvisibility=hidden -o /tmp/distccd_9988a064.o -c /tmp/distccd_998ea064.ii
distcc[293558] (dcc_spawn_child) child started as pid293559
distcc[293559] (dcc_increment_safeguard) setting safeguard: 
_DISTCC_SAFEGUARD=2
/var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc: 
In member function ‘dberr_t Datafile::validate_for_recovery()’:
/var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc:419:16: 
warning: this statement may fall through [-Wimplicit-fallthrough=]
/var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc:429:2: 
note: here
distcc[293558] (dcc_collect_child) cc child 293559 terminated with status 0
distcc[293558] (dcc_collect_child) cc times: user 0.000000s, system 
0.000000s, 0 minflt, 0 majflt
distcc[293558] compile (null) on localhost completed ok
distcc[293558] elapsed compilation time 1.651658s
distcc[293558] (dcc_exit) exit: code 0; self: 0.000832 user 0.000832 
sys; children: 1.523681 user 0.134703 sys
distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not 
a directory
distcc[293558] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files


I was trying to solve this problem and it's normally set in the 
environment as above.

I read systemd uses a different mechanism, but it doesn't work.

I did set /etc/systemd/system/distccd.service.d/00gentoo.conf as per 
instructions I found on the wiki:
Environment="DISTCC_VERBOSE=0"
Environment="DISTCC_SAVE_TEMPS=0"
Environment="DISTCC_DIR=/var/distcc"

Reloaded using `systemctl daemon-reload` and restarted distccd - 
although this is happening on the client side and it's not really the 
daemon (as far as I can tell.) The output is showing up while compiling 
using emerge.

I can see it's sourcing this file:
distccd.service - Distccd: A Distributed Compilation Server
      Loaded: loaded (/etc/systemd/system/distccd.service; enabled; 
preset: disabled)
     Drop-In: /etc/systemd/system/distccd.service.d
              └─00gentoo.conf
      Active: active (running) since Fri 2024-03-29 22:04:12 PDT; 29min ago

Is there some other place that needs this environment set?

It clearly isn't getting the environment set somewhere in systemd as 
this error is solved with the DISTCC_DIR in the file sourced above:

distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not 
a directory

...and the DISTCC_VERBOSE=0 is supposed to silence build messages.

Any insight would be helpful... as this problem is easily solved in 
openrc but it seem to be rather difficult with systemd.

Dan


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-01 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-30  5:38 [gentoo-user] silencing distcc with systemd Daniel Frey
2024-03-31 20:57 ` [gentoo-user] " Daniel Frey
2024-03-31 20:59   ` Alexandru N. Barloiu
2024-03-31 21:03     ` Daniel Frey
2024-03-31 21:08       ` Alexandru N. Barloiu
2024-03-31 21:32       ` Alexandru N. Barloiu
2024-04-01 14:46         ` Daniel Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox