Closed
Bug 728178
Opened 13 years ago
Closed 13 years ago
js.exe fails to link on on mingw (missing MOZ_Crash)
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla13
People
(Reporter: jacek, Assigned: jacek)
References
Details
(Whiteboard: [inbound])
Attachments
(3 files)
2.96 KB,
patch
|
glandium
:
feedback+
|
Details | Diff | Splinter Review |
6.33 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
2.05 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
Landing of bug 717540 broke mingw compilation. I get errors like this during cross compiling on Linux:
/usr/bin/python2.7 /home/jacek/mozilla-build/mozilla-central/js/src/config/pythonpath.py -I../config /home/jacek/mozilla-build/mozilla-central/js/src/config/expandlibs_exec.py --uselist -- i686-w64-mingw32-g++ -mwindows -o js.exe -fno-rtti -pedantic -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 -Wno-long-long -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -pipe -DDEBUG -D_DEBUG -DTRACING -g -fno-omit-frame-pointer js.o jsworkers.o jsoptparse.o jsheaptools.o -static-libgcc -static-libstdc++ ../../../dist/lib/libmozglue.a -L../../../dist/bin -L../../../dist/lib -L/home/jacek/mozilla-build/mozilla-build/dist/lib -lnspr4 -lplc4 -lplds4 ../libjs_static.a -lgdi32 -lwinmm -lwsock32
./libjs_static.a(OSAllocatorWin.o): In function `_ZN3WTF11OSAllocator18reserveUncommittedEjNS0_5UsageEbb':
/home/jacek/mozilla-build/mozilla-central/js/src/yarr/OSAllocatorWin.cpp:52: undefined reference to `_MOZ_Crash'
(followed by more such cases)
I've checked and mozglue.dll properly exports MOZ_Crash, but for some reason linking fails. I've found that moving libmozglue.a inclusion after libjs_static.a helps here. It looks to me like ld bug, but maybe I'm missing something. I'd appreciate an opinion/suggestion on the attached patch/hack that fixes the problem for me.
Attachment #598199 -
Flags: feedback?(mh+mozilla)
Updated•13 years ago
|
Attachment #598199 -
Flags: feedback?(mh+mozilla) → feedback+
Updated•13 years ago
|
Assignee: nobody → jacek
Assignee | ||
Comment 1•13 years ago
|
||
The attached version changes also order of arguments for DLLs building (which was required for 64-bit mingw builds). It builds on try:
https://tbpl.mozilla.org/?tree=Try&rev=bdb093df4f37
Attachment #599071 -
Flags: review?(mh+mozilla)
Updated•13 years ago
|
Attachment #599071 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 2•13 years ago
|
||
Thanks for the super-fast review! Pushed to m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b60e78b6f66
Whiteboard: [inbound]
Comment 3•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Assignee | ||
Comment 4•13 years ago
|
||
Compilation for similar reason still fails for some tests on 64-bit mingw. I've found that the reason linking is behaving so strange in this case is that ld doesn't consider libmozglue.dll.a to be import library unless it's linked by -l.. argument instead of directly by file name. The attached patch fixes it. I also had to change mfbt/Types.h, since it assumed that mingw GCC doesn't support dllimports (which it does).
Attachment #601936 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•13 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•13 years ago
|
Attachment #601936 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Thanks for the review, pushed to m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a6d1d4e8bfc
(I forgot to mention earlier, here is try run: https://tbpl.mozilla.org/?tree=Try&rev=24b63ad50c3f)
Comment 6•13 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•