Closed
Bug 1446946
Opened 7 years ago
Closed 6 years ago
Firefox build issue ERROR: Cannot find the target C compiler on Windows
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: info, Unassigned, NeedInfo)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Steps to reproduce:
i was trying to build firefox using: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites
when i reached to the ./mach build i faced the issue below
Actual results:
$ ./mach build
0:04.13 Clobber not needed.
0:04.16 Adding make options from None
MOZ_OBJDIR=c:/mozilla-source/mozilla-central/obj-i686-pc-mi
OBJDIR=c:/mozilla-source/mozilla-central/obj-i686-pc-mingw3
0:04.39 c:\mozilla-build\mozmake\mozmake.EXE -f client.mk -s c
0:05.19 cd c:/mozilla-source/mozilla-central/obj-i686-pc-mingw
0:05.31 c:/mozilla-source/mozilla-central/configure
0:06.88 Reexecuting in the virtualenv
0:07.51 checking for vcs source checkout... hg
0:08.13 checking for a shell... C:/mozilla-build/msys/bin/sh.e
0:10.65 checking for host system type... i686-pc-mingw32
0:10.65 checking for target system type... i686-pc-mingw32
0:10.78 checking for a shell... C:/mozilla-build/msys/bin/sh.e
0:12.81 checking for host system type... i686-pc-mingw32
0:12.81 checking for target system type... i686-pc-mingw32
0:13.09 checking for vcs source checkout... hg
0:13.09 checking whether cross compiling... no
0:13.35 checking for the target C compiler... not found
0:13.38 DEBUG: _cc: Trying cl
0:13.38 DEBUG: _cc: Trying clang-cl
0:13.38 DEBUG: _cc: Trying gcc
0:13.38 DEBUG: _cc: Trying clang
0:13.38 ERROR: Cannot find the target C compiler
0:14.30 *** Fix above errors and then restart with\
0:14.30 "c:/mozilla-build/mozmake/mozmake.EXE -
"
0:14.33 mozmake.EXE: *** [client.mk:149: configure] Error 1
Comment 1•7 years ago
|
||
Unfortunately I am not an expert in building Firefox, but I am assigning a component to this issue in order to involve the development team and get an opinion on this.
Component: Untriaged → General
Product: Firefox → Firefox Build System
Comment 2•7 years ago
|
||
Did you install Visual Studio 2017 as per the instructions here?
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites
Flags: needinfo?(info)
Comment 3•7 years ago
|
||
I have the same problem. I'm the Thunderbird maintainer and I have three working development machines.
Now I ran into the problem, since I want to set up the fourth machine a little different from the others, that is the source code is not stored on C:\ this time, in fact my drive is called M:\, and I'm setting my home to "M:\mozilla-source". It's always worked for me with home set to C:\mozilla-source.
The error message given by the script is pretty poor, it doesn't give any indication whether it's looking for the cl.exe from VS2017 in
C:\vs2017\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\cl.exe
or perhaps
C:\mozilla-source\.mozbuild\clang\msbuild-bin\cl.exe
which on the failing machine is in M:\mozilla-source\.mozbuild\clang\msbuild-bin\cl.exe. That's the one that comes through LLVM.
BTW, the LLVM magic in start-shell.bat has no effect since HKLM\SOFTWARE\Wow6432Node\LLVM\LLVM isn't present.
So which cl.exe is it trying to find, which path is it looking at and what can be done to diagnose and fix the problem?
Flags: needinfo?(ryanvm)
Updated•7 years ago
|
Summary: Firefox build issue client.mk:149 Error → Firefox build issue ERROR: Cannot find the target C compiler on Windows
Comment 4•7 years ago
|
||
Frank-Rainer Grahl pointed me to vswhere.exe. Run on a good machine, it returns heaps of useful output, run on the "bad" machine there was no output.
I started the VS installer again and it told me that there was a restart pending. I feel like a complete fool now since it wanted to restart after the installation and I chose later an then forgot :-(
Flags: needinfo?(ryanvm)
Comment hidden (Intermittent Failures Robot) |
Comment 7•6 years ago
|
||
As per comment #4, when I set up the machine in question, I ignored a necessary restart. After that restart, all became good.
Flags: needinfo?(jorgk)
Comment 8•6 years ago
|
||
closing, user fixed issue.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•