Closed Bug 1664962 Opened 4 years ago Closed 4 years ago

Clang version mismatch between .mozbuild/clang-dist-toolchain.tar.xz and .mozbuild/clang/ (9.0.1 vs 11.0.0)

Categories

(Firefox Build System :: Toolchains, defect)

defect

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: mstange, Assigned: rstewart)

Details

Attachments

(1 file)

Building Firefox with distributed sccache on macOS using the toolchains in ~/.mozbuild currently fails with the following error:

gfx/2d/ConvolutionFilter.o
/Users/mstange/.mozbuild/sccache/sccache /Users/mstange/.mozbuild/clang/bin/clang++ -isysroot /Users/mstange/SDKs/MacOSX10.11.sdk -std=gnu++17 -o ConvolutionFilter.o -c  -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DUSE_SSE2 -DOS_POSIX=1 -DOS_MACOSX=1 -DUSE_CAIRO -DMOZ2D_HAS_MOZ_CAIRO -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/Users/mstange/code/mozilla/gfx/2d -I/Users/mstange/code/obj-m-opt/gfx/2d -I/Users/mstange/code/obj-m-opt/ipc/ipdl/_ipdlheaders -I/Users/mstange/code/mozilla/ipc/chromium/src -I/Users/mstange/code/mozilla/ipc/glue -I/Users/mstange/code/mozilla/gfx/skia -I/Users/mstange/code/mozilla/gfx/skia/skia -I/Users/mstange/code/obj-m-opt/dist/include -I/Users/mstange/code/obj-m-opt/dist/include/nspr -I/Users/mstange/code/obj-m-opt/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /Users/mstange/code/obj-m-opt/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new --target=x86_64-apple-darwin16.0.0 -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -funwind-tables -Wno-error=shadow -I/Users/mstange/code/obj-m-opt/dist/include/cairo  -MD -MP -MF .deps/ConvolutionFilter.o.pp   /Users/mstange/code/mozilla/gfx/2d/ConvolutionFilter.cpp
In file included from /Users/mstange/code/mozilla/gfx/2d/ConvolutionFilter.cpp:9:
In file included from /Users/mstange/code/mozilla/gfx/skia/skia/src/core/SkBitmapFilter.h:15:
In file included from /Users/mstange/code/mozilla/gfx/skia/skia/include/private/SkNx.h:419:
In file included from /Users/mstange/code/mozilla/gfx/skia/skia/include/private/SkNx_sse.h:16:
In file included from /Users/mstange/.mozbuild/clang/lib/clang/11.0.0/include/tmmintrin.h:13:
/Users/mstange/.mozbuild/clang/lib/clang/11.0.0/include/pmmintrin.h:266:26: error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *'
  __builtin_ia32_monitor(__p, __extensions, __hints);
                         ^~~
1 error generated.
sccache: Compiler killed by signal 1
make[1]: *** [ConvolutionFilter.o] Error 254
make: *** [default] Error 2

This is because ~/.mozbuild/clang-dist-toolchain.tar.xz currently contains clang 9.0.1 whereas ~/.mozbuild/clang/ contains clang 11.0.0.

It would be great if mach bootstrap could install an updated clang-dist-toolchain archive with the same clang version as the host binary toolchain that gets installed at ~/.mozbuild/clang/.


Background:

When using distributed sccache with macOS / Windows clients, one has to provide an explicit toolchain that can be distributed to the linux build servers. mach bootstrap provides a clang-dist-toolchain.tar.xz archive in the .mozbuild directory that can be used for this.

The compiler from that archive is then used together with the standard library in ~/.mozbuild/clang/lib/clang/.

For reliably successful builds, the clang build on the macOS/Windows client and the clang build in the clang-dist-toolchain archive should have the same version. Otherwise we might attempt to use a new clang with and old clang's standard library.

Assignee: nobody → rstewart
Status: NEW → ASSIGNED
Pushed by rstewart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/729c9d08dc57
Use Clang 11 in `clang-dist-toolchain` r=glandium
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: