LNK4217 errors in media.service.exe, media_mojo_unittests, media_unittests link steps in Windows component builds: |
||||
Issue descriptionWindows component builds raise warning LNK4217 during the link step of the media_unittests and media_mojo_unittests targets: [1/3] LINK media.service.exe media.service.exe.pdb FAILED: media.service.exe media.service.exe.pdb C:/python_27_amd64/files/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./media.service.exe /PDB:./media.service.exe.pdb @./media.service.exe.rsp LINK : ./media.service.exe not found or not built by the last incremental link; performing full link main.obj : warning LNK4217: locally defined symbol ?CreateMediaServiceForTesting@media@@YA?AV?$unique_ptr@VService@service_manager@@U?$default_delete@VService@service_manager@@@std@@@std@@XZ (class std::unique_ptr<class service_manager::Service,struct std::default_delete<class service_manager::Service> > __cdecl media::CreateMediaServiceForTesting(void)) imported in function ServiceMain FAILED: media_mojo_unittests.exe media_mojo_unittests.exe.pdb C:/python_27_amd64/files/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./media_mojo_unittests.exe /PDB:./media_mojo_unittests.exe.pdb @./media_mojo_unittests.exe.rsp LINK : ./media_mojo_unittests.exe not found or not built by the last incremental link; performing full link mojo_audio_decoder_unittest.obj : warning LNK4217: locally defined symbol ??0MojoAudioDecoderService@media@@QEAA@V?$WeakPtr@VMojoCdmServiceContext@media@@@base@@V?$unique_ptr@VAudioDecoder@media@@U?$default_delete@VAudioDecoder@media@@@std@@@std@@@Z (public: __cdecl media::MojoAudioDecoderService::MojoAudioDecoderService(class base::WeakPtr<class media::MojoCdmServiceContext>,class std::unique_ptr<class media::AudioDecoder,struct std::default_delete<class media::AudioDecoder> >)) imported in function "class std::unique_ptr<class media::MojoAudioDecoderService,struct std::default_delete<class media::MojoAudioDecoderService> > __cdecl base::MakeUnique<class media::MojoAudioDecoderService,class base::WeakPtr<class media::MojoCdmServiceContext>,class std::unique_ptr<class testing::StrictMock<class media::MockAudioDecoder>,struct std::default_delete<class testing::StrictMock<class media::MockAudioDecoder> > > >(class base::WeakPtr<class media::MojoCdmServiceContext> &&,class std::unique_ptr<class testing::StrictMock<class media::MockAudioDecoder>,struct std::default_delete<class testing::StrictMock<class media::MockAudioDecoder> > > &&)" (??$MakeUnique@VMojoAudioDecoderService@media@@V?$WeakPtr@VMojoCdmServiceContext@media@@@base@@V?$unique_ptr@V?$StrictMock@VMockAudioDecoder@media@@@testing@@U?$default_delete@V?$StrictMock@VMockAudioDecoder@media@@@testing@@@std@@@std@@@base@@YA?AV?$unique_ptr@VMojoAudioDecoderService@media@@U?$default_delete@VMojoAudioDecoderService@media@@@std@@@std@@$$QEAV?$WeakPtr@VMojoCdmServiceContext@media@@@0@$$QEAV?$unique_ptr@V?$StrictMock@VMockAudioDecoder@media@@@testing@@U?$default_delete@V?$StrictMock@VMockAudioDecoder@media@@@testing@@@std@@@2@@Z) FAILED: media_unittests.exe media_unittests.exe.pdb C:/python_27_amd64/files/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./media_unittests.exe /PDB:./media_unittests.exe.pdb @./media_unittests.exe.rsp LINK : ./media_unittests.exe not found or not built by the last incremental link; performing full link mojo_audio_decoder_unittest.obj : warning LNK4217: locally defined symbol ??0MojoAudioDecoderService@media@@QEAA@V?$WeakPtr@VMojoCdmServiceContext@media@@@base@@V?$unique_ptr@VAudioDecoder@media@@U?$default_delete@VAudioDecoder@media@@@std@@@std@@@Z (public: __cdecl media::MojoAudioDecoderService::MojoAudioDecoderService(class base::WeakPtr<class media::MojoCdmServiceContext>,class std::unique_ptr<class media::AudioDecoder,struct std::default_delete<class media::AudioDecoder> >)) imported in function "class std::unique_ptr<class media::MojoAudioDecoderService,struct std::default_delete<class media::MojoAudioDecoderService> > __cdecl base::MakeUnique<class media::MojoAudioDecoderService,class base::WeakPtr<class media::MojoCdmServiceContext>,class std::unique_ptr<class testing::StrictMock<class media::MockAudioDecoder>,struct std::default_delete<class testing::StrictMock<class media::MockAudioDecoder> > > >(class base::WeakPtr<class media::MojoCdmServiceContext> &&,class std::unique_ptr<class testing::StrictMock<class media::MockAudioDecoder>,struct std::default_delete<class testing::StrictMock<class media::MockAudioDecoder> > > &&)" (??$MakeUnique@VMojoAudioDecoderService@media@@V?$WeakPtr@VMojoCdmServiceContext@media@@@base@@V?$unique_ptr@V?$StrictMock@VMockAudioDecoder@media@@@testing@@U?$default_delete@V?$StrictMock@VMockAudioDecoder@media@@@testing@@@std@@@std@@@base@@YA?AV?$unique_ptr@VMojoAudioDecoderService@media@@U?$default_delete@VMojoAudioDecoderService@media@@@std@@@std@@$$QEAV?$WeakPtr@VMojoCdmServiceContext@media@@@0@$$QEAV?$unique_ptr@V?$StrictMock@VMockAudioDecoder@media@@@testing@@U?$default_delete@V?$StrictMock@VMockAudioDecoder@media@@@testing@@@std@@@2@@Z)
,
Jan 3 2017
,
Jan 3 2017
FYI: To see the warnings: 1. Add fatal_linker_warnings=false to your GN args. 2. Delete the target you're interested in, or gn clean your output directory. 3. Build the target.
,
Jan 3 2017
Scratch step #1: You'll need to explicitly remove the suppressions from the BUILD.gn for media, and then follow steps #2 and #3 to have the build warn & fail.
,
Jan 3 2017
Thanks I'll take a look. I just updated my Windows bot. I'll try the repro steps once I got chromium building on Windows.
,
Jan 7 2017
It's taking longer than expected for me to get my Windows machine ready and I am fully occupied by other tasks. Assigning to jrummell@ (who has Windows machine handy) for load balancing.
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e462aab03239f5ddfcec2adc598e5d775fb70e2 commit 6e462aab03239f5ddfcec2adc598e5d775fb70e2 Author: jrummell <jrummell@chromium.org> Date: Thu Jul 13 20:49:47 2017 Fix media_mojo builds Previously media/mojo/sevices:lib was done as a source_set due to issue 670094. Now that that issue is fixed, the intermediate "lib" target is no longer needed. Removing the suppression of duplicate symbols revealed that some of the CdmPromiseTemplate methods end up in multiple modules when doing a component build. So fix CdmPromiseTemplate<>::GetResolveParameterType() implementation to avoid this. This also enables //media/mojo/services/media_service_unittests on Windows (which was disabled due to linking issues that are now fixed). BUG= 676418 , 676055 , 656706 TEST=media_mojo tests compile and run Review-Url: https://codereview.chromium.org/2737513004 Cr-Commit-Position: refs/heads/master@{#486472} [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/BUILD.gn [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/base/cdm_callback_promise.h [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/base/cdm_promise.cc [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/base/cdm_promise.h [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/cdm/BUILD.gn [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/mojo/BUILD.gn [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/mojo/services/BUILD.gn [modify] https://crrev.com/6e462aab03239f5ddfcec2adc598e5d775fb70e2/media/remoting/proto_utils.h
,
Aug 25 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Dec 23 2016