Open Bug 1840551 Opened 2 years ago Updated 1 year ago

Fails to build with GCC 13.1.1 in non-unified build mode

Categories

(Data Platform and Tools :: Glean Platform, defect)

defect

Tracking

(Not tracked)

People

(Reporter: stransky, Unassigned)

References

Details

Attachments

(1 file)

While working on debugging Bug 1796523 i found that Firefox fails to build with GCC 13.1.1 in non-unified mode even if --enable-release & --without-sysroot is used:

 0:03.95 In file included from /raid/src/objdir-pgo-gcc/instrumented/dist/system_wrappers/type_traits:3,
 0:03.95                  from /raid/src/objdir-pgo-gcc/instrumented/dist/stl_wrappers/type_traits:62,
 0:03.95                  from /usr/include/c++/13/bits/move.h:37,
 0:03.95                  from /usr/include/c++/13/bits/stl_function.h:60,
 0:03.95                  from /usr/include/c++/13/functional:49,
 0:03.95                  from /raid/src/objdir-pgo-gcc/instrumented/dist/system_wrappers/functional:3,
 0:03.95                  from /raid/src/objdir-pgo-gcc/instrumented/dist/stl_wrappers/functional:62,
 0:03.95                  from /raid/src/toolkit/components/glean/ipc/FOGIPC.h:9,
 0:03.95                  from /raid/src/toolkit/components/glean/ipc/Support.cpp:9:
 0:03.95 /usr/include/c++/13/type_traits: In instantiation of ‘struct std::is_invocable_r<void, FOG_RegisterContentChildShutdown()::<lambda()>::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&, mozilla::ipc::ByteBuf>’:
 0:03.95 /usr/include/c++/13/type_traits:3371:44:   required from ‘constexpr const bool std::is_invocable_r_v<void, FOG_RegisterContentChildShutdown()::<lambda()>::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&, mozilla::ipc::ByteBuf>’
 0:03.95 /usr/include/c++/13/bits/invoke.h:103:27:   required by substitution of ‘template<class _Res, class _Callable, class ... _Args> constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = FOG_RegisterContentChildShutdown()::<lambda()>::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&; _Args = {mozilla::ipc::ByteBuf}]’
 0:03.95 /usr/include/c++/13/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = FOG_RegisterContentChildShutdown()::<lambda()>::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>; _ArgTypes = {mozilla::ipc::ByteBuf&&}]’
 0:03.95 /usr/include/c++/13/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = FOG_RegisterContentChildShutdown()::<lambda()>::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>; _Constraints = void; _Res = void; _ArgTypes = {mozilla::ipc::ByteBuf&&}]’
 0:03.95 /raid/src/toolkit/components/glean/ipc/Support.cpp:33:7:   required from here
 0:03.95 /usr/include/c++/13/type_traits:3094:53: error: static assertion failed: each argument type must be a complete class or an unbounded array
 0:03.95  3094 |       static_assert((std::__is_complete_or_unbounded(
 0:03.95       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 0:03.95  3095 |         __type_identity<_ArgTypes>{}) && ...),
 0:03.95       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:03.95 /usr/include/c++/13/type_traits:3094:53: note: ‘std::__is_complete_or_unbounded<__type_identity<mozilla::ipc::ByteBuf> >((std::__type_identity<mozilla::ipc::ByteBuf>(), std::__type_identity<mozilla::ipc::ByteBuf>()))’ evaluates to false
 0:03.95 /usr/include/c++/13/type_traits: In instantiation of ‘struct std::is_invocable_r<void, FOG_IPCPayloadFull()::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&, mozilla::ipc::ByteBuf>’:
 0:03.95 /usr/include/c++/13/type_traits:3371:44:   required from ‘constexpr const bool std::is_invocable_r_v<void, FOG_IPCPayloadFull()::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&, mozilla::ipc::ByteBuf>’
 0:03.95 /usr/include/c++/13/bits/invoke.h:103:27:   required by substitution of ‘template<class _Res, class _Callable, class ... _Args> constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = FOG_IPCPayloadFull()::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>&; _Args = {mozilla::ipc::ByteBuf}]’
 0:03.95 /usr/include/c++/13/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = FOG_IPCPayloadFull()::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>; _ArgTypes = {mozilla::ipc::ByteBuf&&}]’
 0:03.95 /usr/include/c++/13/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = FOG_IPCPayloadFull()::<lambda()>::<lambda(mozilla::ipc::ByteBuf&&)>; _Constraints = void; _Res = void; _ArgTypes = {mozilla::ipc::ByteBuf&&}]’
 0:03.95 /raid/src/toolkit/components/glean/ipc/Support.cpp:70:13:   required from here
 0:03.95 /usr/include/c++/13/type_traits:3094:53: error: static assertion failed: each argument type must be a complete class or an unbounded array
 0:03.95 /usr/include/c++/13/type_traits:3094:53: note: ‘std::__is_complete_or_unbounded<__type_identity<mozilla::ipc::ByteBuf> >((std::__type_identity<mozilla::ipc::ByteBuf>(), std::__type_identity<mozilla::ipc::ByteBuf>()))’ evaluates to false
 0:04.05 security/ct/tests/gtest/signature-covers-log-id-sth.inc.stub
 0:04.10 gmake[4]: *** [/raid/src/config/rules.mk:667: Support.o] Error 1
 0:04.10 gmake[3]: *** [/raid/src/config/recurse.mk:72: toolkit/components/glean/target-objects] Error 2
 0:04.10 gmake[3]: *** Waiting for unfinished jobs....
Component: General → Glean Platform
Product: Firefox Build System → Data Platform and Tools

Almost certainly a duplicate of #1838655, the fix there hasn't been backported yet from the nightly/116 branch.

(In reply to tt_1 from comment #1)

Almost certainly a duplicate of #1838655, the fix there hasn't been backported yet from the nightly/116 branch.

I built latest trunk. I can re-test when it lands there.

my options are:

ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-release
ac_add_options --without-sysroot
ac_add_options --enable-lto
ac_add_options --disable-unified-build
ac_add_options CC=gcc
ac_add_options CXX=g++

My non-unified build with gcc-13 fails to:

25:04.50 /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: libxul.so: hidden symbol `_ZN2js16WasmStructObject15createStructOOLILb0EEEPS0_P9JSContextPNS_4wasm19TypeDefInstanceDataENS_2gc4HeapEjj' isn't defined
25:04.50 /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: final link failed: bad value
25:04.62 collect2: error: ld returned 1 exit status

This is a simple barebone build, no lto, no pgo. It works when using clang and lld. Find the full build log attached and compressed.

Oh and to add, I do have patch https://hg.mozilla.org/mozilla-central/rev/1adf82bd9e2c included in the build.

 *   0029-bmo-1839023-arm-unified-build-missing-header.patch ...
 [ ok ]
 *   0030-bmo-1838655-arm-unified-build-missing-include.patch ...
 [ ok ]

(although they may not be just arm-related in the end)

117.0 seemed to have worked again, but looks like gcc has also been updated to 13.2.1 if that's relevant.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: