Closed kuafu-run closed 2 years ago
Can you provide a minimal reproducible set of code?
my machine is centos 7.6 , gcc 4.8.5, CXX=distcc g++ , export DISTCC_HOSTS='xx.xx.xx.xx' and build sth with blade build XXX/ and get
FAILED: build64_release/xxxxxxx/xxxxxx.cpp.o export LC_ALL=C; set -o pipefail; distcc g++ { not important things } -H 2>&1 | awk '/Multiple include guards may be useful for:/ {stop=1} /^.+ [^\/]/ { print $0} !/^.+ / && !stop {print $0 > "/dev/stderr"}' > build64_release/xxx.cpp.o.H
so i redirected the output to a distcc_g++.txt and found this:
. /usr/include/c++/4.8.2/string .. /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h ... /usr/include/bits/wordsize.h {not important things }
Multiple include guards may be useful for: /usr/include/asm/errno.h /usr/include/asm/param.h /usr/include/asm/socket.h /usr/include/asm/sockios.h /usr/include/bits/byteswap-16.h /usr/include/bits/confname.h {not important things } ads/serving/short_url/short_url_service.cpp:48:1: error: 'abcde' does not name a type abcde; ^ Multiple include guards may be useful for: /usr/include/asm/errno.h /usr/include/asm/param.h /usr/include/asm/socket.h /usr/include/asm/sockios.h /usr/include/bits/byteswap-16.h {not important things }
while if i remove the distcc and re-run the command and redirect the output , only one line of "Multiple include guards may be useful for:" is shown , and the gcc error is printed. so i guess the awk script has some responsibility for this.
Thanks, to be confirmed.
There are 2 Multiple include guards may be useful for:
lines in the stderr when distcc is used, which should be 1 line normally.
Maybe because distcc can't handle the stderr of compilation correctly when the -H
option is used.
try upgrade distcc to the latest version?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior I have some problematic C++ code during building,once faild only to see FAILED: xxxxxxxxxxx.o if anything,i would like to see the error message.
Error message If applicable, add an error message to help explain your problem.
System (please complete the following information):
Additional context Add any other context about the problem here.