Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distcc fails to build when calling clang or clang++ #368

Open
graysky2 opened this issue Nov 16, 2019 · 15 comments
Open

Distcc fails to build when calling clang or clang++ #368

graysky2 opened this issue Nov 16, 2019 · 15 comments

Comments

@graysky2
Copy link

Distcc 3.3.3 cannot build using clang or clang++ on Arch Linux. Trying to build chromium for example, gives output like this on the client:

make: Entering directory '/build/chromium-no-extras/src/chromium-launcher-6'
cc -o chromium -D_FORTIFY_SOURCE=2 -DLAUNCHER_VERSION=\"v6\" -DCHROMIUM_NAME=\"chromium\" -DCHROMIUM_BINARY=\"/usr/lib/chromium/chromium\" -DCHROMIUM_VENDOR="\"Arch Linux\"" -DPEPPER_FLASH_DIR=\"/usr/lib/PepperFlash\" -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fdiagnostics-color -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/json-glib-1.0 -I/usr/lib/libffi-3.2.1/include -pthread -I/usr/include/libmount -I/usr/include/blkid  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now launcher.c -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 
make: Leaving directory '/build/chromium-no-extras/src/chromium-launcher-6'
Done. Made 10704 targets from 1985 files in 4260ms
ninja: Entering directory `out/Release'
[1/36419] STAMP obj/chrome/app/command_ids.stamp
[2/36419] STAMP obj/base/numerics/base_numerics.stamp
[3/36419] STAMP obj/chrome/app/chrome_dll_resources.stamp
[4/36419] ACTION //build/linux/libudev:udev0_loader_loader(//build/toolchain/linux/unbundle:default)
[5/36419] STAMP obj/build/linux/libudev/udev0_loader_loader.stamp
[6/36419] ACTION //base:build_date(//build/toolchain/linux/unbundle:default)
[7/36419] STAMP obj/base/build_date.stamp
[8/36419] CXX obj/base/base_static/base_switches.o
[9/36419] AR obj/base/libbase_static.a
[10/36419] CXX obj/base/third_party/double_conversion/double_conversion/fast-dtoa.o
distcc[2202] ERROR: compile ../../base/third_party/double_conversion/double-conversion/fast-dtoa.cc on 10.9.8.112/9 failed
distcc[2202] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/fast-dtoa.cc' failed, retrying locally
distcc[2202] Warning: failed to distribute ../../base/third_party/double_conversion/double-conversion/fast-dtoa.cc to 10.9.8.112/9, running locally instead
distcc[2202] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/fast-dtoa.cc' failed, retried locally and got a different result.
[11/36419] CXX obj/base/third_party/double_conversion/double_conversion/fixed-dtoa.o
distcc[2203] ERROR: compile ../../base/third_party/double_conversion/double-conversion/fixed-dtoa.cc on 10.9.8.112/9 failed
distcc[2203] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/fixed-dtoa.cc' failed, retrying locally
distcc[2203] Warning: failed to distribute ../../base/third_party/double_conversion/double-conversion/fixed-dtoa.cc to 10.9.8.112/9, running locally instead
distcc[2203] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/fixed-dtoa.cc' failed, retried locally and got a different result.
[12/36419] CC obj/base/third_party/libevent/libevent/event.o
[13/36419] CXX obj/base/third_party/symbolize/symbolize/symbolize.o
distcc[2214] ERROR: compile ../../base/third_party/symbolize/symbolize.cc on 10.9.8.112/9 failed
distcc[2214] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/symbolize/symbolize.cc' failed, retrying locally
distcc[2214] Warning: failed to distribute ../../base/third_party/symbolize/symbolize.cc to 10.9.8.112/9, running locally instead
distcc[2214] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/symbolize/symbolize.cc' failed, retried locally and got a different result.
[14/36419] CXX obj/base/third_party/double_conversion/double_conversion/double-to-string.o
distcc[2201] ERROR: compile ../../base/third_party/double_conversion/double-conversion/double-to-string.cc on 10.9.8.112/9 failed
distcc[2201] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/double-to-string.cc' failed, retrying locally
distcc[2201] Warning: failed to distribute ../../base/third_party/double_conversion/double-conversion/double-to-string.cc to 10.9.8.112/9, running locally instead
distcc[2201] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/double-to-string.cc' failed, retried locally and got a different result.
[15/36419] CXX obj/base/third_party/double_conversion/double_conversion/strtod.o
distcc[2205] ERROR: compile ../../base/third_party/double_conversion/double-conversion/strtod.cc on 10.9.8.112/9 failed
distcc[2205] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/strtod.cc' failed, retrying locally
distcc[2205] Warning: failed to distribute ../../base/third_party/double_conversion/double-conversion/strtod.cc to 10.9.8.112/9, running locally instead
distcc[2205] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/double_conversion/double-conversion/strtod.cc' failed, retried locally and got a different result.
[16/36419] CXX obj/build/linux/libudev/udev0_loader/libudev0_loader.o
distcc[2226] ERROR: compile gen/library_loaders/libudev0_loader.cc on 10.9.8.112/9 failed
distcc[2226] (dcc_build_somewhere) Warning: remote compilation of 'gen/library_loaders/libudev0_loader.cc' failed, retrying locally
distcc[2226] Warning: failed to distribute gen/library_loaders/libudev0_loader.cc to 10.9.8.112/9, running locally instead
distcc[2226] (dcc_please_send_email_after_investigation) Warning: remote compilation of 'gen/library_loaders/libudev0_loader.cc' failed, retried locally and got a different result.
[17/36419] CXX obj/base/third_party/symbolize/symbolize/demangle.o
distcc[2213] ERROR: compile ../../base/third_party/symbolize/demangle.cc on 10.9.8.112/9 failed
distcc[2213] (dcc_build_somewhere) Warning: remote compilation of '../../base/third_party/symbolize/demangle.cc' failed, retrying locally
distcc[2213] Warning: failed to distribute ../../base/third_party/symbolize/demangle.cc to 10.9.8.112/9, running locally instead
distcc[2213] (dcc_please_send_email_after_investigation) Warning: remote compilation of '../../base/third_party/symbolize/demangle.cc' failed, retried locally and got a different result.
...

Verbose distcc.log on the volunteer. Any thoughts are welcome.

@modoojunko
Copy link

it looks like i have same situation

@oneechanhax
Copy link

Any way i can help?
Im using a full non-gnu system without gcc if that helps any.

@shawnl
Copy link
Collaborator

shawnl commented Mar 12, 2020

While you did not include the distccd log necessary to know for sure, this is probably a duplicate of this debian bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926884

@graysky2
Copy link
Author

While you did not include the distccd log necessary to know for sure, this is probably a duplicate of this debian bug:

@shawnl - I attached a debug log to the first post in this I thought. Can I provide you with something else to help? Also, I am not using pump at all in building this.

@henryptung
Copy link

henryptung commented Jul 7, 2020

FWIW, following the instructions here (which were written for icecc) helps a lot with the chromium-vaapi build in particular (I'm using pump mode). That page details some of the particular arguments which choke icecc (and probably distcc too). Don't have the logs anymore, but IIRC setting DISTCC_SAVE_TEMPS=1 revealed that broken references to afdo.prof and blacklist.txt were indeed failing the remote call.

Of note, pump mode still has a problem, because it interprets -Xclang -fdebug-compilation-dir -Xclang . as specifying . as compilation source, causing remote preprocessing to fail. I worked around that with the following patch:

diff --git a/include_server/parse_command.py b/include_server/parse_command.py
index b0b284d..92aff10 100755
--- a/include_server/parse_command.py
+++ b/include_server/parse_command.py
@@ -150,6 +150,7 @@ CPP_OPTIONS_ALWAYS_TWO_WORDS = {
   '--param':        lambda ps, arg: None,
   '-Xassembler':    lambda ps, arg: None,
   '-Xlinker':       lambda ps, arg: None,
+  '-Xclang':        lambda ps, arg: None,
 }
 
 # For efficiency, it's helpful to be able to combine the two above

though in retrospect, it's probably easier to just set symbol_level=0 per https://github.com/chromium/chromium/blob/cd842fae3b96860aa132282f270cd34edcf9f496/build/config/compiler/BUILD.gn#L1113 Changed before 83.x.

@graysky2
Copy link
Author

graysky2 commented Jul 8, 2020

@henryptung - Thanks for sharing that link. I modified my flags, adding two mentioned in the link:

clang_use_default_sample_profile=false
is_cfi=false

Now I am getting distcc distributing out to my two volunteer machines (THANK YOU)! Interestingly (perhaps to be expected?), the build log is full of notes and warnings. Normal?

...
[22153/39200] CXX obj/chrome/browser/extensions/extensions/i18n_api.o
[22154/39200] CXX obj/chrome/browser/extensions/extensions/downloads_api.o
In file included from ../../chrome/browser/extensions/api/downloads/downloads_api.cc:5:
In file included from ../../chrome/browser/extensions/api/downloads/downloads_api.h:12:
In file included from ../../base/files/file_path.h:114:
In file included from ../../base/stl_util.h:26:
../../base/logging.h:704:286: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
template <class t1, class t2> constexpr std::string* CheckEQImpl(const t1& v1, const t2& v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); } constexpr std::string* CheckEQImpl(int v1, int v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); }
                                                                                                                                                                                                                                                                                          ~~~^~~~~
../../base/logging.h:704:286: note: remove extraneous parentheses around the comparison to silence this warning
template <class t1, class t2> constexpr std::string* CheckEQImpl(const t1& v1, const t2& v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); } constexpr std::string* CheckEQImpl(int v1, int v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); }
                                                                                                                                                                                                                                                                                         ~   ^    ~
../../base/logging.h:704:286: note: use '=' to turn this equality comparison into an assignment
template <class t1, class t2> constexpr std::string* CheckEQImpl(const t1& v1, const t2& v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); } constexpr std::string* CheckEQImpl(int v1, int v2, const char* names) { if ((v1 == v2)) return nullptr; else return ::logging::MakeCheckOpString(v1, v2, names); }
                                                                                                                                                                                                                                                                                             ^~
                                                                                                                                                                                                                                                                                             =
../../chrome/browser/extensions/api/downloads/downloads_api.cc:226:51: warning: code will never be executed [-Wunreachable-code]
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(danger < static_cast<download::DownloadDangerType>(base::size(kDangerStrings)));
                                                  ^
../../chrome/browser/extensions/api/downloads/downloads_api.cc:226:3: note: silence by adding parentheses to mark code as explicitly dead
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(danger < static_cast<download::DownloadDangerType>(base::size(kDangerStrings)));
  ^
  /* DISABLES CODE */ ( )
../../chrome/browser/extensions/api/downloads/downloads_api.cc:225:51: warning: code will never be executed [-Wunreachable-code]
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(danger >= 0);
                                                  ^
../../chrome/browser/extensions/api/downloads/downloads_api.cc:225:3: note: silence by adding parentheses to mark code as explicitly dead
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(danger >= 0);
  ^
  /* DISABLES CODE */ ( )
../../chrome/browser/extensions/api/downloads/downloads_api.cc:244:51: warning: code will never be executed [-Wunreachable-code]
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(state < static_cast<download::DownloadItem::DownloadState>( base::size(kStateStrings)));
                                                  ^
../../chrome/browser/extensions/api/downloads/downloads_api.cc:244:3: note: silence by adding parentheses to mark code as explicitly dead
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(state < static_cast<download::DownloadItem::DownloadState>( base::size(kStateStrings)));
  ^
  /* DISABLES CODE */ ( )
../../chrome/browser/extensions/api/downloads/downloads_api.cc:243:51: warning: code will never be executed [-Wunreachable-code]
  true ? (void)0 : ::logging::LogMessageVoidify() & (*::logging::g_swallow_stream) << !(state >= 0);
...

@henryptung
Copy link

@graysky2 I also got a bunch of warnings, going to guess normal.

Sadly, the line I mentioned got changed before 83.x, so for now the distcc patch seems to be the only way to make pump mode work.

@graysky2
Copy link
Author

graysky2 commented Jul 9, 2020

I am going to close this issue since the problem isn't with distcc but with the way I was compiling chromium.

@henryptung - Thank you again for pointing me to the solution. Now, it only takes 3 hours to build chromium whereas with distcc, it took 5-1/2 hours.

@graysky2 graysky2 closed this as completed Jul 9, 2020
@henryptung
Copy link

@graysky2 Er, wouldn't close this bug. The listed strategies from the referenced page are workarounds - ways that happen to make the build avoid troublesome clang features that choke up distcc. However, there's no fundamental reason why distcc shouldn't support/handle those features (e.g. I think a later version of icecc fixes at least one of the two), and there's no guarantee that those workarounds will still work in future versions of chromium (which may no longer provide an opt-out for those flags).

@graysky2 graysky2 reopened this Jul 13, 2020
@graysky2
Copy link
Author

@shawnl - Any thoughts?

@graysky2
Copy link
Author

graysky2 commented Dec 19, 2020

@henryptung - Looks like chromium 87.0.x.y breaks distccd despite the work arounds:

...
distccd[56648] (dcc_job_summary) client: 10.9.8.228:46974 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:440ms clang ../../base/third_party/libevent/log.c
distccd[56848] (dcc_job_summary) client: 10.9.8.228:46976 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:449ms clang ../../base/third_party/libevent/select.c
distccd[56888] (dcc_job_summary) client: 10.9.8.228:46972 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:451ms clang ../../base/third_party/dynamic_annotations/dynamic_annotations.c
distccd[56626] (dcc_job_summary) client: 10.9.8.228:46982 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:439ms clang ../../base/third_party/xdg_mime/xdgmimealias.c
distccd[56676] (dcc_job_summary) client: 10.9.8.228:46978 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:454ms clang ../../base/third_party/libevent/signal.c
distccd[56391] (dcc_job_summary) client: 10.9.8.228:46980 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:500ms clang++ ../../base/third_party/double_conversion/double-conversion/bignum-dtoa.cc
distccd[56648] (dcc_job_summary) client: 10.9.8.228:46984 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:179ms clang++ ../../base/third_party/symbolize/demangle.cc
distccd[56848] (dcc_job_summary) client: 10.9.8.228:46986 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:163ms clang ../../base/third_party/xdg_mime/xdgmimecache.c
distccd[56626] (dcc_job_summary) client: 10.9.8.228:47012 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1107ms clang++ ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/StringSaver.cpp
distccd[56888] (dcc_job_summary) client: 10.9.8.228:47010 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1312ms clang++ ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/StringRef.cpp
distccd[56391] (dcc_job_summary) client: 10.9.8.228:47016 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1204ms clang++ ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/Twine.cpp
distccd[56648] (dcc_job_summary) client: 10.9.8.228:47018 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1138ms clang++ ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/raw_os_ostream.cpp
distccd[56676] (dcc_job_summary) client: 10.9.8.228:47014 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1873ms clang++ ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/Timer.cpp
distccd[56848] (dcc_job_summary) client: 10.9.8.228:47104 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1280ms clang++ ../../third_party/skia/src/core/SkPaintPriv.cpp
distccd[56626] (dcc_job_summary) client: 10.9.8.228:47106 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1741ms clang++ ../../third_party/skia/src/core/SkPath.cpp
distccd[56888] (dcc_job_summary) client: 10.9.8.228:47108 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1672ms clang++ ../../third_party/skia/src/core/SkPathBuilder.cpp
distccd[56391] (dcc_job_summary) client: 10.9.8.228:47110 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:988ms clang++ ../../third_party/skia/src/core/SkPathMeasure.cpp

UPDATE: I found this: https://www.cnblogs.com/bigben0123/p/12551318.html

Adding these in addition to the two flags from your initial URL allowed distcc to work again to compile chromium. I should say that I also updated distcc to the latest git. For reference:

local _flags=(
...
    # https://blogs.igalia.com/jaragunde/2018/06/13/chromium-official-release-builds-and-icecc/
    'clang_use_default_sample_profile=false'
    'is_cfi=false'
    # ref2: https://www.cnblogs.com/bigben0123/p/12551318.html
    'linux_use_bundled_binutils=false'
    'use_debug_fission=false'
    'is_clang=false')

UPDATE2: this fails to build after 4000 steps in or so.

...
[4021/43019] STAMP obj/third_party/crashpad/crashpad/third_party/xnu/xnu.stamp
[4022/43019] CC obj/third_party/boringssl/boringssl/derive_key.o
[4023/43019] CC obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o
FAILED: obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o 
clang -MMD -MF obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONFIG_LOG=0 -DSTACK_ALIGNMENT=32 -DDAV1D_API= -I../.. -Igen -I../../third_party/dav1d/libdav1d -I../../third_party/dav1d/libdav1d/include -I../../third_party/dav1d/libdav1d/include/dav1d -I../../third_party/dav1d/config/linux/x64 -I../../third_party/dav1d/version -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200112L -std=c99 -mpreferred-stack-boundary=5 -D_GNU_SOURCE -DBITDEPTH=16 -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu11 -D_FORTIFY_SOURCE=2 -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color   -Wno-builtin-macro-redefined   -Wno-unknown-warning-option -c ../../third_party/dav1d/libdav1d/src/ipred_prepare_tmpl.c -o obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o
clang-11: error: unknown argument: '-mpreferred-stack-boundary=5'
distcc[8044] ERROR: compile ../../third_party/dav1d/libdav1d/src/ipred_prepare_tmpl.c on localhost failed
[4024/43019] CC obj/third_party/dav1d/dav1d_10bit/film_grain_tmpl.o
FAILED: obj/third_party/dav1d/dav1d_10bit/film_grain_tmpl.o 
clang -MMD -MF obj/third_party/dav1d/dav1d_10bit/film_grain_tmpl.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONFIG_LOG=0 -DSTACK_ALIGNMENT=32 -DDAV1D_API= -I../.. -Igen -I../../third_party/dav1d/libdav1d -I../../third_party/dav1d/libdav1d/include -I../../third_party/dav1d/libdav1d/include/dav1d -I../../third_party/dav1d/config/linux/x64 -I../../third_party/dav1d/version -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200112L -std=c99 -mpreferred-stack-boundary=5 -D_GNU_SOURCE -DBITDEPTH=16 -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu11 -D_FORTIFY_SOURCE=2 -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color   -Wno-builtin-macro-redefined   -Wno-unknown-warning-option -c ../../third_party/dav1d/libdav1d/src/film_grain_tmpl.c -o obj/third_party/dav1d/dav1d_10bit/film_grain_tmpl.o
clang-11: error: unknown argument: '-mpreferred-stack-boundary=5'
distcc[8043] ERROR: compile ../../third_party/dav1d/libdav1d/src/film_grain_tmpl.c on 10.9.8.112/9 failed
distcc[8043] (dcc_build_somewhere) Warning: remote compilation of '../../third_party/dav1d/libdav1d/src/film_grain_tmpl.c' failed, retrying locally
distcc[8043] Warning: failed to distribute ../../third_party/dav1d/libdav1d/src/film_grain_tmpl.c to 10.9.8.112/9, running locally instead
clang-11: error: unknown argument: '-mpreferred-stack-boundary=5'
distcc[8043] ERROR: compile ../../third_party/dav1d/libdav1d/src/film_grain_tmpl.c on localhost failed
[4025/43019] CC obj/third_party/boringssl/boringssl/cbb.o
[4026/43019] CC obj/third_party/boringssl/boringssl/e_aesccm.o
[4027/43019] CXX obj/third_party/ced/ced/compact_enc_det_hint_code.o
[4028/43019] CC obj/third_party/boringssl/boringssl/curve25519.o
[4029/43019] CXX obj/third_party/ced/ced/encodings.o
[4030/43019] CXX obj/third_party/ced/ced/compact_enc_det.o
[4031/43019] ACTION //third_party/catapult/tracing:generate_about_tracing(//build/toolchain/linux/unbundle:default)
[4032/43019] ACTION //third_party/blink/renderer/bindings:web_idl_database(//build/toolchain/linux/unbundle:default)
ninja: build stopped: subcommand failed.

@shawnl
Copy link
Collaborator

shawnl commented Dec 20, 2020

clang -MMD -MF obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DCONFIG_LOG=0 -DSTACK_ALIGNMENT=32 -DDAV1D_API= -I../.. -Igen -I../../third_party/dav1d/libdav1d -I../../third_party/dav1d/libdav1d/include -I../../third_party/dav1d/libdav1d/include/dav1d -I../../third_party/dav1d/config/linux/x64 -I../../third_party/dav1d/version -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200112L -std=c99 -mpreferred-stack-boundary=5 -D_GNU_SOURCE -DBITDEPTH=16 -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu11 -D_FORTIFY_SOURCE=2 -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color -Wno-builtin-macro-redefined -Wno-unknown-warning-option -c ../../third_party/dav1d/libdav1d/src/ipred_prepare_tmpl.c -o obj/third_party/dav1d/dav1d_10bit/ipred_prepare_tmpl.o
clang-11: error: unknown argument: '-mpreferred-stack-boundary=5'

Remotely AND locally.

There is nothing in dcc_scan_args in src/arg.c that would catch that flag, so this problem is almost certainly with chromium. Did you test without distcc?

GCC can take that argument but clang cannot. Chromium thinks it is building on gcc but you are using clang. This is not a distcc problem.

@graysky2
Copy link
Author

graysky2 commented Dec 20, 2020

There is nothing in dcc_scan_args in src/arg.c that would catch that flag, so this problem is almost certainly with chromium. Did you test without distcc?

I did test locally and the build completes without error.

@graysky2
Copy link
Author

@graysky2
Copy link
Author

graysky2 commented Dec 20, 2020

in addition to the upstream bug report, Arch ARM is building with the following flags which I am currently trying on x86_64. So far, I am seeing good distribution out to my distcc cluster.

    'is_cfi=false'
    'use_gold=false'
    'clang_use_default_sample_profile=false'
    #'use_allocator="none"'
    'chrome_pgo_phase=0'

EDIT: I commented out the 'use_allocator=" since I have been removing these one-by-one and checking to see if the build progresses for 10-12 min. It seems that particular one is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants