MasterBuildQuickStart 3029 compile error in root_window_mana

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.

MasterBuildQuickStart 3029 compile error in root_window_mana

Postby aleric » Thu Apr 13, 2017 7:04 pm

Hi, I'm trying to compile CEF3 using instructions from BranchesAndBuilding, MasterBuildQuickStart and AutomatedBuildSetup
and end up with the following compile error:

Code: Select all
/opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/chromium/src>ninja -C out/Debug_GN_x64 cef
ninja: Entering directory `out/Debug_GN_x64'
[3/9978] CXX obj/cef/cefclient/root_window.o
FAILED: obj/cef/cefclient/root_window.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/cefclient/root_window.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"296320-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCFI_ENFORCEMENT -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DTOOLKIT_VIEWS=1 -I../.. -Igen -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../cef -Iincludes -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -flto -fwhole-program-vtables -m64 -march=x86-64 -pthread -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-block-capture-autoreleasing -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -ffunction-sections -g1 --sysroot=../../build/linux/debian_wheezy_amd64-sysroot -fsanitize=cfi-vcall -fsanitize-blacklist=../../tools/cfi/blacklist.txt -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../cef/tests/cefclient/browser/root_window.cc -o obj/cef/cefclient/root_window.o
In file included from ../../cef/tests/cefclient/browser/root_window.cc:5:
In file included from ../../cef/tests/cefclient/browser/root_window.h:13:
../../cef/tests/cefclient/browser/client_types.h:12:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
         ^~~~~~~~~~~
1 error generated.


when trying to build on a linux 64bit machine.

Following instructions on AutomatedBuildSetup, I'm using the following environment variables:

Code: Select all
export BASE="/opt/secondlife/3p/llceflib/3p-llceflib"
export BRANCH=3029
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
export CEF_USE_GN=1
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1"
export GYP_DEFINES="disable_nacl=1 use_sysroot=1 buildtype=Official use_allocator=none"
export CEF_ARCHIVE_FORMAT=tar.bz2


while my PATH is "$BASE/depot_tools:$OLDPATH"

Following the instructions on BranchesAndBuilding for "Manual Downloading", I installed
chromium as follows:

Code: Select all
cd $BASE
curl 'https://chromium.googlesource.com/chromium/src/+/master/build/install-build-deps.sh?format=TEXT' | base64 -d > install-build-deps.sh
chmod 755 install-build-deps.sh
sudo ./install-build-deps.sh --no-syms --no-arm --no-chromeos-fonts --no-nacl
sudo apt install libgtkglext1-dev
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
mkdir -p $BASE/chromium_git/chromium
cd $BASE/chromium_git/chromium
fetch --nohooks chromium
cd src
gclient sync --nohooks --with_branch_heads
git fetch
git fetch --tags


and CEF with:

Code: Select all
cd $BASE/chromium_git/chromium/src
git clone https://bitbucket.org/chromiumembedded/cef.git
cd cef
git checkout -t origin/$BRANCH


Then checked out the correct chromium release version and updated the third-party dependencies as follows
(this is reversed from BranchesAndBuilding because really I read the refs/tags/58.0.3029.33 from
cef/CHROMIUM_BUILD_COMPATIBILITY.txt that was just checkout out):

Code: Select all
cd $BASE/chromium_git/chromium/src
git checkout refs/tags/58.0.3029.33
gclient sync --jobs 16


Then, as found on MasterBuildQuickStart, I created the project files by running

Code: Select all
cd $BASE/chromium_git/chromium/src/cef
./cef_create_projects.sh


Note that CEF_USE_GN=1 is already set in my environment.

Also not in the order as given on the wiki, but this works and
why not get it out of the way, then I did:

Code: Select all
cd $BASE/chromium_git/chromium/src
sudo rm -f "$CHROME_DEVEL_SANDBOX"
ninja -C out/Release_GN_x64 chrome_sandbox
BUILDTYPE=Release_GN_x64 ./build/update-linux-sandbox.sh


Note that the wiki has this wrong; it tells you to run './build/update-linux-sandbox.sh BUILDTYPE=Release_GN_x64' which can't and doesn't work.

And finally attempt to build everything else by running:

Code: Select all
cd $BASE/chromium_git/chromium/src
ninja -C out/Debug_GN_x64 cef


which then ends with the above error.

Any help would be greatly appreciated.
aleric
Newbie
 
Posts: 8
Joined: Thu Apr 13, 2017 6:04 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby Czarek » Thu Apr 13, 2017 11:57 pm

Install libgtk2.0-dev and libgtkglext1-dev packages. Also check whether these are installed: gmodule-2.0 gthread-2.0 gtk+-unix-print-2.0. Might be related: https://bitbucket.org/chromiumembedded/ ... n-building
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby aleric » Fri Apr 14, 2017 4:22 am

libgtk2.0-dev and libgtkglext1-dev packages are already installed. I have gtk/gtk.h,

Code: Select all
/usr/include/gtk-2.0/gtk/gtk.h
/usr/include/gtk-3.0/gtk/gtk.h


it just doesn't use the system provided one; note that I was told to use use_sysroot=true

Note also that the following files exist in chromium_git/chromium/src,

Code: Select all
./build/linux/debian_wheezy_amd64-sysroot/usr/include/gtk-3.0/gtk/gtk.h
./build/linux/debian_wheezy_amd64-sysroot/usr/include/gtk-2.0/gtk/gtk.h
./build/linux/ubuntu_precise_amd64-sysroot/usr/include/gtk-3.0/gtk/gtk.h
./build/linux/ubuntu_precise_amd64-sysroot/usr/include/gtk-2.0/gtk/gtk.h
./build/linux/debian_wheezy_i386-sysroot/usr/include/gtk-3.0/gtk/gtk.h
./build/linux/debian_wheezy_i386-sysroot/usr/include/gtk-2.0/gtk/gtk.h


gmodule-2.0 gthread-2.0 gtk+-unix-print-2.0 do not exist on ubuntu,
but I doubt this problem is because I have missing packages on this machine
(besides, I ran ./install-build-deps.sh so that should then have taken
care of it no?)

Thanks for your help,
Aleric
aleric
Newbie
 
Posts: 8
Joined: Thu Apr 13, 2017 6:04 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby magreenblatt » Fri Apr 14, 2017 7:34 am

You cannot build the cefclient target with use_sysroot=true. Build the cefsimple target instead. After you create the binary distribution you can build the cefclient target with that.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby aleric » Fri Apr 14, 2017 11:13 am

Ok, but how to do that then?
I now tried to use automake-git.py and it doesn't look at whether sysroot is set or not, it just tries to build cefclient and fails:

Code: Select all
> python automate/automate-git.py --download-dir=$BASE --branch=3029 --x64-build --no-update --force-build --no-release-build --no-distrib
--> Download Directory: /opt/secondlife/3p/llceflib/3p-llceflib/chromium_git
--> Depot Tools Directory: /opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/depot_tools
--> CEF Branch: 3029
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/cef
--> CEF Output Directory: /opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/out_3029
-------- Running "git config --get remote.origin.url" in "/opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
--> GYP_DEFINES=disable_nacl=1 use_sysroot=1 buildtype=Official use_allocator=none
--> CEF_ARCHIVE_FORMAT=tar.bz2
--> CEF_USE_GN=1
--> GN_DEFINES=is_official_build=true use_sysroot=true use_allocator=none symbol_level=1
-------- Running "/opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/chromium/src/cef/cef_create_projects.sh" in "/opt/secondlife/3p/llceflib/3p-llcef
[...]
--> /opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/chromium/src/out/Debug_GN_x64/args.gn contents:
clang_use_chrome_plugins=false
dcheck_always_on=true
enable_basic_printing=true
enable_nacl=false
enable_plugin_installation=false
enable_print_preview=false
enable_widevine=true
is_component_build=false
is_debug=false
is_official_build=true
symbol_level=1
target_cpu="x64"
use_allocator="none"
use_sysroot=true
-------- Running "ninja -C out/Debug_GN_x64 cefclient chrome_sandbox" in "/opt/secondlife/3p/llceflib/3p-llceflib/chromium_git/chromium/src"...
ninja: Entering directory `out/Debug_GN_x64'
[...]
FAILED: obj/cef/cefclient/test_runner.o                                                                                                                 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/cefclient/test_runner.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"296320-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCFI_ENFORCEMENT -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DTOOLKIT_VIEWS=1 -I../.. -Igen -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../cef -Iincludes -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -flto -fwhole-program-vtables -m64 -march=x86-64 -pthread -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-block-capture-autoreleasing -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -ffunction-sections -g1 --sysroot=../../build/linux/debian_wheezy_amd64-sysroot -fsanitize=cfi-vcall -fsanitize-blacklist=../../tools/cfi/blacklist.txt -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../cef/tests/cefclient/browser/test_runner.cc -o obj/cef/cefclient/test_runner.o
In file included from ../../cef/tests/cefclient/browser/test_runner.cc:23:
In file included from ../../cef/tests/cefclient/browser/root_window_manager.h:13:
In file included from ../../cef/tests/cefclient/browser/root_window.h:13:
../../cef/tests/cefclient/browser/client_types.h:12:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
         ^~~~~~~~~~~
1 error generated.
aleric
Newbie
 
Posts: 8
Joined: Thu Apr 13, 2017 6:04 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby Czarek » Fri Apr 14, 2017 11:32 am

Use latest automate-git.py from CEF repository.
If still doesn't help pass --build-target=cefsimple flag.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby magreenblatt » Fri Apr 14, 2017 1:12 pm

magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

[SOLVED] MasterBuildQuickStart 3029 'gtk/gtk.h' file not fou

Postby aleric » Sat Apr 15, 2017 5:58 am

Ok, I ended up using

Code: Select all
  export REPOBASE=/path/to/root/of/3p-llceflib
  export BASE=$REPOBASE/chromium_git
  export BRANCH=3029
  export AUTOBUILD_PLATFORM_OVERRIDE=linux64
  export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
  export PATH="$BASE/depot_tools:$PATH"
  export CEF_USE_GN=1
  export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1"
  export GYP_DEFINES="disable_nacl=1 use_sysroot=1 buildtype=Official use_allocator=none"
  export CEF_ARCHIVE_FORMAT=tar.bz2


(same as before), and then

Code: Select all
python automate/automate-git.py --download-dir=$BASE --branch=$BRANCH --x64-build --force-update --no-build --no-distrib


to download/update the chromium and cef repositories.

And then compile and create a package using,

Code: Select all
python automate/automate-git.py --download-dir=$BASE --branch=$BRANCH --x64-build --force-build --build-target=cefsimple


And this works! Thanks :D
aleric
Newbie
 
Posts: 8
Joined: Thu Apr 13, 2017 6:04 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby woodvillage » Mon Dec 04, 2017 3:12 am

magreenblatt wrote:You cannot build the cefclient target with use_sysroot=true. Build the cefsimple target instead. After you create the binary distribution you can build the cefclient target with that.

I have the exactly same problem, add this to wiki might be a very big help!
woodvillage
Newbie
 
Posts: 4
Joined: Sun Aug 27, 2017 9:35 pm

Re: MasterBuildQuickStart 3029 compile error in root_window_

Postby ninad3d » Wed Feb 17, 2021 12:55 pm

gtk.PNG
gtk.PNG (107.2 KiB) Viewed 4811 times
facing same issue with v89(4389)

building using use_sysroot=true and build-target=cefsimple.
my update.sh looks like this -:

export GN_DEFINES=is_official_build=true\ use_sysroot=true\ proprietary_codecs=true\ ffmpeg_branding="Chrome"\ use_pulseaudio=true
python ../automate/automate-git.py --download-dir=/path/ --depot-tools-dir=/path/ --branch=4389 --no-build --no-distrib --minimal-distrib --client-distrib --force-clean --force-update --build-target=cefsimple --x64-build
ninad3d
Techie
 
Posts: 20
Joined: Wed Mar 04, 2020 12:20 am

Next

Return to Support Forum

Who is online

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