Closed Bug 2047275 Opened 2 months ago Closed 2 months ago

nightly fails to compile with: ../include/mozilla/Result.h:524:8: error: 'mozilla::Result<V, E>::mImpl' has incomplete type

Categories

(Core :: MFBT, defect)

Firefox 153
defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox152 --- unaffected
firefox153 --- fixed
firefox154 --- fixed

People

(Reporter: herrtimson, Assigned: gstoll)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached file build.log.gz

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0

Steps to reproduce:

I downloaded latest firefox-153.0 git sources and compiled them

Actual results:

I get this error when compiling:

29:22.57 /usr/bin/armv7a-unknown-linux-gnueabihf-g++ --sysroot /usr/armv7a-unknown-linux-gnueabihf -std=gnu++20 -o Unified_cpp_dom_webserial1.o -c  -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/stl_wrappers -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/system_wrappers -include /home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstrict-flex-arrays=1 -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_SUPPORT_LEAKCHECKING -DSTATIC_EXPORTABLE_JS_API -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/dom/webserial -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dom/webserial -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/dom/base -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/ipc/ipdl/_ipdlheaders -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/ipc/chromium/src -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/third_party/abseil-cpp -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/toolkit/components/telemetry -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox-153.0/xpcom/base -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/include -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/include/nspr -I/home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/include/nss -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/libpng16 -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/pixman-1 -DMOZILLA_CLIENT -include /home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/mozilla-config.h -mfloat-abi=hard -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -pipe -fPIC -pipe -fomit-frame-pointer -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wno-deprecated-enum-enum-conversion -Winvalid-utf8 -Wduplicated-cond -Wimplicit-fallthrough -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-security -Wformat-overflow=2 -Wno-psabi -Wno-error=builtin-macro-redefined -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/glib-2.0 -I/usr/armv7a-unknown-linux-gnueabihf/usr/lib/glib-2.0/include -I/usr/armv7a-unknown-linux-gnueabihf/usr/lib/libffi/include -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/Unified_cpp_dom_webserial1.o.pp  -fdiagnostics-color  Unified_cpp_dom_webserial1.cpp
29:23.24 E /home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/include/mozilla/Result.h:524:8: error: 'mozilla::Result<V, E>::mImpl' has incomplete type
29:23.28 E   524 |   Impl mImpl;
29:23.29 E       |        ^~~~~
29:23.30 E /home/tmp/portage/portage/www-client/firefox-153.0/work/firefox_build/dist/include/mozilla/Result.h:56:7: note: declaration of 'using mozilla::Result<mozilla::Ok, int>::Impl = using mozilla::detail::SelectResultImpl<mozilla::Ok, int>::Type = class mozilla::detail::ResultImplementation<mozilla::Ok, int, mozilla::detail::PackingStrategy::Variant>' {aka 'class mozilla::detail::ResultImplementation<mozilla::Ok, int, mozilla::detail::PackingStrategy::Variant>'}
29:23.31 E    56 | class ResultImplementation;
29:23.31 E       |       ^~~~~~~~~~~~~~~~~~~~

Expected results:

I expect the compile to pass smoothly

the header file is mfbt/Result.h

The Bugbug bot thinks this bug should belong to the 'Core::MFBT' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → MFBT
Product: Firefox → Core
Keywords: regression
Regressed by: 2038644

I did localy revert the changes made in bug #2038644 on top of the last commit of firefox-153.0-nightly, before it was promoted to 153.0-beta branch. This fixes the above error, but it will lead to linking errors of libxul.

Can you maybe have a look at this situation and check wether there is an obvious bug?

:gstoll, since you are the author of the regressor, bug 2038644, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(gstoll)

sigh, looks like a cross-compile unified build problem. Should be easy to fix. (although if reverting that commit leads to a linking error, that linking error is probably a separate problem)

Assignee: nobody → gstoll
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(gstoll)

Set release status flags based on info from the regressing bug 2038644

the patch works for me, you were right that it only affected cross builds, also the linking error I saw is now gone.

I guess the linking error was fallout from the nss system bugs, but the gnu bfd linker is not verbose at all and I can't be certain.

please backport to 153.0_beta branch, and thank you again for the help.

FWIW it's not strictly about cross-builds or unified builds: it's that, because of bug 1677284, using Result<Ok, int> on a target where int isn't at least one bit smaller than a pointer requires including ResultVariant.h.

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Broken build for some 32 bit targets
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Just adding a header
  • String changes made/needed?: no
  • Is Android affected?: yes
Attachment #9598598 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Attachment #9598598 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: