Build problem: Ninja failed to build due to "The system cannot find the file specified."

7,858 views
Skip to first unread message

Ethreys

unread,
Aug 23, 2012, 5:44:27 AM8/23/12
to chromi...@chromium.org
Hello,

(Hope I post this thread in correct group.)

I am trying to build Chromium in Windows 7 64-bit system. I threw Visual Studio and only keep its compiler suit for some reasons. Then I start to use Ninja for building, now it reports errors like below:


[12/10648] STAMP obj\ui\ui_resources.actions_rules_copies.stamp
FAILED: python gyp-win-tool stamp obj\ui\ui_resources.actions_rules_copies.stamp

CreateProcess failed: The system cannot find the file specified.
ninja: FATAL: ReadFile: The handle is invalid.

I briefly gone through the source code of gyp-win-tool, but have no idea why this happened. So I just wrote a python script to create *_resources.actions_rules_copies.stamp files for each folder under src\out\Debug\obj\. Then this error disappears. But now I am facing another error like:

 [7/10388] IDL ..\..\third_party\iaccessible2\ia2_api_all.idl
FAILED: python gyp-win-tool midl-wrapper gen\third_party\iaccessible2 ia2_api_all.tlb ia2_api_all.h dlldata.c ia2_api_all_i.c ia2_api_all_p.c ..\..\third_party\iaccessible2\ia2_api_all.idl /char signed /env win32 /Oicf 
CreateProcess failed: The system cannot find the file specified.
ninja: FATAL: ReadFile: The handle is invalid.

I've checked src\third_party\iaccessible2\, there exists ia2_api_all.idl, but in src\out\Debug\gen\third_party\iaccessible2\, there is no ia2_api_all.idl . The command line I used to build Chromium is "ninja -C out/Debug chrome" (in src folder).

Is there any suggestions to fix this issue? Thanks!

Reid Kleckner

unread,
Aug 23, 2012, 10:20:46 AM8/23/12
to toc...@gmail.com, chromi...@chromium.org
On Thu, Aug 23, 2012 at 5:44 AM, Ethreys <toc...@gmail.com> wrote:
Hello,

(Hope I post this thread in correct group.)

I am trying to build Chromium in Windows 7 64-bit system. I threw Visual Studio and only keep its compiler suit for some reasons. Then I start to use Ninja for building, now it reports errors like below:


[12/10648] STAMP obj\ui\ui_resources.actions_rules_copies.stamp
FAILED: python gyp-win-tool stamp obj\ui\ui_resources.actions_rules_copies.stamp

CreateProcess failed: The system cannot find the file specified.
ninja: FATAL: ReadFile: The handle is invalid.

I briefly gone through the source code of gyp-win-tool, but have no idea why this happened. So I just wrote a python script to create *_resources.actions_rules_copies.stamp files for each folder under src\out\Debug\obj\. Then this error disappears. But now I am facing another error like:

If CreateProcess failed, chances are it's talking about the exe it's trying to launch, not the .stamp file.  ninja probably can't find python.  It should be able to get it from depot_tools if you added it to your PATH.
 
 [7/10388] IDL ..\..\third_party\iaccessible2\ia2_api_all.idl
FAILED: python gyp-win-tool midl-wrapper gen\third_party\iaccessible2 ia2_api_all.tlb ia2_api_all.h dlldata.c ia2_api_all_i.c ia2_api_all_p.c ..\..\third_party\iaccessible2\ia2_api_all.idl /char signed /env win32 /Oicf 
CreateProcess failed: The system cannot find the file specified.
ninja: FATAL: ReadFile: The handle is invalid.

I've checked src\third_party\iaccessible2\, there exists ia2_api_all.idl, but in src\out\Debug\gen\third_party\iaccessible2\, there is no ia2_api_all.idl . The command line I used to build Chromium is "ninja -C out/Debug chrome" (in src folder).

Is there any suggestions to fix this issue? Thanks!

Yeah, looks like it still can't find python. 

Alex Pakhunov

unread,
Aug 23, 2012, 11:11:14 AM8/23/12
to toc...@gmail.com, chromi...@chromium.org
Hi,

Is there any suggestions to fix this issue? Thanks! 

Check that midl.exe and rc.exe are in the path.

I threw Visual Studio and only keep its compiler suit for some reasons. 

Ninja tries to locate vsvars32.bat from Visual Studio or setenv.cmd from SDK to set up correct environment. It is hard to say what is failing without knowing what exactly left on your machine.

Alex.



--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

Bill Budge

unread,
Aug 23, 2012, 7:58:07 PM8/23/12
to chromi...@chromium.org
I have seen a similar error when I sync to a new source code revision, but without 'ninja' specified as the GYP generator. Just follow the rules for updating the build files (run build/gyp_chromium) with 'ninja' as GYP_GENERATOR.

Ethreys

unread,
Aug 24, 2012, 9:57:50 AM8/24/12
to chromi...@chromium.org, toc...@gmail.com
Hi Reid and Alex,

Thanks for your kindly help. I double-check the PATH variable in my build environment and it have already involved the "deploy_tools" folder. Then I saw there is a python.bat in this folder which invokes "deploy_tools\python_bin\python.exe". I guess ninja can not call  python.bat to launch python-based tools. Anyway, I added deploy_tools\python_bin to the PATH. Then it seems compiles and links correctly.

But a new strange problem comes after chrome.exe (about 4.18MB) was generated: chrome.exe can not be run anyway (no matter I double-click the exe or attempt to launch it from command prompt). And the situation is: nothing happened, no window shows, no dialog, no error messages. I went to check Windows Event Log but there is no application crash event when I attempt to run chrome.exe.

So currently, is there anything I can do to look inside the problem?

Some other information might help:

OS: Windows 7 64-bit
Target platform for building Chromium: x86
Build target: Debug
Source code version: Release 21.0.1180.79
Size of chrome.dll: about 206MB
Changed source code: Mostly follow Sumel's "findings for  Windows 8 SDK building" (https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-dev/ZteDXYbKItE)

I appreciate your suggestions.

Alex Pakhunov

unread,
Aug 24, 2012, 11:22:45 AM8/24/12
to toc...@gmail.com, chromi...@chromium.org
But a new strange problem comes after chrome.exe (about 4.18MB) was generated: chrome.exe can not be run anyway (no matter I double-click the exe or attempt to launch it from command prompt). And the situation is: nothing happened, no window shows, no dialog, no error messages. I went to check Windows Event Log but there is no application crash event when I attempt to run chrome.exe. 

Try running it under windbg.exe and issue ".childdbg 1" command after the first debug break to debug child processes. Then see if there any suspicious exceptions.

Enable logging ("--enable-logging=1 --v=3"  in the command line) to see if it is complaining about something. 

Alex.


--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

Ethreys

unread,
Aug 25, 2012, 1:54:03 PM8/25/12
to chromi...@chromium.org, toc...@gmail.com
Hi Alex,

Thanks for your kindly help. The debug.log seems giving some useful info, I found there are two issues logged:

[0824/192124:ERROR:client_util.cc(384)] Could not get Chrome DLL version.
[0824/192124:ERROR:client_util.cc(442)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded

During the search I found there are Issue 47211 and Issue 133883 reported the same error message relate to "RelaunchChromeBrowserWithNewCommandLineIfNeeded".

Issue 47211 says they resolved this issue by using Comment #16, but I am not sure what is it. And due to Issue 47211 was opened in 2010, I also not sure the same trick could be played for 21.0.1180.79.

In Issue 133883 the author solved the issue via changing install folder. However I do not have any Google Chrome installed on the computer. And, the chrome.dll and chrome.exe are in the same folder in my computer.

Could you please advise how I can deal with it? At the same time, WinDBG seems helpless about the current issue (sorry I am nearly green-hand to it):

Executable search path is:
ModLoad: 00000000`00400000 00000000`0083b000   chrome.exe
ModLoad: 00000000`773c0000 00000000`77569000   ntdll.dll
ModLoad: 00000000`775a0000 00000000`77720000   ntdll32.dll
ModLoad: 00000000`74c20000 00000000`74c5f000   C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`74bc0000 00000000`74c1c000   C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`74bb0000 00000000`74bb8000   C:\Windows\SYSTEM32\wow64cpu.dll
(18ac.153c): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00000000`7746cb60 cc              int     3
0:000> .childdbg 1
Processes created by the current process will be debugged
0:000> g
ModLoad: 00000000`76de0000 00000000`76eff000   WOW64_IMAGE_SECTION
ModLoad: 00000000`76580000 00000000`76690000   WOW64_IMAGE_SECTION
ModLoad: 00000000`76de0000 00000000`76eff000   NOT_AN_IMAGE
ModLoad: 00000000`76ce0000 00000000`76dda000   NOT_AN_IMAGE
ModLoad: 00000000`76580000 00000000`76690000   C:\Windows\syswow64\kernel32.dll
ModLoad: 00000000`76c60000 00000000`76ca6000   C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 00000000`72680000 00000000`726b2000   C:\Windows\SysWOW64\WINMM.dll
ModLoad: 00000000`75460000 00000000`7550c000   C:\Windows\syswow64\msvcrt.dll
ModLoad: 00000000`755e0000 00000000`756e0000   C:\Windows\syswow64\USER32.dll
ModLoad: 00000000`75750000 00000000`757e0000   C:\Windows\syswow64\GDI32.dll
ModLoad: 00000000`77570000 00000000`7757a000   C:\Windows\syswow64\LPK.dll
ModLoad: 00000000`74e60000 00000000`74efd000   C:\Windows\syswow64\USP10.dll
ModLoad: 00000000`75510000 00000000`755b0000   C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 00000000`74f00000 00000000`74f19000   C:\Windows\SysWOW64\sechost.dll
ModLoad: 00000000`76720000 00000000`76810000   C:\Windows\syswow64\RPCRT4.dll
ModLoad: 00000000`74c80000 00000000`74ce0000   C:\Windows\syswow64\SspiCli.dll
ModLoad: 00000000`74c70000 00000000`74c7c000   C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 00000000`74ba0000 00000000`74ba9000   C:\Windows\SysWOW64\VERSION.dll
ModLoad: 00000000`756e0000 00000000`756e5000   C:\Windows\syswow64\PSAPI.DLL
ModLoad: 00000000`756f0000 00000000`75747000   C:\Windows\syswow64\SHLWAPI.dll
ModLoad: 00000000`72b20000 00000000`72b37000   C:\Windows\SysWOW64\USERENV.dll
ModLoad: 00000000`72b10000 00000000`72b1b000   C:\Windows\SysWOW64\profapi.dll
ModLoad: 00000000`72070000 00000000`7207d000   C:\Windows\SysWOW64\WTSAPI32.dll
(18ac.153c): WOW64 breakpoint - code 4000001f (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll32!LdrpDoDebuggerBreak+0x2c:
77640fab cc              int     3 
0:000:x86> kb
ChildEBP RetAddr  Args to Child             
0018fb34 77621383 7efdd000 7efde000 776a206c ntdll32!LdrpDoDebuggerBreak+0x2c
0018fcb0 775e52d6 0018fd24 775a0000 6b28574e ntdll32!LdrpInitializeProcess+0x12cc
0018fd00 775d9e79 0018fd24 775a0000 00000000 ntdll32!_LdrpInitialize+0x78
0018fd10 00000000 0018fd24 775a0000 00000000 ntdll32!LdrInitializeThunk+0x10
0:000:x86> g
ModLoad: 76810000 76870000   C:\Windows\SysWOW64\IMM32.DLL
ModLoad: 75040000 7510c000   C:\Windows\syswow64\MSCTF.dll
ModLoad: 75860000 764aa000   C:\Windows\syswow64\SHELL32.dll
ModLoad: 75110000 7526c000   C:\Windows\syswow64\ole32.dll
ntdll!ZwTerminateProcess+0xa:
00000000`774115da c3              ret
0:000> kb
RetAddr           : Args to Child                                                           : Call Site
00000000`74c3601a : 00000000`00000000 00000000`689493b4 00000000`0008e300 00000000`74c301cc : ntdll!ZwTerminateProcess+0xa
00000000`74c2cf87 : 00000000`0018fe54 00000000`0018f5c8 00000000`7efdb000 00000000`0018f74c : wow64!whNtTerminateProcess+0x46
00000000`74bb2776 : 00000000`775b01b4 00000000`74c20023 00000000`00000246 00000000`0018fff0 : wow64!Wow64SystemServiceEx+0xd7
00000000`74c2d07e : 00000000`00000000 00000000`74bb1920 00000000`0008eea0 00000000`773eecd1 : wow64cpu!ServiceNoTurbo+0x2d
00000000`74c2c549 : 00000000`00000000 00000000`00000000 00000000`74c24ac8 00000000`7ffe0030 : wow64!RunCpuSimulation+0xa
00000000`77404956 : 00000000`001e3600 00000000`00000000 00000000`774f2670 00000000`774c5978 : wow64!Wow64LdrpInitialize+0x429
00000000`77401a17 : 00000000`00000000 00000000`77404061 00000000`0008f820 00000000`00000000 : ntdll!LdrpInitializeProcess+0x17e4
00000000`773ec32e : 00000000`0008f820 00000000`00000000 00000000`7efdf000 00000000`00000000 : ntdll! ?? ::FNODOBFM::`string'+0x29220
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!LdrInitializeThunk+0xe
 

Greg Thompson

unread,
Aug 25, 2012, 4:29:26 PM8/25/12
to toc...@gmail.com, chromi...@chromium.org

Was chrome.dll built (I think the name of the target is chrome_dll_main or chrome_main_dll or somesuch)?

Ethreys

unread,
Aug 25, 2012, 10:35:07 PM8/25/12
to chromi...@chromium.org, toc...@gmail.com
Hi Greg,

Yes,the chrome.dll was built at 206MB, and also generated it's symbol file as several hundreds MB.

Greg Thompson

unread,
Aug 26, 2012, 8:55:22 AM8/26/12
to toc...@gmail.com, chromi...@chromium.org
Your best bet is to load chrome.exe into windbg, set a breakpoint on MainDllLoader::Load, and see why the very first call to LoadChromeWithDirectory is failing.

Ethreys

unread,
Aug 27, 2012, 12:42:07 PM8/27/12
to chromi...@chromium.org, toc...@gmail.com
Hi Greg,

Sorry I've made a mistake, I double-check the folder that I copy and run chromium in, there is no chrome.dll. I guess I didn't include chrome.dll when copying compiled files to this folder since the build output folder (src\out\Debug) has the chrome.dll. Anyway, after copying chrome.dll, I get chromium to work,

But there are still some minor (I guess) error, after I start chrome.exe without any further operation, it reports a warning and an error in chrome_debug.log:

[4216:5048:572551640:WARNING:management_policy.cc(59)] Modification of extension ahfgeienlihckogmohjhadlkjgocpleb prohibited by admin policy black/white/forcelist, via the ExtensionPrefs
[4216:5048:572576709:ERROR:window_impl.cc(55)] Failed to unregister class Chrome_WidgetWin_0. Error = 1412

 I tried to search for these messages but none seemed helpful. Can these two errors be safely ignored, or should be treated seriously? What I can do to help understand/solve these two errors?

Thanks.

Alex Pakhunov

unread,
Aug 27, 2012, 12:46:39 PM8/27/12
to toc...@gmail.com, chromi...@chromium.org
Hi,

I believe you can safely ignore "Failed to unregister class Chrome_WidgetWin_0. Error = 1412". Window class (un)registration code is buggy and has to be fixed but this message is harmless.
Reply all
Reply to author
Forward
0 new messages