Hi,
I wanted to build CEF from source code , since the latest official build (i.e. cef_binary_3.3396.1785.ga27bbfa_linux32.tar.bz2) from:
http://opensource.spotify.com/cefbuilds/index.html
does not contain support for H.264 video codec.
I want to build CEF for Linux 32-bit architecture.
For this, I was following the steps outlined here:
1- https://bitbucket.org/chromiumembedded/ ... ldSetup.md (see ‘Linux Configuration’ section)
but also looking at the instructions on how to build it in such a way to include H.264 codec, here:
2- https://stackoverflow.com/questions/438 ... st-version)
So combining the info from those web sites, I did following steps (see below)
So I end up producing this output: cef_binary_3.3483.1810.g8e9d736_linux32_client.tar.bz2
I then used this generated Cef by unzipping it in my project as a dependency and then built my project.
NOTE: My project is being built within a 32-bit VM (which is based on Ubuntu 13.10), not in the 64-bit Vm where I built the Cef source code, of course...
At run time, I see the following in a log file it generates:
INFO:GrGLInterface.cpp(453)] ../../third_party/skia/src/gpu/gl/GrGLInterface.cpp:453 GrGLInterface::validate() failed.
ERROR:sandbox_linux.cc(378)] InitializeSandbox() called with multiple threads in process gpu-process.
.. and my VM freezes. it seems to be a Open GL issue (i.e. graphics related)..
I noticed that if I were to use the latest official Cef binary downloaded, i.e.: cef_binary_3.3396.1785.ga27bbfa_linux32.tar.bz2
then things work out, no longer see the crash, but then I don't have H.264 support...
Also noticed that my tar file is 37 megs larger then the official tar file.
There are three .so files generated in both Debug & Release folders: libEGL.so , libGLESv2.so & libcef.so
If I just replace the 2 dependencies: libEGL.so , libGLESv2.so from the official Cef build, still I get the same error.
A- Could it be the way I built CEF source code -- see below--- (maybe instructions lack something) ?
B- Could it be that the source code version I was building (i.e. 3.3483.1810) has some GL issues as opposed to 3.3396.1785 (which works fine) ?
Thank you so much,
Octavian
=========== Steps I performed for building CEF to include H.264 codec =============
- I first created an ubuntu VM, by installing: Ubuntu version: 14.04, 64-bit.
Step 1:
In VM, open a terminal and run:
mkdir ~/code
mkdir ~/code/automate
mkdir ~/code/chromium_git
Step 2:
sudo dpkg --add-architecture i386
sudo apt update
NOTE: I did NOT install & use 'aptitude' tool (to install dependencies), as suggested in the Wiki page, but rather I used apt-get as shown below
(i.e. the 'DEBIAN_FRONTEND' command from the Wiki page #1, seems to crashed our VM).
So instead, i used apt-get, like this:
sudo apt-get install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff wget zip lib32gcc1 lib32stdc++6 libc6-i386 linux-libc-dev:i386 libasound2:i386 libcap2:i386 libelf-dev:i386 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 libgtk-3-0:i386 libncurses5:i386 libnss3:i386 libpango1.0-0:i386 libssl1.0.0:i386 libtinfo-dev:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 libxrandr2:i386 libxss1:i386 libxtst6:i386
NOTE: Specify proprietary-codes to include H.264 , in this export, here:
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 proprietary_codecs=true ffmpeg_branding=Chrome"
export CEF_ARCHIVE_FORMAT=tar.bz2
export GN_ARGUMENTS="--ide=vs2015 --sln=cef --filters=//cef/*"
export CEF_USE_GN=1
verify that GN-related variables were properly set: env | grep GN
cd ~/code/automate/
Download the script that will download all CEF source code and do the build:
wget https://bitbucket.org/chromiumembedded/ ... ate-git.py
There seems to be an issue while building for the video codec H.264, in particular when it tries to build file:
obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o
Solution to fix this is described here:
https://groups.google.com/a/chromium.or ... BlimAzVDbY
So to fix this issue, modify BUILD.gn located at ~/code/chromium_git/chromium/src/third_party/ffmpeg/
by commenting out the following 4 lines, so that HAVE_EBP_AVAILABLE is now off:
if (target_cpu == "x86") {
#if (using sanitizer || is_win) {
defines += [ "HAVE_EBP_AVAILABLE=0" ]
#} else {
# defines += [ "HAVE_EBP_AVAILABLE=1" ]
#}
}
Then save it & copy the modified script to a safe location (e.g. ~/code/):
cp ~/code/chromium_git/chromium/src/third_party/ffmpeg/BUILD.gn ~/code/
Add an instruction into automate-git.py script to copy back this BUILD.md, right before it's triggering the CEF build, by adding this os.system instruction:
##
# Build CEF
##
os.system("cp ~/code/BUILD.gn ~/code/chromium_git/chromium/src/third_party/ffmpeg/")
- Now save automate-git.py
Finally run the master script:
python automate-git.py --download-dir=/home/sdkbuild/code/chromium_git --minimal-distrib --client-distrib --force-clean --build-target=cefsimple
NOTE: This master script will download the CEF source code and perform the build.
It will take hours to build, even on the fast host machine.
When is done, terminal output should end with something displayed like this:
Creating tar.bz2 archive for cef_binary_3.3483.1810.g8e9d736_linux32_client...
There should be 3 output tar files located under: ~code/chromium_git/chromium/src/cef/binary_distrib/