How to avoid (or disable) C2220 (warning treated as error - no 'object' file generated) when building chromium 39.0.2171.65 on windows 7?

2,510 views
Skip to first unread message

Hubert

unread,
Dec 3, 2014, 7:17:52 AM12/3/14
to chromi...@chromium.org
Hi,

I got error when fetch and build chromium on windows 7. Could you give some help, thanks a log in advance!


Error when execute "gclient runhooks --force"

________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s src/buildtools/win/gn.exe.sha1' in 'D:\Chromium\39.0.2171.65_follow'
D:\Chromium\depot_tools\third_party\boto\pyami\config.py:75: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
  warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
Failure: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.


Comment out the "download_from_google_storage " in src\.DEPS.git, run "ninja -C src/out/Release_x64 chrome", following error is got:

320/16558] CXX obj\device\hid\device_hid.hid_service.obj
FAILED: ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\device\hid\device_hid.hid_service.obj.rsp /c ..\..\device\hid\hid_service.cc /Foobj\device\hid\device_hid.hid_service.obj /Fdobj\device\hid\device_hid.cc.pdb
c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree(1826) : error C2220: warning treated as error - no 'object' file generated
c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree(1826) : warning C4702: unreachable code
[320/16558] CXX obj\components\crash\a...crash_component_lib.crash_keys_win.obj
FAILED: ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\components\
crash\app\crash_component_lib.crash_keys_win.obj.rsp /c ..\..\components\crash\app\crash_keys_win.cc /Foobj\components\crash\app\crash_component_lib.crash_keys_
win.obj /Fdobj\components\crash_component_lib.cc.pdb
c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree(1826) : error C2220: warning treated as error - no 'object' file generated
c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree(1826) : warning C4702: unreachable code
[320/16558] ACTION generate_about_trac...acing_fe08b7c8430f9c5573f675b3f9a094d4
ninja: build stopped: subcommand failed.


Thanks

 
PS: Whole script to set up the enviroment:

1. set environment

2. loading releae
fetch chromium rem wait for 8 hours to download the source code. Download WebKit takes very long time.
3. switch branch
git checkout -b your_release_branch 39.0.2171.65  # or more explicitly, tags/34.0.1847.9   http://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches
gclient sync --with_branch_heads --jobs 16
gclient runhooks --force rem to generate chrome.sln
4. build 
setx GYP_GENERATORS msvs-ninja,ninja /M  rem http://blog.csdn.net/Kuerjinjin/article/details/23563059
python src\build\gyp_chromium -Dcomponent=shared_library -Goutput_dir=out -Dtarget_arch=x64 
ninja -C src/out/Release_x64 chrome  


Scott Graham

unread,
Dec 3, 2014, 12:27:30 PM12/3/14
to tcchromiu...@gmail.com, chromium-dev
Old branches require patching "c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree" to disable warning 4702 (there's another #pragma warning disable near the top of the file).

This is no longer required at head.

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

Hubert

unread,
Dec 3, 2014, 9:41:20 PM12/3/14
to chromi...@chromium.org, tcchromiu...@gmail.com
Thank you very much Scott Graham.

Could share me the solution of running "download_from_google_storage" failed?

Scott Graham

unread,
Dec 3, 2014, 10:23:39 PM12/3/14
to tcchromiu...@gmail.com, chromium-dev
On Wed, Dec 3, 2014 at 6:41 PM, Hubert <tcchromiu...@gmail.com> wrote:
Thank you very much Scott Graham.

Could share me the solution of running "download_from_google_storage" failed?

I'm not sure what that is, I'd guess a proxy or something causing problems. If it's only gn.exe.sha1 that's failing it shouldn't be a problem as that's not yet used in the main build.

Hubert

unread,
Dec 4, 2014, 9:04:40 PM12/4/14
to chromi...@chromium.org, tcchromiu...@gmail.com
Hi Scott Graham,

Thanks a lot for your help!


I am confused, if it is a proxy issue, then other files should also cannot be downloaded, but not only download_from_google_storage.

Another issue is that, when I build master branch. Could you give some help?

C:\Chromium\trunk>python src\build\gyp_chromium -Dcomponent=shared_library -Goutput_dir=out -Dtarget_arch=x64
Enabled Psyco JIT.
Updating projects from gyp files...
Warning: Missing input files:
C:\Chromium\trunk\src\mojo\edk\js\tests\js_to_cpp_tests
C:\Chromium\trunk\src\ui\base\page_transition_types_list.h
C:\Chromium\trunk\src\net\android\cert_verify_status_android_list.h
C:\Chromium\trunk\src\extensions\renderer\resources\extensions\web_view_events.js
C:\Chromium\trunk\src\chrome\browser\searuch\most_visited_iframe_source.h
C:\Chromium\trunk\src\content\public\common\result_codes_list.h
C:\Chromium\trunk\src\content\browser\android\popup_item_type_list.h
C:\Chromium\trunk\src\chrome\renderer\resources\extensions\app_view.js
C:\Chromium\trunk\src\content\browser\android\gesture_event_type_list.h
C:\Chromium\trunk\src\chrome\browser\profiles\profile_metrics_list.h
C:\Chromium\trunk\src\third_party\WebKit\Source\core\rendering\RenderSelectionInfo.h
C:\Chromium\trunk\src\extensions\renderer\resources\extensions\web_view_experimental.js
C:\Chromium\trunk\src\chrome\browser\sessions\base_session_service_delegate.h
C:\Chromium\trunk\src\chrome\browser\android\activity_type_id_list.h
C:\Chromium\trunk\src\chrome\browser\ui\toolbar\toolbar_model_security_level_list.h
C:\Chromium\trunk\src\components\constranied_window\constrained_window_views.h
C:\Chromium\trunk\src\content\browser\renderer_host\input\selection_event_type_list.h
C:\Chromium\trunk\src\chrome\browser\android\tab_load_status.h
C:\Chromium\trunk\src\chrome\browser\sync\profile_sync_service_model_type_selection_android.h
C:\Chromium\trunk\src\third_party\WebKit\Source\core\testing\PartialPrivateScriptTest.h
C:\Chromium\trunk\src\skia\..\third_party\skia\include\ports\SkFontStyle.h
C:\Chromium\trunk\src\extensions\renderer\resources\extensions\web_view.js
C:\Chromium\trunk\src\components\constranied_window\constrained_window_views_client.h
C:\Chromium\trunk\src\net\cert\scoped_openssl_types.h
C:\Chromium\trunk\src\ash\system\chromeos\virtual_keyboard\tray_keyboard_lock_unittest.h
C:\Chromium\trunk\src\content\public\common\top_controls_state_list.h
C:\Chromium\trunk\src\third_party\WebKit\Source\platform\graphics\test\MockDiscardablePixelRef.h


Thanks

Scott Graham

unread,
Dec 4, 2014, 10:15:45 PM12/4/14
to tcchromiu...@gmail.com, chromium-dev
That's from the msvs or msvs-ninja generator and can be ignored. (Those are all incorrect and should be cleaned up, but they don't affect the build.)

Shezan Baig

unread,
Dec 5, 2014, 9:20:39 AM12/5/14
to tcchromiu...@gmail.com, Chromium-dev
On Thu, Dec 4, 2014 at 9:04 PM, Hubert <tcchromiu...@gmail.com> wrote:
I am confused, if it is a proxy issue, then other files should also cannot be downloaded, but not only download_from_google_storage.




download_from_google_storage accesses a different host than the source files, so your proxy is blocking access specifically to google storage, but not the git servers.

Reply all
Reply to author
Forward
0 new messages