CEF 4389 Build Mac - ntp_background.pb.h' file not found

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF 4389 Build Mac - ntp_background.pb.h' file not found

Postby leeroy » Wed Mar 17, 2021 11:26 am

Running into an issue building MAC CEF 4389.

The build gets 90% of the way through and dies because of what appear to be a generated header file is missing.

Code: Select all
In file included from ../../chrome/browser/search/background/ntp_background_service.h:15:
../../chrome/browser/search/background/ntp_background_data.h:10:10: fatal error: 'chrome/browser/search/background/ntp_background.pb.h' file not found
#include "chrome/browser/search/background/ntp_background.pb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

...
--> CEF Branch: 4389
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
...
--> CEF Current Checkout: b5952bd58c1d06792c7aac97ab7f89f2271efaef
--> CEF Desired Checkout: b5952bd58c1d06792c7aac97ab7f89f2271efaef (origin/4389)
...
chrome_pgo_phase=0
clang_use_chrome_plugins=false
enable_background_mode=false
enable_basic_printing=true
enable_dsyms=true
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
ffmpeg_branding="Chrome"
forbid_non_component_debug_builds=false
is_component_build=false
is_debug=false
optimize_webui=true
proprietary_codecs=true
target_cpu="x64"


We previously built `cef_binary_89.0.6+g6f30454+chromium-89.0.4389.72` just fine.
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm

Re: CEF 4389 Build Mac - ntp_background.pb.h' file not found

Postby magreenblatt » Wed Mar 17, 2021 11:35 am

These types of errors occur due to missing GN dependencies in Chromium. You're building with `ffmpeg_branding="Chrome" proprietary_codecs=true` which is not officially supported. You'll need to figure out what target generates ntp_background.pb.h and add that target as a deps of the target that's including ntp_background_service.h (which you didn't include in your copy/pasted output).
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF 4389 Build Mac - ntp_background.pb.h' file not found

Postby leeroy » Wed Mar 17, 2021 11:48 am

Thanks @magreenblatt, we'll take a look and see if we can find more info on that particular target.

Also this is the rest of that error output:
Code: Select all
FAILED: obj/chrome/browser/safe_browsing/safe_browsing/settings_reset_prompt_model.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/safe_browsing/safe_browsing/settings_reset_prompt_model.o.d -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -DCR_XCODE_VERSION=1240 -DCR_CLANG_REVISION=\"llvmorg-12-init-16296-g5e476061-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DUSE_EGL -DON_FOCUS_PING_ENABLED -D_WTL_NO_AUTOMATIC_NAMESPACE -DTOOLKIT_VIEWS=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_USE_LIBGIFCODEC -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_MAC -DSK_METAL -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=0 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=1 -DHAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_NO_ARGUMENTS_ADAPTOR -DCPPGC_CAGED_HEAP -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libwebp/src -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -I../../third_party/khronos -I../../gpu -Igen/third_party/dawn/src/include -I../../third_party/dawn/src/include -I../../third_party/wtl/include -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/skia -I../../third_party/libgifcodec -I../../third_party/protobuf/src -Igen/net/third_party/quiche/src -I../../net/third_party/quiche/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -Igen -I../../third_party/mesa_headers -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/zlib -Igen -Igen/components/policy/proto -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../third_party/re2/src -Igen -Igen -Igen -Igen -I../../third_party/google_toolbox_for_mac -I../../third_party/google_toolbox_for_mac/src -I../../third_party/google_toolbox_for_mac/src/AppKit -I../../third_party/google_toolbox_for_mac/src/DebugUtils -I../../third_party/google_toolbox_for_mac/src/Foundation -Igen -I../../third_party/flatbuffers/src/include -Igen -Igen -fno-delete-null-pointer-checks -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -arch x86_64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-max-tokens -O2 -fno-omit-frame-pointer -fno-standalone-debug -g2 -isysroot ../../../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.11.0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -DPROTOBUF_ALLOW_DEPRECATED=1 -Wno-shorten-64-to-32 -std=c++14 -fno-trigraphs -Wno-trigraphs -stdlib=libc++ -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -Wno-deprecated-declarations -c ../../chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc -o obj/chrome/browser/safe_browsing/safe_browsing/settings_reset_prompt_model.o
In file included from ../../chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc:5:
In file included from ../../chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.h:19:
In file included from ../../chrome/browser/profile_resetter/profile_resetter.h:22:
In file included from ../../chrome/browser/search/instant_service.h:21:
In file included from ../../chrome/browser/search/background/ntp_background_service.h:15:
../../chrome/browser/search/background/ntp_background_data.h:10:10: fatal error: 'chrome/browser/search/background/ntp_background.pb.h' file not found
#include "chrome/browser/search/background/ntp_background.pb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[41003/46865] CXX obj/chrome/utility/utility/external_process_importer_bridge.o
[41004/46865] CXX obj/chrome/common/importer/interfaces/profile_import.mojom.o
[41005/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/certificate_reporting_metrics_provider.o
[41006/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/chrome_enterprise_url_lookup_service.o
[41007/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/binary_fcm_service.o
[41008/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/deep_scanning_utils.o
[41009/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/certificate_reporting_service.o
[41010/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/chrome_enterprise_url_lookup_service_factory.o
[41011/46865] CXX obj/chrome/browser/safe_browsing/safe_browsing/binary_upload_service.o
ninja: build stopped: subcommand failed.
--> Download Directory: /Volumes/external_disk/build_4389/code/chromium_git
--> Depot Tools Directory: /Volumes/external_disk/build_4389/code/depot_tools
--> Updating depot_tools
-------- Running "update_depot_tools" in "/Volumes/external_disk/build_4389/code/depot_tools"...
-------- Running "git config --get remote.origin.url" in "/Volumes/external_disk/build_4389/code/chromium_git/cef"...
--> CEF Branch: 4389
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /Volumes/external_disk/build_4389/code/chromium_git/cef
-------- Running "git rev-parse HEAD" in "/Volumes/external_disk/build_4389/code/chromium_git/cef"...
-------- Running "git fetch" in "/Volumes/external_disk/build_4389/code/chromium_git/cef"...
-------- Running "git rev-parse origin/4389" in "/Volumes/external_disk/build_4389/code/chromium_git/cef"...
--> CEF Current Checkout: b5952bd58c1d06792c7aac97ab7f89f2271efaef
--> CEF Desired Checkout: b5952bd58c1d06792c7aac97ab7f89f2271efaef (origin/4389)
--> Reading /Volumes/external_disk/build_4389/code/chromium_git/cef/CHROMIUM_BUILD_COMPATIBILITY.txt
-------- Running "git checkout 1f976d6f30" in "/Volumes/external_disk/build_4389/code/depot_tools"...
--> CEF Output Directory: /Volumes/external_disk/build_4389/code/chromium_git/out_4389
-------- Running "git config --get remote.origin.url" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "git fetch" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
-------- Running "git fetch --tags" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
-------- Running "git rev-parse HEAD" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
-------- Running "git rev-parse refs/tags/89.0.4389.72" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
--> Chromium Current Checkout: 261e7f0f96118540cd64d09405103097baf57467
--> Chromium Desired Checkout: 261e7f0f96118540cd64d09405103097baf57467 (refs/tags/89.0.4389.72)
--> DEPOT_TOOLS_UPDATE=0
--> GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome
--> GCLIENT_PY3=1
-------- Running "/Volumes/external_disk/build_4389/bin/python3 /Volumes/external_disk/build_4389/code/chromium_git/chromium/src/cef/tools/gclient_hook.py" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src/cef"...
--> /Volumes/external_disk/build_4389/code/chromium_git/chromium/src/out/Debug_GN_x64/args.gn contents:
chrome_pgo_phase=0
clang_use_chrome_plugins=false
enable_background_mode=false
enable_basic_printing=true
enable_dsyms=true
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
ffmpeg_branding="Chrome"
forbid_non_component_debug_builds=false
is_component_build=false
is_debug=true
optimize_webui=true
proprietary_codecs=true
target_cpu="x64"
-------- Running "ninja -C out/Debug_GN_x64 cefclient" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
--> /Volumes/external_disk/build_4389/code/chromium_git/chromium/src/out/Release_GN_x64/args.gn contents:
chrome_pgo_phase=0
clang_use_chrome_plugins=false
enable_background_mode=false
enable_basic_printing=true
enable_dsyms=true
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
ffmpeg_branding="Chrome"
forbid_non_component_debug_builds=false
is_component_build=false
is_debug=false
optimize_webui=true
proprietary_codecs=true
target_cpu="x64"
-------- Running "ninja -C out/Release_GN_x64 cefclient" in "/Volumes/external_disk/build_4389/code/chromium_git/chromium/src"...
Traceback (most recent call last):
  File "./automate/automate-git.py", line 1504, in <module>
    run(command + build_path + target, chromium_src_dir, depot_tools_dir,
  File "./automate/automate-git.py", line 69, in run
    return subprocess.check_call(
  File "/Volumes/external_disk/build_4389/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out/Release_GN_x64', 'cefclient']' returned non-zero exit status 1.
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm

Re: CEF 4389 Build Mac - ntp_background.pb.h' file not found

Postby leeroy » Sat Mar 20, 2021 10:10 pm

Using the following GN Targets seems to have remedied the issues for us:

Code: Select all
export GN_DEFINES="proprietary_codecs=true ffmpeg_branding=Chrome enable_vr=false is_official_build=true"
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm

Re: CEF 4389 Build Mac - ntp_background.pb.h' file not found

Postby magreenblatt » Mon Apr 05, 2021 10:53 am

Also fixed in this commit.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 37 guests