Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

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.

Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby mezz » Fri Feb 23, 2018 9:59 am

Hi,

I have gone through the instructions detailed at:
https://bitbucket.org/chromiumembedded/ ... ckStart.md

The platform is Ubuntu 14.04 LTS 64-bit, which is the supposedly working one.
I have tried to build both Chromium master branch as well as Chromium stable branch 3325, Chromium 65, as mentioned here:
https://bitbucket.org/chromiumembedded/ ... uilding.md

For both build on a clean machine I get linking errors:

ninja: Entering directory `out/Debug_GN_x64'
[1/5] 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 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=lld -Wl,--icf=all -m64 -Werror -Wl,--gdb-index -nostdlib++ -Wl,--export-dynamic -o "./libcef.so" -Wl,-soname="libcef.so" @"./libcef.so.rsp"
/home/ubuntu/code/chromium_git/chromium/src/out/Debug_GN_x64/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: crashpad::Annotation::kValueMaxSize
>>> referenced by string:889 (../../buildtools/third_party/libc++/trunk/include/string:889)
>>> crash_reporter_client.o:(CefCrashReporterClient::ReadCrashConfigFile()) in archive obj/cef/libcef_static.a

/home/ubuntu/code/chromium_git/chromium/src/out/Debug_GN_x64/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: vr::ControllerMesh::IndicesBufferSize() const
>>> referenced by controller.cc:90 (../../chrome/browser/vr/elements/controller.cc:90)
>>> controller.o:(vr::Controller::Renderer::SetUp(std::__1::unique_ptr<vr::ControllerMesh, std::__1::default_delete<vr::ControllerMesh> >)) in archive obj/chrome/browser/vr/libvr_common.a

/home/ubuntu/code/chromium_git/chromium/src/out/Debug_GN_x64/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: vr::ControllerMesh::~ControllerMesh()
>>> referenced by memory:2233 (../../buildtools/third_party/libc++/trunk/include/memory:2233)
>>> ui_element_renderer.o:(vr::UiElementRenderer::SetUpController(std::__1::unique_ptr<vr::ControllerMesh, std::__1::default_delete<vr::ControllerMesh> >)) in archive obj/chrome/browser/vr/libvr_common.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

I have uploaded the error log, do you have any tips on how to fix this please?

Thanks

Enrico
Attachments
build.log
(5.76 KiB) Downloaded 470 times
mezz
Techie
 
Posts: 15
Joined: Wed Oct 18, 2017 4:10 pm

Re: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby magreenblatt » Fri Feb 23, 2018 12:24 pm

What GN_DEFINES are you using? The ControllerMesh error suggests that you're using enable_vr=true which is not supported.

For the "undefined symbol: crashpad::Annotation::kValueMaxSize" error try applying the following patch to cef/BUILD.gn and re-running the cef_create_projects.sh script:

Code: Select all
diff --git BUILD.gn BUILD.gn
index 3aa4bcf46..67824904b 100644
--- BUILD.gn
+++ BUILD.gn
@@ -831,6 +831,7 @@ static_library("libcef_static") {
     deps += [
       "//components/crash/content/app",
       "//components/crash/content/browser",
+      "//third_party/crashpad/crashpad/client",
     ]
   }

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

Re: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby mezz » Mon Feb 26, 2018 7:06 am

Hi,

thank you that helped me nearly get to the end of the compilation, I get a gtk include error though now: 'gtk/gtk.h' file not found

Do you have a tip for this please?

ninja -C out/Debug_GN_x64 cef chrome_sandbox
ninja: Entering directory `out/Debug_GN_x64'
[6/500] CXX obj/cef/cefclient/cefclient_gtk.o
FAILED: obj/cef/cefclient/cefclient_gtk.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/cefclient/cefclient_gtk.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DANGLE_ENABLE_RELEASE_ASSERTS -DTOOLKIT_VIEWS=1 -DEXPAT_RELATIVE_PATH -I../.. -Igen -I../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_stretch_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -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 -pthread -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -flto=thin -fwhole-program-vtables -m64 -march=x86-64 -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fsanitize=cfi-vcall -fsanitize-blacklist=../../tools/cfi/blacklist.txt -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_stretch_amd64-sysroot -fvisibility-inlines-hidden -c ../../cef/tests/cefclient/cefclient_gtk.cc -o obj/cef/cefclient/cefclient_gtk.o
../../cef/tests/cefclient/cefclient_gtk.cc:5:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
mezz
Techie
 
Posts: 15
Joined: Wed Oct 18, 2017 4:10 pm

Re: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby Czarek » Mon Feb 26, 2018 7:29 am

You must install required libraries, see comments here:
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: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby mezz » Mon Feb 26, 2018 11:21 am

Hi,

thanks for the tip, I managed to compile it, I was using use_sysroot=true in GN_DEFINES as mentioned here:

http://magpcss.org/ceforum/viewtopic.php?f=6&t=15054

In the end I used to build branch 3325:

- in my update.sh file:

Code: Select all
#!/bin/bash
export CEF_USE_GN=1
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 enable_vr=false"
python ../automate/automate-git.py --download-dir=/home/ubuntu/code/chromium_git --depot-tools-dir=/home/ubuntu/code/depot_tools --no-distrib --no-build --branch=3325


-in my create.sh file:

Code: Select all
export GN_DEFINES="is_official_build=true enable_vr=false"
export CEF_USE_GN=1
./cef_create_projects.sh
mezz
Techie
 
Posts: 15
Joined: Wed Oct 18, 2017 4:10 pm

Re: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby bruth » Wed May 02, 2018 8:47 am

For the "undefined symbol: crashpad::Annotation::kValueMaxSize" error try applying the following patch to cef/BUILD.gn and re-running the cef_create_projects.sh script:


Can this be checked in to the source tree? I just had this same error on the debug build and this fixed it.

Thanks!
bruth
Techie
 
Posts: 44
Joined: Mon Dec 09, 2013 5:45 pm

Re: Unable to build CEF/Chromium on Ubuntu 14.04 LTS 64-bit

Postby magreenblatt » Wed May 02, 2018 9:18 am

The change was initially added but then reverted in https://bitbucket.org/chromiumembedded/ ... s/5b136976. See https://groups.google.com/a/chromium.or ... tRAG94AwAJ for related conversation.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 81 guests