0

在我从 chromium 站点添加“Hello world”示例后,我尝试编译 chromium 代码:

https://www.chromium.org/developers/webui

我得到这个错误:

**../../../chrome/browser/ui/webui/hello_world_ui.cc:21:16:错误:'content::WebUIDataSource' html_source->SetJsonPath("strings. js");

1 error generated.
ninja: build stopped: subcommand failed.**




i open the "web_ui_data_source.h" file and the function 'SetJsonPath()' wasn't there .

please help me , what do i need do?
4

1 回答 1

0

错误 :

1866:1866:1102/183517.446003:INFO:content_main_runner_impl.cc(975)] Chrome is running in full browser mode.
[1866:1866:1102/183530.518294:WARNING:account_consistency_mode_manager.cc(63)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[1934:1934:1102/183533.119812:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[1934:1976:1102/183533.118386:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[1986:1:1102/183536.410055:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[2005:1:1102/183552.441983:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[2004:1:1102/183552.441389:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[2044:1:1102/183616.706233:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[2057:1:1102/183619.207918:INFO:sandbox_bpf.cc(302)] Indirect branch speculation can not be controled by prctl.2
[1866:1866:1102/183632.431375:FATAL:shared_resources_data_source.cc(326)] Check failed: -1 != idr (-1 vs. -1) path: js/i18n_template.js
#0 0x7f60d5f507ef base::debug::CollectStackTrace()
#1 0x7f60d5cd44dd base::debug::StackTrace::StackTrace()
#2 0x7f60d5cd4498 base::debug::StackTrace::StackTrace()
#3 0x7f60d5d179dd logging::LogMessage::~LogMessage()
#4 0x7f60d5d1816c logging::LogMessage::~LogMessage()
#5 0x7f60d5c9330e logging::CheckError::~CheckError()
#6 0x7f60ce5ec7ea content::SharedResourcesDataSource::StartDataRequest()
#7 0x7f60ce60a96a content::(anonymous namespace)::StartURLLoader()
#8 0x7f60ce60a256 content::(anonymous namespace)::WebUIURLLoaderFactory::CreateLoaderAndStart()
#9 0x7f60cc015cbe network::mojom::URLLoaderFactoryStubDispatch::Accept()
#10 0x7f60cbc72be5 network::mojom::URLLoaderFactoryStub<>::Accept()
#11 0x7f60d4e5f169 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#12 0x7f60d4e5ea41 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept()
#13 0x7f60d4e6c9a5 mojo::MessageDispatcher::Accept()
#14 0x7f60d4e6097d mojo::InterfaceEndpointClient::HandleIncomingMessage()
#15 0x7f60d4e73d87 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#16 0x7f60d4e73400 mojo::internal::MultiplexRouter::Accept()
#17 0x7f60d4e6c91f mojo::MessageDispatcher::Accept()
#18 0x7f60d4e4806a mojo::Connector::DispatchMessage()
#19 0x7f60d4e48be8 mojo::Connector::ReadAllAvailableMessages()
#20 0x7f60d4e49103 mojo::Connector::CallDispatchNextMessageFromPipe()
#21 0x7f60d4e50ed5 base::internal::FunctorTraits<>::Invoke<>()
#22 0x7f60d4e50e17 base::internal::InvokeHelper<>::MakeItSo<>()
#23 0x7f60d4e50d82 _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo9ConnectorEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE
#24 0x7f60d4e50d37 base::internal::Invoker<>::RunOnce()
#25 0x7f60d5c89897 _ZNO4base12OnceCallbackIFvvEE3RunEv
#26 0x7f60d5e503ef base::TaskAnnotator::RunTask()
#27 0x7f60d5e98476 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#28 0x7f60d5e97d2a base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#29 0x7f60d5e987fc base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#30 0x7f60d5d3d565 base::MessagePumpGlib::Run()
#31 0x7f60d5e98efa base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#32 0x7f60d5de046c base::RunLoop::Run()
#33 0x5625a40d2dce ChromeBrowserMainParts::MainMessageLoopRun()
#34 0x7f60cd158024 content::BrowserMainLoop::RunMainMessageLoopParts()
#35 0x7f60cd167766 content::BrowserMainRunnerImpl::Run()
#36 0x7f60cd153725 content::BrowserMain()
#37 0x7f60cf453c84 content::RunBrowserProcessMain()
#38 0x7f60cf455311 content::ContentMainRunnerImpl::RunServiceManager()
#39 0x7f60cf454bc6 content::ContentMainRunnerImpl::Run()
#40 0x7f60cf451157 content::RunContentProcess()
#41 0x7f60cf451b60 content::ContentMain()
#42 0x5625a1484f0d ChromeMain
#43 0x5625a1484da2 main
#44 0x7f609e7c0b97 __libc_start_main
#45 0x5625a1484c9a _start
Task trace:
#0 0x7f60d4e49005 mojo::Connector::PostDispatchNextMessageFromPipe()
#1 0x7f60d618ac14 mojo::SimpleWatcher::Context::Notify()

Received signal 6
#0 0x7f60d5f507ef base::debug::CollectStackTrace()
#1 0x7f60d5cd44dd base::debug::StackTrace::StackTrace()
#2 0x7f60d5cd4498 base::debug::StackTrace::StackTrace()
#3 0x7f60d5f502a8 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#4 0x7f60a08f08a0 (/lib/x86_64-linux-gnu/libpthread-2.27.so+0x1289f)
#5 0x7f609e7ddf47 gsignal
#6 0x7f609e7df8b1 abort
#7 0x7f60d5f4f816 base::debug::(anonymous namespace)::DebugBreak()
#8 0x7f60d5f4f7f8 base::debug::BreakDebugger()
#9 0x7f60d5d18026 logging::LogMessage::~LogMessage()
#10 0x7f60d5d1816c logging::LogMessage::~LogMessage()
#11 0x7f60d5c9330e logging::CheckError::~CheckError()
#12 0x7f60ce5ec7ea content::SharedResourcesDataSource::StartDataRequest()
#13 0x7f60ce60a96a content::(anonymous namespace)::StartURLLoader()
#14 0x7f60ce60a256 content::(anonymous namespace)::WebUIURLLoaderFactory::CreateLoaderAndStart()
#15 0x7f60cc015cbe network::mojom::URLLoaderFactoryStubDispatch::Accept()
#16 0x7f60cbc72be5 network::mojom::URLLoaderFactoryStub<>::Accept()
#17 0x7f60d4e5f169 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#18 0x7f60d4e5ea41 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept()
#19 0x7f60d4e6c9a5 mojo::MessageDispatcher::Accept()
#20 0x7f60d4e6097d mojo::InterfaceEndpointClient::HandleIncomingMessage()
#21 0x7f60d4e73d87 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#22 0x7f60d4e73400 mojo::internal::MultiplexRouter::Accept()
#23 0x7f60d4e6c91f mojo::MessageDispatcher::Accept()
#24 0x7f60d4e4806a mojo::Connector::DispatchMessage()
#25 0x7f60d4e48be8 mojo::Connector::ReadAllAvailableMessages()
#26 0x7f60d4e49103 mojo::Connector::CallDispatchNextMessageFromPipe()
#27 0x7f60d4e50ed5 base::internal::FunctorTraits<>::Invoke<>()
#28 0x7f60d4e50e17 base::internal::InvokeHelper<>::MakeItSo<>()
#29 0x7f60d4e50d82 _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo9ConnectorEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE
#30 0x7f60d4e50d37 base::internal::Invoker<>::RunOnce()
#31 0x7f60d5c89897 _ZNO4base12OnceCallbackIFvvEE3RunEv
#32 0x7f60d5e503ef base::TaskAnnotator::RunTask()
#33 0x7f60d5e98476 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#34 0x7f60d5e97d2a base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#35 0x7f60d5e987fc base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#36 0x7f60d5d3d565 base::MessagePumpGlib::Run()
#37 0x7f60d5e98efa base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#38 0x7f60d5de046c base::RunLoop::Run()
#39 0x5625a40d2dce ChromeBrowserMainParts::MainMessageLoopRun()
#40 0x7f60cd158024 content::BrowserMainLoop::RunMainMessageLoopParts()
#41 0x7f60cd167766 content::BrowserMainRunnerImpl::Run()
#42 0x7f60cd153725 content::BrowserMain()
#43 0x7f60cf453c84 content::RunBrowserProcessMain()
#44 0x7f60cf455311 content::ContentMainRunnerImpl::RunServiceManager()
#45 0x7f60cf454bc6 content::ContentMainRunnerImpl::Run()
#46 0x7f60cf451157 content::RunContentProcess()
#47 0x7f60cf451b60 content::ContentMain()
#48 0x5625a1484f0d ChromeMain
#49 0x5625a1484da2 main
#50 0x7f609e7c0b97 __libc_start_main
#51 0x5625a1484c9a _start
  r8: 0000000000000000  r9: 00007fff7f728650 r10: 0000000000000008 r11: 0000000000000246
 r12: 00005625a1484c70 r13: 00007fff7f72d0d0 r14: 0000000000000000 r15: 0000000000000000
  di: 0000000000000002  si: 00007fff7f728650  bp: 00007fff7f7288a0  bx: 0000000000000000
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f609e7ddf47  sp: 00007fff7f728650
  ip: 00007f609e7ddf47 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
于 2020-11-02T17:07:13.800 回答