Compilation problem with gcc 4.6: undefined reference to 'mozilla::dom::indexedDB::LoggingString::kCloseBracket'

RESOLVED FIXED in mozilla37

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: baku, Assigned: baku)

Tracking

Trunk
mozilla37
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
I have problem linking with gcc 4.6 in debug builds:

ProfilerHelpers.h:167: error: undefined reference to 'mozilla::dom::indexedDB::LoggingString::kCloseBracket'
.... which may overflow at runtime; recompile with -fPIC

I found a similar issue in bug 906040 comment 6.

Luke wrote:

"I'm pretty sure the problem is this long-standing GCC quirk that it emits references to static const varaibles when they are used in a ternary operator (which you write "static const X = 1", this is a declaration and initialization, but not a *definition* which means, should a symbol ever be emitted for X, it'll be a link error, but mostly symbols never get emitted since the whole point is that they're inlined).  The usual fix is either to add a definition or take out the ternary operator."
(Assignee)

Comment 1

4 years ago
Created attachment 8537161 [details] [diff] [review]
link.patch
Attachment #8537161 - Flags: review?(bugs)
Comment on attachment 8537161 [details] [diff] [review]
link.patch

If this helps, fine.
Attachment #8537161 - Flags: review?(bugs) → review+
Duplicate of this bug: 1112177
https://hg.mozilla.org/mozilla-central/rev/c11e74d5f488
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.