../../dist/include/GeckoProfilerImpl.h:309:7: error: call to 'vsnprintf' is ambiguous when building with 8 unified sources instead of 16

RESOLVED FIXED in mozilla28

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glandium, Assigned: Ehsan)

Tracking

Trunk
mozilla28
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

Open python/mozbuild/mozbuild/backend/recursivemake.py, search for files_per_unification, replace its value (16) with 8.

This is the error you can get then:

../../dist/include/GeckoProfilerImpl.h:309:7: error: call to 'vsnprintf' is ambiguous
      vsnprintf(buff, SAMPLER_MAX_STRING, aFormat, args);
      ^~~~~~~~~
/usr/include/stdio.h:390:12: note: candidate function
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
           ^
ipc/chromium/src/base/string_util_posix.h:31:12: note: candidate function
inline int vsnprintf(char* buffer, size_t size,
           ^
In file included from obj-x86_64-unknown-linux-gnu/gfx/layers/Unified_cpp_gfx_layers7.cpp:29:
In file included from gfx/layers/ipc/LayerTransactionParent.cpp:41:
In file included from ../../dist/include/GeckoProfiler.h:176:
../../dist/include/GeckoProfilerImpl.h:310:7: error: call to 'snprintf' is ambiguous
      snprintf(mDest, SAMPLER_MAX_STRING, "%s %s", aDefault, buff);
      ^~~~~~~~
/usr/include/stdio.h:386:12: note: candidate function
extern int snprintf (char *__restrict __s, size_t __maxlen,
           ^
ipc/chromium/src/base/string_util.h:53:12: note: candidate function
inline int snprintf(char* buffer, size_t size, const char* format, ...) {
           ^
Ehsan, did you have errors like this during the migration of some of the code?
Blocks: unified
Flags: needinfo?(ehsan)
Posted patch Patch (v1)Splinter Review
This is thanks to the |using namespace base;| statements in gfx/layers/ipc.
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #8341109 - Flags: review?(bgirard)
Flags: needinfo?(ehsan)
Attachment #8341109 - Flags: review?(bgirard) → review+
https://hg.mozilla.org/mozilla-central/rev/46680cc56bcf
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.