New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 604034 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

Regression: views_unittests doesn't link with clang/cl in release component builds

Project Member Reported by thakis@chromium.org, Apr 15 2016

Issue description

Example: https://build.chromium.org/p/chromium.fyi/builders/CrWinAsan%28dll%29/builds/3911/steps/compile/logs/stdio

Since this happened on the non-clang bots too before the CL relanded, it feels more like a code bug than a compiler bug.


FAILED: C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x86 True views_unittests.exe "C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:views_unittests.exe @views_unittests.exe.rsp" 1 mt.exe rc.exe "obj\ui\views\views_unittests.views_unittests.exe.intermediate.manifest" obj\ui\views\views_unittests.views_unittests.exe.generated.manifest ..\..\ui\views\test\views_unittest.manifest ..\..\build\win\compatibility.manifest
views_unittests.view_targeter_unittest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ui::LatencyInfo & __thiscall ui::LatencyInfo::operator=(class ui::LatencyInfo const &)" (__imp_??4LatencyInfo@ui@@QAEAAV01@ABV01@@Z) referenced in function "private: virtual void __thiscall views::test::ViewTargeterTest_ViewTargeterForScrollEvents_Test::TestBody(void)" (?TestBody@ViewTargeterTest_ViewTargeterForScrollEvents_Test@test@views@@EAEXXZ)

views_unittests.widget_unittest.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class ui::LatencyInfo & __thiscall ui::LatencyInfo::operator=(class ui::LatencyInfo const &)" (__imp_??4LatencyInfo@ui@@QAEAAV01@ABV01@@Z)

views_unittests.exe : fatal error LNK1120: 1 unresolved externals



 

Comment 1 by thakis@chromium.org, Apr 15 2016

Cc: fsam...@chromium.org
Owner: h...@chromium.org
Status: Started (was: Assigned)
https://codereview.chromium.org/1889363002/
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dda990da6d103f23e814b2e37c9b9c7d1d9aab24

commit dda990da6d103f23e814b2e37c9b9c7d1d9aab24
Author: hans <hans@chromium.org>
Date: Fri Apr 15 23:47:59 2016

Fix views_unittests components build

For some reason the gn build works already.

BUG= 604034 

Review URL: https://codereview.chromium.org/1889363002

Cr-Commit-Position: refs/heads/master@{#387752}

[modify] https://crrev.com/dda990da6d103f23e814b2e37c9b9c7d1d9aab24/ui/views/views.gyp

Comment 3 by thakis@chromium.org, Apr 17 2016

The following tests are broken in the same way:

FAILED: E:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x64 True aura_unittests.exe "E:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x64 False link.exe /nologo /OUT:aura_unittests.exe @aura_unittests.exe.rsp" 1 mt.exe rc.exe "obj\ui\aura\aura_unittests.aura_unittests.exe.intermediate.manifest" obj\ui\aura\aura_unittests.aura_unittests.exe.generated.manifest ..\..\build\win\compatibility.manifest
aura_unittests.window_event_dispatcher_unittest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ui::LatencyInfo & __cdecl ui::LatencyInfo::operator=(class ui::LatencyInfo const &)" (__imp_??4LatencyInfo@ui@@QEAAAEAV01@AEBV01@@Z) referenced in function "private: virtual void __cdecl aura::WindowEventDispatcherTest_MouseMovesHeld_Test::TestBody(void)" (?TestBody@WindowEventDispatcherTest_MouseMovesHeld_Test@aura@@EEAAXXZ)




FAILED: C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x86 True app_list_unittests.exe "C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:app_list_unittests.exe @app_list_unittests.exe.rsp" 1 mt.exe rc.exe "obj\ui\app_list\app_list_unittests.app_list_unittests.exe.intermediate.manifest" obj\ui\app_list\app_list_unittests.app_list_unittests.exe.generated.manifest ..\..\build\win\compatibility.manifest
app_list_unittests.speech_view_unittest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ui::LatencyInfo & __thiscall ui::LatencyInfo::operator=(class ui::LatencyInfo const &)" (__imp_??4LatencyInfo@ui@@QAEAAV01@ABV01@@Z) referenced in function "private: virtual void __thiscall app_list::test::SpeechViewTest_ClickMicButton_Test::TestBody(void)" (?TestBody@SpeechViewTest_ClickMicButton_Test@test@app_list@@EAEXXZ)



...and possibly more. Not sure if these are broken in gn too -- maybe we don't have gn release component bots anywhere.

fsamuel, do you think it makes sense to revert your thing so you can do a local release component build? Or should we whack-a-mole?

Comment 4 by thakis@chromium.org, Apr 17 2016

FAILED: C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x64 True message_center_unittests.exe "C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x64 False ..\..\third_party/llvm-build/Release+Asserts/bin/lld-link /nologo /OUT:message_center_unittests.exe @message_center_unittests.exe.rsp" 1 mt.exe rc.exe "obj\ui\message_center\message_center_unittests.message_center_unittests.exe.intermediate.manifest" obj\ui\message_center\message_center_unittests.message_center_unittests.exe.generated.manifest ..\..\build\win\compatibility.manifest
obj\ui\message_center\views\message_center_unittests.notification_view_unittest.obj: undefined symbol: __imp_??4LatencyInfo@ui@@QEAAAEAV01@AEBV01@@Z

latency_info used to be built as part of events.gyp:events_base. A simple solution is to depend on latency_info wherever we depend on events_base. Is there an equivalent gyp concept to public_deps?

I'd prefer not having to deal with another revert unless absolutely necessary. :-(

Comment 7 by thakis@chromium.org, Apr 17 2016

I think you could add a 'direct_dependent_settings': { 'dependencies': 'latency_info' } block to events_base, which should have the same effect.

(Is it a public_dep in gn? I think it wasn't last I looked.)
Hmm, yea, it's not but it probably should be to achieve equivalent behavior. I'll write a quick CL with this change. Thanks!
Oddly enough I'm not seeing these issues when I build Linux gyp component clang locally. 
Potential fix: https://codereview.chromium.org/1893153002/? I haven't verified on Windows. Please let me know.
That's not odd, _EXPORT works fairly different on linux and windows (visibility attributes vs dllexport/dllimport) :-)

Please check on Windows if at all possible. (I don't have a windows box at hand.)

Comment 12 by h...@chromium.org, Apr 18 2016

I'm trying the patch from #10 locally now.

Comment 13 by h...@chromium.org, Apr 18 2016

Doesn't seem to work:

D:\src\chromium\src>git cl patch 1893153002
Committed patch locally.

D:\src\chromium\src>python  build\gyp_chromium
Updating projects from gyp files...

D:\src\chromium\src>ninja -C out/Release message_center_unittests app_list_unitt
ests aura_unittests
ninja: Entering directory `out/Release'
[5790/5792] LINK_EMBED message_center_unittests.exe
FAILED: C:\python_27_amd64\files\python.exe gyp-win-tool link-with-manifests env
ironment.x86 True message_center_unittests.exe "C:\python_27_amd64\files\python.
exe gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:messag
e_center_unittests.exe @message_center_unittests.exe.rsp" 1 mt.exe rc.exe "obj\u
i\message_center\message_center_unittests.message_center_unittests.exe.intermedi
ate.manifest" obj\ui\message_center\message_center_unittests.message_center_unit
tests.exe.generated.manifest ..\..\build\win\compatibility.manifest
message_center_unittests.notification_view_unittest.obj : error LNK2019: unresol
ved external symbol "__declspec(dllimport) public: class ui::LatencyInfo & __thi
scall ui::LatencyInfo::operator=(class ui::LatencyInfo const &)" (__imp_??4Laten
cyInfo@ui@@QAEAAV01@ABV01@@Z) referenced in function "private: virtual void __th
iscall message_center::NotificationViewTest_UpdateButtonsStateTest_Test::TestBod
y(void)" (?TestBody@NotificationViewTest_UpdateButtonsStateTest_Test@message_cen
ter@@EAEXXZ)
message_center_unittests.exe : fatal error LNK1120: 1 unresolved externals
Traceback (most recent call last):
  File "gyp-win-tool", line 323, in <module>
    sys.exit(main(sys.argv[1:]))
  File "gyp-win-tool", line 29, in main
    exit_code = executor.Dispatch(args)
  File "gyp-win-tool", line 71, in Dispatch
    return getattr(self, method)(*args[1:])
  File "gyp-win-tool", line 179, in ExecLinkWithManifests
    subprocess.check_call(ldcmd + add_to_ld)
  File "C:\python_27_amd64\files\lib\subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'C:\python_27_amd64\files\python.exe gyp-
win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:message_center
_unittests.exe @message_center_unittests.exe.rsp message_center_unittests.exe.ma
nifest.res' returned non-zero exit status 1120
[5790/5792] CXX obj\ui\aura\aura_unittests.window_unittest.obj
ninja: build stopped: subcommand failed.
Owner: thakis@chromium.org
Status: Fixed (was: Started)
"fixed" by reverting

Sign in to add a comment