Closed Bug 1664433 Opened 4 years ago Closed 4 years ago

Broken build in dom/workers/remoteworkers/RemoteWorkerManager.cpp after recent change

Categories

(Core :: DOM: Service Workers, defect)

Other
Linux
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- unaffected
firefox82 --- fixed

People

(Reporter: dan, Assigned: rpl)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I'm getting broken build on ppc64le and s390x platforms after the change from bug 1663512 has been merged. The error message is ‘SprintfLiteral’ was not declared in this scope, I suppose it's because the required header isn't included on those platforms.

 0:13.64 /usr/bin/g++ -std=gnu++17 -o Unified_cpp_remoteworkers0.o -c  -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/stl_wrappers -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/system_wrappers -include /mnt/dan/firefox.git/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/mnt/dan/firefox.git/dom/workers/remoteworkers -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dom/workers/remoteworkers -I/mnt/dan/firefox.git/dom/serviceworkers -I/mnt/dan/firefox.git/xpcom/build -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/ipc/ipdl/_ipdlheaders -I/mnt/dan/firefox.git/ipc/chromium/src -I/mnt/dan/firefox.git/ipc/glue -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nspr -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++2a-compat -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -Werror=implicit-function-declaration -Wno-psabi -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -Og -fno-omit-frame-pointer -funwind-tables  -MD -MP -MF .deps/Unified_cpp_remoteworkers0.o.pp  -fdiagnostics-color  Unified_cpp_remoteworkers0.cpp
 0:13.64 cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
 0:25.31 In file included from Unified_cpp_remoteworkers0.cpp:38:
 0:25.31 /mnt/dan/firefox.git/dom/workers/remoteworkers/RemoteWorkerManager.cpp: In static member function ‘static mozilla::Result<nsTString<char>, nsresult> mozilla::dom::RemoteWorkerManager::GetRemoteType(const nsCOMPtr<nsIPrincipal>&, mozilla::dom::WorkerType)’:
 0:25.31 /mnt/dan/firefox.git/dom/workers/remoteworkers/RemoteWorkerManager.cpp:181:5: error: ‘SprintfLiteral’ was not declared in this scope
 0:25.32   181 |     SprintfLiteral(
 0:25.32       |     ^~~~~~~~~~~~~~
 0:27.01 In file included from /mnt/dan/firefox.git/dom/workers/remoteworkers/RemoteWorkerChild.h:12,
 0:27.01                  from /mnt/dan/firefox.git/dom/workers/remoteworkers/RemoteWorkerChild.cpp:7,
 0:27.01                  from Unified_cpp_remoteworkers0.cpp:2:
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h: In instantiation of ‘static void AssignRangeAlgorithm<true, true>::implementation(ElemType*, IndexType, SizeType, const Item*) [with Item = mozilla::dom::workerinternals::JSSettings::JSGCSetting; ElemType = mozilla::dom::workerinternals::JSSettings::JSGCSetting; IndexType = long unsigned int; SizeType = long unsigned int]’:
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h:2391:57:   required from ‘void nsTArray_Impl<E, Alloc>::AssignRange(nsTArray_Impl<E, Alloc>::index_type, nsTArray_Impl<E, Alloc>::size_type, const Item*) [with Item = mozilla::dom::workerinternals::JSSettings::JSGCSetting; E = mozilla::dom::workerinternals::JSSettings::JSGCSetting; Alloc = nsTArrayInfallibleAllocator; nsTArray_Impl<E, Alloc>::index_type = long unsigned int; nsTArray_Impl<E, Alloc>::size_type = long unsigned int]’
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h:2420:16:   required from ‘typename ActualAlloc::ResultType nsTArray_Impl<E, Alloc>::AssignInternal(const Item*, nsTArray_Impl<E, Alloc>::size_type) [with ActualAlloc = nsTArrayInfallibleAllocator; Item = mozilla::dom::workerinternals::JSSettings::JSGCSetting; E = mozilla::dom::workerinternals::JSSettings::JSGCSetting; Alloc = nsTArrayInfallibleAllocator; typename ActualAlloc::ResultType = void; nsTArray_Impl<E, Alloc>::size_type = long unsigned int]’
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h:1432:39:   required from ‘typename ActualAlloc::ResultType nsTArray_Impl<E, Alloc>::Assign(const nsTArray_Impl<E, Allocator>&) [with Allocator = nsTArrayInfallibleAllocator; ActualAlloc = nsTArrayInfallibleAllocator; E = mozilla::dom::workerinternals::JSSettings::JSGCSetting; Alloc = nsTArrayInfallibleAllocator; typename ActualAlloc::ResultType = void]’
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h:2911:19:   required from ‘CopyableTArray<E>& CopyableTArray<E>::operator=(const CopyableTArray<E>&) [with E = mozilla::dom::workerinternals::JSSettings::JSGCSetting]’
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/workerinternals/JSSettings.h:26:8:   required from here
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nsTArray.h:675:13: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘struct mozilla::dom::workerinternals::JSSettings::JSGCSetting’; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
 0:27.01   675 |       memcpy(aElements + aStart, aValues, aCount * sizeof(ElemType));
 0:27.01       |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:27.01 In file included from /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/WorkerPrivate.h:34,
 0:27.01                  from /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/RemoteWorkerManager.h:14,
 0:27.01                  from /mnt/dan/firefox.git/dom/workers/remoteworkers/RemoteWorkerChild.cpp:36,
 0:27.01                  from Unified_cpp_remoteworkers0.cpp:2:
 0:27.01 /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/workerinternals/JSSettings.h:27:10: note: ‘struct mozilla::dom::workerinternals::JSSettings::JSGCSetting’ declared here
 0:27.01    27 |   struct JSGCSetting {
 0:27.01       |          ^~~~~~~~~~~
 0:27.72 gmake[4]: *** [/mnt/dan/firefox.git/config/rules.mk:725: Unified_cpp_remoteworkers0.o] Chyba 1
 0:27.72 gmake[4]: Opouští se adresář „/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dom/workers/remoteworkers“
Regressed by: 1663512
Has Regression Range: --- → yes

and yup, the following patch fixes it


diff --git a/dom/workers/remoteworkers/RemoteWorkerManager.cpp b/dom/workers/remoteworkers/RemoteWorkerManager.cpp
index 53ae842300e..916391ca5f8 100644
--- a/dom/workers/remoteworkers/RemoteWorkerManager.cpp
+++ b/dom/workers/remoteworkers/RemoteWorkerManager.cpp
@@ -16,6 +16,7 @@
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/PBackgroundParent.h"
 #include "mozilla/StaticPrefs_extensions.h"
+#include "mozilla/Sprintf.h"
 #include "nsCOMPtr.h"
 #include "nsIE10SUtils.h"
 #include "nsImportModule.h"
Assignee: nobody → lgreco
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/3aba8e7118bd Explicitly include Sprintf.h in RemoteWorkerManager.cpp to fix build error on ppc64le/s390x platforms. r=asuth,dom-workers-and-storage-reviewers
Status: UNCONFIRMED → 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

Created:
Updated:
Size: