Build Error - 4389 - fatal error: 'gtk/gtk.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.

Build Error - 4389 - fatal error: 'gtk/gtk.h' file not found

Postby leeroy » Thu Mar 04, 2021 3:47 pm

We have successfully built Windows and Macos CEF 4389, but running into this issue with Linux.

Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial

CEF: 4389

Using use_sysroot=true, I believe we run into an issue where the GTK is not available using sysroot (Error immediately below)? But without sysroot we die even faster (See second error). We're going to try and force gtk to see if that addresses this, but didn't run into this previously.
Initial Error:
Code: Select all
[46278/47231] CXX obj/cef/cefclient/util_gtk.o
FAILED: obj/cef/cefclient/util_gtk.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/cefclient/util_gtk.o.d -DCEF_USE_SANDBOX -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -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 -DCR_SYSROOT_HASH=22f2db7711f7426a364617bb6d78686cce09a8f9 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DWEBP_EXTERN=extern -DVK_USE_PLATFORM_XCB_KHR -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DTOOLKIT_VIEWS=1 -DON_FOCUS_PING_ENABLED -D_WTL_NO_AUTOMATIC_NAMESPACE -DEXPAT_RELATIVE_PATH -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/vulkan-deps/vulkan-headers/src/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../../cef -Iincludes -fno-delete-null-pointer-checks -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -msse3 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -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 -Wmax-tokens -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -Wno-deprecated-declarations -c ../../cef/tests/cefclient/browser/util_gtk.cc -o obj/cef/cefclient/util_gtk.o
../../cef/tests/cefclient/browser/util_gtk.cc:7:10: fatal error: 'gdk/gdk.h' file not found
#include <gdk/gdk.h>
         ^~~~~~~~~~~
1 error generated.


Ninja Output:
Code: Select all
ninja: build stopped: subcommand failed.
--> Download Directory: /home/ubuntu/code/chromium_git
--> Depot Tools Directory: /home/ubuntu/code/chromium_git/depot_tools
-------- Running "git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /home/ubuntu/code/chromium_git/depot_tools" in "/home/ubuntu/code/chromium_git"...
--> Updating depot_tools
-------- Running "update_depot_tools" in "/home/ubuntu/code/chromium_git/depot_tools"...
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Branch: 4389
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /home/ubuntu/code/chromium_git/cef
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git rev-parse origin/4389" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Current Checkout: c1f90d8c933dce163b74971707dbd79f00f18219
--> CEF Desired Checkout: c1f90d8c933dce163b74971707dbd79f00f18219 (origin/4389)
--> Reading /home/ubuntu/code/chromium_git/cef/CHROMIUM_BUILD_COMPATIBILITY.txt
-------- Running "git checkout 1f976d6f30" in "/home/ubuntu/code/chromium_git/depot_tools"...
--> CEF Output Directory: /home/ubuntu/code/chromium_git/out_4389
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git fetch --tags" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse refs/tags/89.0.4389.40" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium Current Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8
--> Chromium Desired Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8 (refs/tags/89.0.4389.40)
--> DEPOT_TOOLS_UPDATE=0
--> CEF_USE_GN=1
--> GCLIENT_PY3=1
--> GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome use_sysroot=true
--> CEF_BRANCH=4389
-------- Running "/usr/bin/python3 /home/ubuntu/code/chromium_git/chromium/src/cef/tools/gclient_hook.py" in "/home/ubuntu/code/chromium_git/chromium/src/cef"...
--> /home/ubuntu/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_linux_installer=false
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
fatal_linker_warnings=false
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"
use_gtk=false
use_sysroot=true
-------- Running "ninja -C out/Release_GN_x64 cefclient chrome_sandbox" in "/home/ubuntu/code/chromium_git/chromium/src"...
Traceback (most recent call last):
  File "automate/automate-git.py", line 1506, in <module>
    if options.buildlogfile else None)
  File "automate/automate-git.py", line 70, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out/Release_GN_x64', 'cefclient', 'chrome_sandbox']' returned non-zero exit status 1




Without Sysroot:

Initial Error:
Code: Select all
[8031/47225] CC obj/third_party/wayland/wayland_scanner/scanner.o
FAILED: obj/third_party/wayland/wayland_scanner/scanner.o
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/wayland/wayland_scanner/scanner.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"llvmorg-12-init-16296-g5e476061-1\" -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../third_party/wayland/include -fno-delete-null-pointer-checks -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -msse3 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-misleading-indentation -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 -Wmax-tokens -Wno-int-conversion -Wno-implicit-function-declaration -std=c11 -Wno-implicit-fallthrough -c ../../third_party/wayland/src/src/scanner.c -o obj/third_party/wayland/wayland_scanner/scanner.o
../../third_party/wayland/src/src/scanner.c:979:1: error: expected identifier or '('
strndup(const char *s, size_t size)
^
/usr/include/x86_64-linux-gnu/bits/string2.h:1319:26: note: expanded from macro 'strndup'
#   define strndup(s, n) __strndup (s, n)
                         ^
/usr/include/x86_64-linux-gnu/bits/string2.h:1300:4: note: expanded from macro '__strndup'
  (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s)           \
   ^
../../third_party/wayland/src/src/scanner.c:979:1: error: expected ')'
/usr/include/x86_64-linux-gnu/bits/string2.h:1319:26: note: expanded from macro 'strndup'
#   define strndup(s, n) __strndup (s, n)
                         ^
/usr/include/x86_64-linux-gnu/bits/string2.h:1300:4: note: expanded from macro '__strndup'
  (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s)           \
   ^
../../third_party/wayland/src/src/scanner.c:979:1: note: to match this '('
/usr/include/x86_64-linux-gnu/bits/string2.h:1319:26: note: expanded from macro 'strndup'
#   define strndup(s, n) __strndup (s, n)
                         ^
/usr/include/x86_64-linux-gnu/bits/string2.h:1300:3: note: expanded from macro '__strndup'
  (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s)           \
  ^
2 errors generated.


Ninja output:
Code: Select all
--> Download Directory: /home/ubuntu/code/chromium_git
--> Depot Tools Directory: /home/ubuntu/code/chromium_git/depot_tools
-------- Running "git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /home/ubuntu/code/chromium_git/depot_tools" in "/home/ubuntu/code/chromium_git"...
--> Updating depot_tools
-------- Running "update_depot_tools" in "/home/ubuntu/code/chromium_git/depot_tools"...
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Branch: 4389
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /home/ubuntu/code/chromium_git/cef
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git rev-parse origin/4389" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Current Checkout: c1f90d8c933dce163b74971707dbd79f00f18219
--> CEF Desired Checkout: c1f90d8c933dce163b74971707dbd79f00f18219 (origin/4389)
--> Reading /home/ubuntu/code/chromium_git/cef/CHROMIUM_BUILD_COMPATIBILITY.txt
-------- Running "git checkout 1f976d6f30" in "/home/ubuntu/code/chromium_git/depot_tools"...
--> CEF Output Directory: /home/ubuntu/code/chromium_git/out_4389
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git fetch --tags" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse refs/tags/89.0.4389.40" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium Current Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8
--> Chromium Desired Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8 (refs/tags/89.0.4389.40)
--> DEPOT_TOOLS_UPDATE=0
--> CEF_BRANCH=4389
--> GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome
--> GCLIENT_PY3=1
--> CEF_USE_GN=1
-------- Running "/usr/bin/python3 /home/ubuntu/code/chromium_git/chromium/src/cef/tools/gclient_hook.py" in "/home/ubuntu/code/chromium_git/chromium/src/cef"...
--> /home/ubuntu/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_linux_installer=false
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
fatal_linker_warnings=false
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"
use_gtk=false
use_sysroot=false
-------- Running "ninja -C out/Release_GN_x64 cefclient chrome_sandbox" in "/home/ubuntu/code/chromium_git/chromium/src"...
Traceback (most recent call last):
  File "automate/automate-git.py", line 1506, in <module>
    if options.buildlogfile else None)
  File "automate/automate-git.py", line 70, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out/Release_GN_x64', 'cefclient', 'chrome_sandbox']' returned non-zero exit status 1
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm

Re: Build Error - 4389 - fatal error: 'gtk/gtk.h' file not f

Postby magreenblatt » Thu Mar 04, 2021 4:52 pm

With use_sysroot=true you can’t build the cefclient target due to the Chromium sysroot environment missing the gtk dependencies. You can build the cefsimple and ceftests targets.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Build Error - 4389 - fatal error: 'gtk/gtk.h' file not f

Postby leeroy » Thu Mar 04, 2021 6:43 pm

Thanks @magreenblatt. Even though we ultimately build around the cefclient example, performing the build with sysroot build with the cefsimple target does work with one exception on the debug build. Also still at a loss to build without sysroot and build the cefclient target.

I believe we have now run into this issue https://bitbucket.org/chromiumembedded/ ... ned-symbol

Code: Select all
[47585/47586] SOLINK ./libcef.so
FAILED: libcef.so libcef.so.TOC
python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="nm"  --sofile="./libcef.so" --tocfile="./libcef.so.TOC" --output="./libcef.so" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-soname="libcef.so" -fuse-ld=lld -Wl,--build-id -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -Wl,--color-diagnostics -Wl,--no-call-graph-profile-sort -m64 -Werror -Wl,--gdb-index -rdynamic -nostdlib++ --sysroot=../../build/linux/debian_sid_amd64-sysroot -L../../build/linux/debian_sid_amd64-sysroot/usr/local/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu -o "./libcef.so" @"./libcef.so.rsp"
ld.lld: error: undefined symbol: apps::UninstallDialog::OnDialogClosed(bool, bool, bool)
>>> referenced by app_uninstall_dialog_view.cc:328 (../../chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc:328)
>>>               ui/app_uninstall_dialog_view.o:(AppUninstallDialogView::OnDialogCancelled()) in archive obj/chrome/browser/ui/libui.a
>>> referenced by app_uninstall_dialog_view.cc:338 (../../chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc:338)
>>>               ui/app_uninstall_dialog_view.o:(AppUninstallDialogView::OnDialogAccepted()) in archive obj/chrome/browser/ui/libui.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
--> Download Directory: /home/ubuntu/code/chromium_git
--> Depot Tools Directory: /home/ubuntu/code/chromium_git/depot_tools
--> Updating depot_tools
-------- Running "update_depot_tools" in "/home/ubuntu/code/chromium_git/depot_tools"...
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Branch: 4389
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /home/ubuntu/code/chromium_git/cef
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/cef"...
-------- Running "git rev-parse origin/4389" in "/home/ubuntu/code/chromium_git/cef"...
--> CEF Current Checkout: c1f90d8c933dce163b74971707dbd79f00f18219
--> CEF Desired Checkout: c1f90d8c933dce163b74971707dbd79f00f18219 (origin/4389)
--> Reading /home/ubuntu/code/chromium_git/cef/CHROMIUM_BUILD_COMPATIBILITY.txt
-------- Running "git checkout 1f976d6f30" in "/home/ubuntu/code/chromium_git/depot_tools"...
--> CEF Output Directory: /home/ubuntu/code/chromium_git/out_4389
-------- Running "git config --get remote.origin.url" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "git fetch" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git fetch --tags" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse HEAD" in "/home/ubuntu/code/chromium_git/chromium/src"...
-------- Running "git rev-parse refs/tags/89.0.4389.40" in "/home/ubuntu/code/chromium_git/chromium/src"...
--> Chromium Current Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8
--> Chromium Desired Checkout: 2c3400a2b467aa3cf67b4942740db29e60feecb8 (refs/tags/89.0.4389.40)
--> DEPOT_TOOLS_UPDATE=0
--> GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome use_sysroot=true
--> CEF_BRANCH=4389
--> GCLIENT_PY3=1
--> CEF_USE_GN=1
-------- Running "/usr/bin/python3 /home/ubuntu/code/chromium_git/chromium/src/cef/tools/gclient_hook.py" in "/home/ubuntu/code/chromium_git/chromium/src/cef"...
--> /home/ubuntu/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_linux_installer=false
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_widevine=true
fatal_linker_warnings=false
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"
use_gtk=false
use_sysroot=true
-------- Running "ninja -C out/Debug_GN_x64 cefsimple chrome_sandbox" in "/home/ubuntu/code/chromium_git/chromium/src"...
Traceback (most recent call last):
  File "automate/automate-git.py", line 1485, in <module>
    if options.buildlogfile else None)
  File "automate/automate-git.py", line 70, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out/Debug_GN_x64', 'cefsimple', 'chrome_sandbox']' returned non-zero exit status 1
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm

Re: Build Error - 4389 - fatal error: 'gtk/gtk.h' file not f

Postby leeroy » Fri Mar 05, 2021 7:33 pm

We ended up patching `app_uninstall_dialog_view.cc` to resolve this build issue.

Patch:
Code: Select all
patch -p1 <<PATCH
diff --git a/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc b/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc
index 733a540122f9..89713d34aae8 100644
--- a/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc
+++ b/chrome/browser/ui/views/apps/app_dialog/app_uninstall_dialog_view.cc
@@ -325,16 +325,20 @@ void AppUninstallDialogView::InitializeViewWithMessage(
 #endif

 void AppUninstallDialogView::OnDialogCancelled() {
-  uninstall_dialog()->OnDialogClosed(false /* uninstall */,
-                                     false /* clear_site_data */,
-                                     false /* report_abuse */);
+   #if defined(OS_CHROMEOS)
+     uninstall_dialog()->OnDialogClosed(false /* uninstall */,
+                                        false /* clear_site_data */,
+                                        false /* report_abuse */);
+   #endif
 }

 void AppUninstallDialogView::OnDialogAccepted() {
-  const bool clear_site_data =
-      clear_site_data_checkbox_ && clear_site_data_checkbox_->GetChecked();
-  const bool report_abuse_checkbox =
-      report_abuse_checkbox_ && report_abuse_checkbox_->GetChecked();
-  uninstall_dialog()->OnDialogClosed(true /* uninstall */, clear_site_data,
-                                     report_abuse_checkbox);
+  #if defined(OS_CHROMEOS)
+    const bool clear_site_data =
+        clear_site_data_checkbox_ && clear_site_data_checkbox_->GetChecked();
+    const bool report_abuse_checkbox =
+        report_abuse_checkbox_ && report_abuse_checkbox_->GetChecked();
+       uninstall_dialog()->OnDialogClosed(true /* uninstall */, clear_site_data,
+                                        report_abuse_checkbox);
+  #endif
 }
PATCH
leeroy
Expert
 
Posts: 103
Joined: Mon Jan 06, 2020 6:27 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 38 guests