First Time Build Error: Cannot find the target C compiler

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Posts: 3
Joined: June 4th, 2019, 9:06 am

Post Posted June 4th, 2019, 9:21 am

Hello all,

I am trying for my first firefox build on Windows 10 and I'm running into an error. I followed along on this page, installing in order everything I was supposed to:

But then when I try to build: ./mach build
I get this error: "ERROR: Cannot find the target C compiler"
Any ideas on what I should do fix this error? I have Visual Studio Community 2019 installed.
Below is the complete output from the build command:

$ ./mach build
Config object not found by mach.
0:01.28 Clobber not needed.
0:01.28 Adding make options from c:\mozilla-source\mozilla-central\mozconfig
0:01.35 c:\mozilla-build\bin\mozmake.EXE -f -s configure
0:01.45 cd c:/mozilla-source/mozilla-central/obj-x86_64-w64-mingw32
0:01.47 c:/mozilla-source/mozilla-central/configure
0:01.95 Reexecuting in the virtualenv
0:02.39 Adding configure options from c:\mozilla-source\mozilla-central\mozconfig
0:02.39 --target=x86_64-w64-mingw32
0:02.39 --host=x86_64-w64-mingw32
0:02.39 checking for vcs source checkout... hg
0:02.44 checking for a shell... C:/mozilla-build/msys/bin/sh.exe
0:02.61 checking for host system type... x86_64-w64-mingw32
0:02.78 checking for target system type... x86_64-w64-mingw32
0:03.17 checking whether cross compiling... no
0:03.30 checking for Python 3... C:/mozilla-build//python3/python3.exe (3.6.5)
0:03.30 checking for hg... c:/mozilla-build/python/Scripts/hg.exe
0:03.49 checking for Mercurial version... 4.5.3
0:03.74 checking for sparse checkout... no
0:03.74 checking for yasm... c:/mozilla-build/bin/yasm.exe
0:03.75 checking yasm version... 1.3.0
0:03.81 checking for the target C compiler... not found
0:03.81 DEBUG: _cc: Trying clang-cl
0:03.81 DEBUG: _cc: Trying gcc
0:03.81 DEBUG: _cc: Trying clang
0:03.81 ERROR: Cannot find the target C compiler
0:03.88 *** Fix above errors and then restart with\
0:03.88 "./mach build"
0:03.88 mozmake.EXE: *** [ configure] Error 1


Posts: 3
Joined: June 4th, 2019, 9:06 am

Post Posted June 4th, 2019, 11:03 pm

Uninstalled and reinstalled Visual Studio Community 2019, MozillaBuild Package, Firefox source code and tried building again. This time it worked.

Posts: 1
Joined: July 27th, 2019, 8:38 am

Post Posted July 27th, 2019, 8:43 am

I ran into the same problem, probably because I had chosen artifact build in "./mach bootstrap".
Running "./mach bootstrap" again, and not chosing Artifact probably solved it. Besides, I restarted my machine once again.

Return to Third Party/Unofficial Builds

Who is online

Users browsing this forum: Bing [Bot] and 1 guest