Closed Bug 1356493 Opened 7 years ago Closed 7 years ago

Cannot build Nightly with Windows 10 SDK (10.0.15063.0) due to "ERROR: Cannot find mt"

Categories

(Firefox Build System :: General, defect)

x86
Windows 10
defect
Not set
normal

Tracking

(firefox55 fixed, firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox55 --- fixed
firefox56 --- fixed

People

(Reporter: masayuki, Assigned: bobowen)

References

Details

Attachments

(1 file)

I installed MozillaBuild 2.2.0, Visual Studio 2015 with Update 3 and Windows 10 SDK (10.0.15063.0).  However, the build script stops due to "ERROR: Cannot find mt".

>  0:06.36 checking the target C compiler version... 19.00.24215
>  0:06.42 checking the target C compiler works... yes
>  0:06.45 checking for the target C++ compiler... 'c:/PROGRA~2/MICROS~1.0/VC/BIN/amd64/cl.exe'
>  0:06.51 checking whether the target C++ compiler can be used... yes
>  0:06.51 checking the target C++ compiler version... 19.00.24215
>  0:06.59 checking the target C++ compiler works... yes
>  0:06.59 checking for the host C compiler... 'c:/PROGRA~2/MICROS~1.0/VC/BIN/amd64/cl.exe'
>  0:06.68 checking whether the host C compiler can be used... yes
>  0:06.68 checking the host C compiler version... 19.00.24215
>  0:06.75 checking the host C compiler works... yes
>  0:06.75 checking for the host C++ compiler... 'c:/PROGRA~2/MICROS~1.0/VC/BIN/amd64/cl.exe'
>  0:06.83 checking whether the host C++ compiler can be used... yes
>  0:06.83 checking the host C++ compiler version... 19.00.24215
>  0:06.89 checking the host C++ compiler works... yes
>  0:06.98 checking for 64-bit OS... yes
>  0:07.05 checking for Windows SDK... 0x0a00 in 'C:\Program Files (x86)\Windows Kits\10\'
>  0:07.05 checking for Universal CRT SDK... 10.0.15063.0 in 'C:\Program Files (x86)\Windows Kits\10\'
>  0:07.06 checking for the Debug Interface Access SDK... c:/PROGRA~2/MICROS~1.0/DIA SDK
>  0:07.08 checking for mt... not found
>  0:07.08 DEBUG: mt: Trying mt.exe
>  0:07.08 ERROR: Cannot find mt
>  0:07.13 *** Fix above errors and then restart with\
>  0:07.13                "c:/mozilla-build/mozmake/mozmake.EXE -f client.mk build"
>  0:07.15 client.mk:379: recipe for target 'configure' failed
>  0:07.15 mozmake.EXE: *** [configure] Error 1

According to the code:
http://searchfox.org/mozilla-central/rev/d4eaa9c2fa54d553349ac88f0c312155a4c6e89e/build/moz.configure/windows.configure#356-379
It looks for mt.ext under "C:\Program Files (x86)\Windows Kits\10\bin\x64". However, mt.exe is in "C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64".

Perhaps, the install path rules of Win10 SDK has been changed?

WINDOWSSDK* env:
> declare -x WINDOWSSDKDIR="C:\\Program Files (x86)\\Windows Kits\\10\\"
> declare -x WINDOWSSDKLIBVERSION="10.0.15063.0\\"
> declare -x WINDOWSSDKVERSION="10.0.15063.0\\"

If I do:
> export PATH="$PATH:/C/Program Files (x86)/Windows Kits/10/bin/10.0.15063.0/x64
before |./mach build|, mt.ext is found.
I'm having this exact same problem.
Same for me.  Began happening with VS2017 upgrade.

My path matches:

C:/Program Files (x86)/Windows Kits/10/bin/10.0.15063.0/x64
To be clear this workaround from Masayuki WFM:

export PATH="$PATH:/C/Program Files (x86)/Windows Kits/10/bin/10.0.15063.0/x64"
I also hit this. I have updated the build docs at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites#Visual_Studio_2017 to mention Masayuki's work around. When this bug is fixed, please update the docs to remove the mention of the work around.
i am having same problem but unable to resolve this i am new to this please help me t resolve this,
1. how to give environment path variables in windows 
2.how to make mt.exe found in mach build command
(In reply to Chris Pearce (:cpearce) from comment #6)
> I also hit this. I have updated the build docs at
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/
> Build_Instructions/Windows_Prerequisites#Visual_Studio_2017 to mention
> Masayuki's work around. When this bug is fixed, please update the docs to
> remove the mention of the work around.

can u resolve same issue for me
Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Comment on attachment 8887083 [details] [diff] [review]
Add the SDK version number to the bin path for Windows 10 SDK v10.0.15063.0 and above

Review of attachment 8887083 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/moz.configure/windows.configure
@@ +375,5 @@
>          'AMD64': 'x64',
>      }.get(platform.machine())
>  
> +    # From version 10.0.15063.0 onwards the bin path contains the version number.
> +    versioned_bin = ('bin' if valid_ucrt_sdk_dir.version < Version('10.0.15063.0')

valid_ucrt_sdk_dir.version being a Version already, you actually can compare with the string directly, without converting it to a Version.
Attachment #8887083 - Flags: review?(mh+mozilla) → review+
Pushed by bobowencode@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/530f7bd28399
Add the SDK version number to the bin path for Windows 10 SDK v10.0.15063.0 and above. r=glandium
https://hg.mozilla.org/mozilla-central/rev/530f7bd28399
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: