Issue metadata
Sign in to add a comment
|
Linux: multiple definition of OriginDataView with GYP |
||||||||||||||||||||||
Issue descriptionVersion: Chromium master revision 68623971b (#403382) OS: Ubuntu 14.04 64-bit What steps will reproduce the problem? (1) Attempt to compile a Chromium-based application using GYP configuration. What is the expected output? The compilation should succeed. What do you see instead? Instead, it fails with linker errors like the following: ld.gold: error: obj/url/liburl_mojom_for_blink.a(obj/url/gen/url/mojo/url_mojom_for_blink.origin.mojom-blink.o): multiple definition of 'url::mojom::blink::OriginDataView::OriginDataView(url::mojom::blink::internal::Origin_Data*, mojo::internal::SerializationContext*)' ld.gold: obj/third_party/WebKit/Source/platform/libblink_platform.a(obj/third_party/WebKit/Source/platform/gen/url/mojo/blink_platform.origin.mojom-blink.o): previous definition here Please use labels and text to provide additional information. The problem appears to be that both the 'url_mojom_for_blink' and 'blink_platform' GYP targets include origin.mojom-blink.cc. The 'url_mojom_for_blink' target is only included from 'webmessaging_mojo_bindings_for_blink' which was added in http://crrev.com/e69cdae3 (6 days ago). The below patch resolves the linker error for me in limited testing on Linux. diff --git a/components/webmessaging.gypi b/components/webmessaging.gypi index 1ea14fb..8020b74 100644 --- a/components/webmessaging.gypi +++ b/components/webmessaging.gypi @@ -48,12 +48,6 @@ 'target_name': 'webmessaging_mojo_bindings_for_blink', 'type': 'static_library', 'sources': [ '<@(mojom_files)' ], - 'dependencies': [ - '../url/url.gyp:url_mojom_for_blink', - ], - 'export_dependent_settings': [ - '../url/url.gyp:url_mojom_for_blink', - ], 'variables': { 'for_blink': 'true', 'mojom_typemaps': [
,
Jul 8 2016
This seems to do the trick for us: https://codereview.chromium.org/2136523002/ I noticed that password_manager also depends on origin.mojom, and it only depends on the url.gyp:url_mojom target, which is why I added it to the webmessaging target as well.
,
Jul 13 2016
Not sure what configuration you're trying to build stuff in, but it must be something we don't have bot coverage for, and thus something that isn't supported (in general I don't believe we officially support building with GYP on linux anymore; switch to GN if you want things to be supported). I'm not against somebody else fixing this, but I'm not going to spend any effort on fixing something that isn't broken on any of the configurations we support.
,
Jul 13 2016
@comment#3: Seems reasonable. Thanks. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Jul 7 2016Components: -Blink Blink>Messaging
Owner: mek@chromium.org
Status: Assigned (was: Untriaged)