Closed Bug 1149718 Opened 7 years ago Closed 7 years ago

wow_helper fails to link with MSVC 2015 CTP 6: libucrt.lib(exit.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

Categories

(Core :: Security: Process Sandboxing, defect)

x86_64
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: briansmith, Assigned: away)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file mozconfig-2015 (obsolete) —
wow_helper's moz.build says:

    # The rules in Makefile.in only force the use of the 64-bits compiler, not
    # the 64-bits linker, and the 32-bits linker can't do 64-bits compilation for
    # PGO, so disable PGO, which is not interesting for this small binary anyways.
    NO_PGO = True

I'm guessing that MSVC 2015 requires the use of the 64-bit linker too:

0:41.01 Executing: link -NOLOGO -OUT:wow_helper.exe -PDB:wow_helper.pdb -SUBSYSTEM:WINDOWS,5.01 -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE -DEBUG -DEBUGTYPE:CV
@c:\...\ff-dbg-2015\security\sandbox\win\wow_helper\tmplqhccx.list module.res kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib
 0:41.01 c:\...\ff-dbg-2015\security\sandbox\win\wow_helper\tmplqhccx.list:
 0:41.02     service64_resolver.obj
 0:41.02     target_code.obj
 0:41.02     wow_helper.obj
 0:41.02
 0:41.02 libucrt.lib(exit.obj) : fatal error LNK1112: module machine type 'X86'
conflicts with target machine type 'x64'

I've attached my mozconfig for building with MSVC 2016 (CTP 6). CTP 6 can be downloaded from https://www.visualstudio.com/en-us/downloads/visual-studio-2015-ctp-vs.aspx.

The not-checked-in-yet patches for bug 1119072 and the not-checked-in-yet patch for bug 1119776 are needed to get to the point where this failure occurs.
Seen with VS2015 RC as well (after applying the patch at bug 1160146).
Apparently we're picking up 
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10056.0\ucrt\x86\libucrt.lib"
when we want
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10056.0\ucrt\x64\libucrt.lib"

Just need to add another path replacement to the makefile.
Assignee: nobody → dmajor
Attachment #8586303 - Attachment is obsolete: true
Attachment #8604852 - Flags: review?(mh+mozilla)
Attachment #8604852 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/4f1342c1a891
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.