Closed Bug 998582 Opened 10 years ago Closed 6 years ago

Link failures with some clang versions when building with --enable-shared-js

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: bzbarsky, Unassigned)

References

Details

STEPS TO REPRODUCE:  Compile with clang rev 183744 (which our builders use) or with the default clang on OS 10.9 and --enable-shared-js

ACTUAL RESULTS: Link errors due to xpconnect wanting specializations of stuff like WeakMapPtr::put but the linker not being able to find them while linking libxul.

EXPECTED RESULTS: Build works.

Note: compiling with clang rev 163716 seems to work.
The exact link errors are:

Undefined symbols for architecture x86_64:
  "JS::WeakMapPtr<JSObject*, JSObject*>::put(JSContext*, JSObject* const&, JSObject* const&)", referenced from:
      XPCWrappedNativeScope::SetExpandoChain(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>) in Unified_cpp_js_xpconnect_src1.o
  "JS::WeakMapPtr<JSObject*, JSObject*>::init(JSContext*)", referenced from:
      XPCWrappedNativeScope::SetExpandoChain(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>) in Unified_cpp_js_xpconnect_src1.o
  "JS::WeakMapPtr<JSObject*, JSObject*>::trace(JSTracer*)", referenced from:
      XPCWrappedNativeScope::TraceSelf(JSTracer*) in Unified_cpp_js_xpconnect_src1.o
  "JS::WeakMapPtr<JSObject*, JSObject*>::lookup(JSObject* const&)", referenced from:
      XPCWrappedNativeScope::GetExpandoChain(JSObject*) in Unified_cpp_js_xpconnect_src1.o
  "JS::WeakMapPtr<JSObject*, JSObject*>::destroy()", referenced from:
      XPCWrappedNativeScope::~XPCWrappedNativeScope() in Unified_cpp_js_xpconnect_src1.o
ld: symbol(s) not found for architecture x86_64
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.