Bug 616841 has broken non-libxul builds when trying to build xpcshell, with undefined symbol "xpc_LocalizeContext(JSContext*)"

RESOLVED FIXED in mozilla2.0b10

Status

defect
--
major
RESOLVED FIXED
9 years ago
Last year

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla2.0b10
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

ehsanakhgari:~/moz/mozilla-central/obj-ff-dbg/js/src/xpconnect/shell [05:30:30]$ make
make export
make[1]: Nothing to be done for `export'.
make libs
g++-4.2 -o xpcshell  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -DNO_X11 -pipe  -DDEBUG -D_DEBUG -DTRACING -g  xpcshell.o xpcshellMacUtils.o   -framework Cocoa -lobjc  -framework ExceptionHandling -Wl,-executable_path,/Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/bin -L../../../../dist/bin -L../../../../dist/lib ../../../../dist/lib/libxpcomglue_s.a -L/Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/bin -lxpcom -lmozalloc /Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/bin/XUL -L/Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/bin -lxpcom -lxpcom_core -lmozalloc  -L/Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/bin -lmozjs -L/Users/ehsanakhgari/moz/mozilla-central/obj-ff-dbg/dist/lib -lplds4 -lplc4 -lnspr4     
Undefined symbols:
  "xpc_LocalizeContext(JSContext*)", referenced from:
      _main in xpcshell.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [xpcshell] Error 1
make: *** [default] Error 2



I tried hacking around the breakage, but couldn't.  Chris can probably come up with a real fix, so I'm assigning this to him.
In the short run, can we just not make this call in xpcshell in the non-libxul builds?  That will make the test for bug 616841 fail, but this isn't exactly a supported configuration anyway, right?
Summary: Bug 616841 has broken non-libxul builds when trying to build xpcshell → Bug 616841 has broken non-libxul builds when trying to build xpcshell, with undefined symbol "xpc_LocalizeContext(JSContext*)"
(In reply to comment #0)
> I tried hacking around the breakage, but couldn't.
That would be tricky; xpcshell uses the external API, so it obviously can't link to any static libs. And in a non-libxul build the symbol can't be resolved because gklayout is a component and therefore lives in the wrong folder. There are still at least three potential options though:
1. Like bz says, just #ifdef the call in non-libxul builds
2. Make the call live on some interface somewhere
3. Make xpcshell compile with both internal or external API appropriately
Posted patch Patch (v1)Splinter Review
Don't call the function on non-libxul builds.
Assignee: jones.chris.g → ehsan
Status: NEW → ASSIGNED
Attachment #504525 - Flags: review?(bzbarsky)
Comment on attachment 504525 [details] [diff] [review]
Patch (v1)

r=me
Attachment #504525 - Flags: review?(bzbarsky) → review+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/0133f1361d2b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b10
Attachment #504525 - Flags: approval2.0?
Attachment #504525 - Flags: approval2.0?
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.