Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix building with enable_plugins = false #36193

Merged
merged 1 commit into from Oct 31, 2022

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Oct 29, 2022

Description of Change

electron_renderer_pepper_host_factory.h is referenced by pepper_helper.cc and needs to share the same buildflag.

#include "electron/shell/renderer/electron_renderer_pepper_host_factory.h"

host->GetPpapiHost()->AddHostFactoryFilter(
std::make_unique<ElectronRendererPepperHostFactory>(host));

Without the fix the build fails with:

lld-link: error: undefined symbol: public: __cdecl ppapi::host::ResourceHost::ResourceHost(class ppapi::host::PpapiHost *, int, int)

>>> referenced by .\..\..\electron\shell\renderer\electron_renderer_pepper_host_factory.cc:103
>>>               obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(public: virtual class std::Cr::unique_ptr<class ppapi::host::ResourceHost, struct std::Cr::default_delete<class ppapi::host::ResourceHost>> __cdecl ElectronRendererPepperHostFactory::CreateResourceHost(class ppapi::host::PpapiHost *, int, int, class IPC::Message const &))

lld-link: error: undefined symbol: public: virtual __cdecl ppapi::host::ResourceHost::~ResourceHost(void)
>>> referenced by .\..\..\electron\shell\renderer\electron_renderer_pepper_host_factory.cc:28
>>>               obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(public: virtual void * __cdecl PepperUMAHost::`scalar deleting dtor'(unsigned int))

lld-link: error: undefined symbol: public: static bool __cdecl IPC::MessageT<struct PpapiHostMsg_UMA_HistogramCustomCounts_Meta, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, int, int, int, unsigned int>, void>::Read(class IPC::Message const *, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, int, int, int, unsigned int> *)
>>> referenced by .\..\..\electron\shell\renderer\electron_renderer_pepper_host_factory.cc:37
>>>               obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(public: virtual int __cdecl PepperUMAHost::OnResourceMessageReceived(class IPC::Message const &, struct ppapi::host::HostMessageContext *))

lld-link: error: undefined symbol: public: static bool __cdecl IPC::MessageT<struct PpapiHostMsg_UMA_HistogramCustomTimes_Meta, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, __int64, __int64, __int64, unsigned int>, void>::Read(class IPC::Message const *, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, __int64, __int64, __int64, unsigned int> *)
>>> referenced by .\..\..\electron\shell\renderer\electron_renderer_pepper_host_factory.cc:35
>>>               obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(public: virtual int __cdecl PepperUMAHost::OnResourceMessageReceived(class IPC::Message const &, struct ppapi::host::HostMessageContext *))

lld-link: error: undefined symbol: public: static bool __cdecl IPC::MessageT<struct PpapiHostMsg_UMA_HistogramEnumeration_Meta, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, int, int>, void>::Read(class IPC::Message const *, class std::Cr::tuple<class std::Cr::basic_string<char, struct std::Cr::char_traits<char>, class std::Cr::allocator<char>>, int, int> *)
>>> referenced by .\..\..\electron\shell\renderer\electron_renderer_pepper_host_factory.cc:39
>>>               obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(public: virtual int __cdecl PepperUMAHost::OnResourceMessageReceived(class IPC::Message const &, struct ppapi::host::HostMessageContext *))

lld-link: error: undefined symbol: public: virtual bool __cdecl ppapi::host::ResourceHost::HandleMessage(class IPC::Message const &, struct ppapi::host::HostMessageContext *)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

lld-link: error: undefined symbol: public: virtual void __cdecl ppapi::host::ResourceHost::SendReply(struct ppapi::host::ReplyMessageContext const &, class IPC::Message const &)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

lld-link: error: undefined symbol: public: virtual bool __cdecl ppapi::host::ResourceHost::IsFileRefHost(void)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

lld-link: error: undefined symbol: public: virtual bool __cdecl ppapi::host::ResourceHost::IsFileSystemHost(void)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

lld-link: error: undefined symbol: public: virtual bool __cdecl ppapi::host::ResourceHost::IsGraphics2DHost(void)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

lld-link: error: undefined symbol: public: virtual bool __cdecl ppapi::host::ResourceHost::IsMediaStreamVideoTrackHost(void)
>>> referenced by obj/electron/electron_lib/electron_renderer_pepper_host_factory.obj:(const PepperUMAHost::`vftable')

ninja: build stopped: cannot make progress due to previous errors.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes

Release Notes

Notes: none

@miniak miniak self-assigned this Oct 29, 2022
@miniak miniak added target/21-x-y PR should also be added to the "21-x-y" branch. target/22-x-y PR should also be added to the "22-x-y" branch. labels Oct 29, 2022
@brjsp
Copy link
Contributor

brjsp commented Oct 29, 2022

I think this is the same issue issue i noticed in #36190.

What is the difference between enable_ppapi and enable_plugins, btw? (We have disabled both of these in openSUSE because none of the apps we ship depend on either Pepper or PDF support)

@nornagon nornagon merged commit 2f2c43e into main Oct 31, 2022
@nornagon nornagon deleted the miniak/build_fix_building_with_enable_plugins_false branch October 31, 2022 23:18
@release-clerk
Copy link

release-clerk bot commented Oct 31, 2022

No Release Notes

@trop
Copy link
Contributor

trop bot commented Oct 31, 2022

I was unable to backport this PR to "21-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/21-x-y and removed target/21-x-y PR should also be added to the "21-x-y" branch. labels Oct 31, 2022
@trop
Copy link
Contributor

trop bot commented Oct 31, 2022

I have automatically backported this PR to "22-x-y", please check out #36201

@trop trop bot added in-flight/22-x-y and removed target/22-x-y PR should also be added to the "22-x-y" branch. labels Oct 31, 2022
@miniak
Copy link
Contributor Author

miniak commented Nov 1, 2022

@brjsp there are now separate enable_ppapi and enable_plugins flags. It will require another follow-up PR to support them properly.

miniak pushed a commit that referenced this pull request Nov 1, 2022
Co-authored-by: Milan Burda <miburda@microsoft.com>
@trop
Copy link
Contributor

trop bot commented Nov 1, 2022

@miniak has manually backported this PR to "21-x-y", please check out #36202

jkleinsc pushed a commit that referenced this pull request Nov 1, 2022
build: fix building with enable_plugins = false (#36193)

Co-authored-by: Milan Burda <miburda@microsoft.com>

Co-authored-by: Milan Burda <miburda@microsoft.com>
@trop trop bot added merged/21-x-y PR was merged to the "21-x-y" branch. merged/22-x-y PR was merged to the "22-x-y" branch. and removed in-flight/21-x-y labels Nov 1, 2022
@miniak
Copy link
Contributor Author

miniak commented Nov 30, 2022

/trop run backport-to 20-x-y

@trop
Copy link
Contributor

trop bot commented Nov 30, 2022

The backport process for this PR has been manually initiated - sending your PR to 20-x-y!

@trop
Copy link
Contributor

trop bot commented Nov 30, 2022

I was unable to backport this PR to "20-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Nov 30, 2022

@miniak has manually backported this PR to "20-x-y", please check out #36494

jkleinsc pushed a commit that referenced this pull request Nov 30, 2022
build: fix building with enable_plugins = false (#36193)

Co-authored-by: Milan Burda <miburda@microsoft.com>
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
Co-authored-by: Milan Burda <miburda@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/21-x-y PR was merged to the "21-x-y" branch. merged/22-x-y PR was merged to the "22-x-y" branch. semver/none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants