[SOLVED] Unable to build CEF 2840 on Ubuntu 16.04 64bit

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.

[SOLVED] Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby TheSHEEEP » Wed Oct 12, 2016 4:14 am

I am using the automated build script the following way:

python automate-git.py --download-dir=/home/thesheeep/git/cef --branch=2840

This is the error I get (last part of the output):

--> successfully patched ../content/browser/streams/stream_context.h
--> successfully patched ../content/public/browser/browser_context.h
--> successfully patched ../content/public/browser/storage_partition.h

Generating CEF project files...
Creating /home/thesheeep/git/cef/chromium/src/out/Debug_GN_x64 directory.

________ running 'gn gen out/Debug_GN_x64' in '/home/thesheeep/git/cef/chromium/src'
ERROR at //printing/BUILD.gn:135:22: Script returned non-zero exit code.
cups_version = exec_script("cups_config_helper.py",
^----------
Current dir: /home/thesheeep/git/cef/chromium/src/out/Debug_GN_x64/
Command: python -- /home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py --api-version
Returned 1.
stderr:

Traceback (most recent call last):
File "/home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py", line 106, in <module>
sys.exit(main())
File "/home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py", line 76, in main
subprocess.call([cups_config, '--api-version'])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

See //BUILD.gn:250:7: which caused the file to be included.
"//printing:printing_unittests",
^------------------------------
Traceback (most recent call last):
File "tools/gclient_hook.py", line 134, in <module>
RunAction(src_dir, cmd)
File "/home/thesheeep/git/cef/chromium/src/cef/tools/gclient_util.py", line 39, in RunAction
command, cwd=dir, always=True)
File "/home/thesheeep/git/cef/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/home/thesheeep/git/cef/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out/Debug_GN_x64' returned non-zero exit status 1 in /home/thesheeep/git/cef/chromium/src
Traceback (most recent call last):
File "automate-git.py", line 942, in <module>
run(path, cef_src_dir, depot_tools_dir)
File "automate-git.py", line 55, in run
shell=(sys.platform == 'win32'))
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/thesheeep/git/cef/chromium/src/cef/cef_create_projects.sh']' returned non-zero exit status 1


re-running the script yields:

--> Download Directory: /home/thesheeep/git/cef
--> Depot Tools Directory: /home/thesheeep/git/cef/depot_tools
--> Updating depot_tools
-------- Running "update_depot_tools" in "/home/thesheeep/git/cef/depot_tools"...
-------- Running "git config --get remote.origin.url" in "/home/thesheeep/git/cef/cef"...
--> CEF Branch: 2840
--> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
--> CEF Source Directory: /home/thesheeep/git/cef/cef
-------- Running "git rev-parse HEAD" in "/home/thesheeep/git/cef/cef"...
-------- Running "git fetch" in "/home/thesheeep/git/cef/cef"...
-------- Running "git rev-parse origin/2840" in "/home/thesheeep/git/cef/cef"...
--> CEF Current Checkout: 2be7dee3faee11e17dfb2a5fa111a0f5ea2b3647
--> CEF Desired Checkout: 2be7dee3faee11e17dfb2a5fa111a0f5ea2b3647 (origin/2840)
--> CEF Output Directory: /home/thesheeep/git/cef/out_2840
-------- Running "git config --get remote.origin.url" in "/home/thesheeep/git/cef/chromium/src"...
--> Chromium URL: https://chromium.googlesource.com/chromium/src.git
-------- Running "git rev-parse HEAD" in "/home/thesheeep/git/cef/chromium/src"...
-------- Running "git rev-parse refs/tags/54.0.2840.16" in "/home/thesheeep/git/cef/chromium/src"...
--> Chromium Current Checkout: e7e4267731b076112ee68352dce77808de507811
--> Chromium Desired Checkout: e7e4267731b076112ee68352dce77808de507811 (refs/tags/54.0.2840.16)
--> Not building. The source hashes have not changed and the output folder "/home/thesheeep/git/cef/chromium/src/out" already exists
Last edited by TheSHEEEP on Tue Nov 01, 2016 2:15 am, edited 1 time in total.
TheSHEEEP
Techie
 
Posts: 10
Joined: Wed Oct 12, 2016 4:10 am

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby magreenblatt » Wed Oct 12, 2016 4:42 pm

Did you run Chromium's install-build-deps.sh script?

You can run `/home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py --api-version` manually to verify that you've resolved the error. Then re-run automate-git.py with the `--force-build` command-line flag.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby TheSHEEEP » Fri Oct 14, 2016 12:53 am

magreenblatt wrote:Did you run Chromium's install-build-deps.sh script?

I didn't. I just followed the wiki's "Automated Method" step. If more than that is needed, you should probably put it there ;)

I ran it manually now, and it says:
ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic), 15.04 (vivid), 15.10 (wily) are currently supported.

Now that is a bummer. Not supporting new Ubuntu versions basically kills any purpose of this. Not going to build a product that will only allow me to support past OS versions :lol:
I modified the python file to allow 16.04 as well, it didn't produce any error, but it also didn't really seem to do anything at all.
Not sure if just adding the Ubuntu version to the top of the file is enough... it certainly didn't change anything about my errors.

magreenblatt wrote:You can run `/home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py --api-version` manually to verify that you've resolved the error.


Running the script manually results in this error:
python cups_config_helper.py --api-version
Traceback (most recent call last):
File "cups_config_helper.py", line 106, in <module>
sys.exit(main())
File "cups_config_helper.py", line 76, in main
subprocess.call([cups_config, '--api-version'])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory


magreenblatt wrote:Then re-run automate-git.py with the `--force-build` command-line flag.

I don't think this would do any good as long as the above error isn't fixed?
TheSHEEEP
Techie
 
Posts: 10
Joined: Wed Oct 12, 2016 4:10 am

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby magreenblatt » Fri Oct 14, 2016 9:08 am

TheSHEEEP wrote:
magreenblatt wrote:Did you run Chromium's install-build-deps.sh script?

I didn't. I just followed the wiki's "Automated Method" step. If more than that is needed, you should probably put it there ;)

Thanks for pointing that out. I'll improve the docs.

TheSHEEEP wrote:I ran it manually now, and it says:
ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic), 15.04 (vivid), 15.10 (wily) are currently supported.

Now that is a bummer. Not supporting new Ubuntu versions basically kills any purpose of this. Not going to build a product that will only allow me to support past OS versions :lol:
I modified the python file to allow 16.04 as well, it didn't produce any error, but it also didn't really seem to do anything at all.
Not sure if just adding the Ubuntu version to the top of the file is enough... it certainly didn't change anything about my errors.

You should use the install-build-deps.sh script (not .py). It seems to support Ubuntu 16.04. I have not tested it myself on that platform.

TheSHEEEP wrote:
magreenblatt wrote:You can run `/home/thesheeep/git/cef/chromium/src/printing/cups_config_helper.py --api-version` manually to verify that you've resolved the error.


Running the script manually results in this error:
python cups_config_helper.py --api-version
Traceback (most recent call last):
File "cups_config_helper.py", line 106, in <module>
sys.exit(main())
File "cups_config_helper.py", line 76, in main
subprocess.call([cups_config, '--api-version'])
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Looks like you need to install the package that provides the `cups_config` utility.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby TheSHEEEP » Wed Oct 19, 2016 8:26 am

I made a fresh attempt, got the same error, this time I ran the install-build-deps.sh script manually* and then re-ran the script with "--force-build".

* Which worked, except for not being able to install the chromeos fonts, but whatever. I specified the --no-chromeos-fonts flag and it went through smoothly.

This is the result:

--> already patched ../content/browser/renderer_host/render_process_host_impl.h
--> already patched ../content/browser/site_instance_impl.cc
--> already patched ../content/browser/storage_partition_impl.h
--> already patched ../content/browser/streams/stream_context.cc
--> already patched ../content/browser/streams/stream_context.h
--> already patched ../content/public/browser/browser_context.h
--> already patched ../content/public/browser/storage_partition.h
Reading patch file /home/thesheeep/git/cef/chromium/src/cef/patch/patches/webview_plugin_2352673003.patch
--> already patched ../components/plugins/renderer/webview_plugin.cc

Generating CEF project files...

________ running 'gn gen out/Debug_GN_x64' in '/home/thesheeep/git/cef/chromium/src'
ERROR at //build/config/linux/pkg_config.gni:85:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /home/thesheeep/git/cef/chromium/src/out/Debug_GN_x64/
Command: python -- /home/thesheeep/git/cef/chromium/src/build/config/linux/pkg-config.py gtkglext-1.0
Returned 1.
stderr:

Package gtkglext-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found
Could not run pkg-config.

See //cef/BUILD.gn:1734:5: whence it was called.
pkg_config("gtkglext") {
^-----------------------
See //BUILD.gn:268:7: which caused the file to be included.
"//cef",
^------
Traceback (most recent call last):
File "tools/gclient_hook.py", line 134, in <module>
RunAction(src_dir, cmd)
File "/home/thesheeep/git/cef/chromium/src/cef/tools/gclient_util.py", line 39, in RunAction
command, cwd=dir, always=True)
File "/home/thesheeep/git/cef/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/home/thesheeep/git/cef/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out/Debug_GN_x64' returned non-zero exit status 1 in /home/thesheeep/git/cef/chromium/src
Traceback (most recent call last):
File "automate-git.py", line 942, in <module>
run(path, cef_src_dir, depot_tools_dir)
File "automate-git.py", line 55, in run
shell=(sys.platform == 'win32'))
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/thesheeep/git/cef/chromium/src/cef/cef_create_projects.sh']' returned non-zero exit status 1


Hooray, more errors! :D
I am surprised this script seems to work for many people, while I get so many errors.
I'd be happy to use prebuilt libs, but they are not available for 2840, it seems.
TheSHEEEP
Techie
 
Posts: 10
Joined: Wed Oct 12, 2016 4:10 am

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby magreenblatt » Wed Oct 19, 2016 11:16 am

Run `sudo apt-get install libgtkglext1-dev`, then try automate-git.py again.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby Czarek » Wed Oct 19, 2016 11:37 am

2840 prebuilt binaries appeared on Spotify two days ago.
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 2840 on Ubuntu 16.04 64bit

Postby TheSHEEEP » Fri Oct 21, 2016 1:26 am

magreenblatt wrote:Run `sudo apt-get install libgtkglext1-dev`, then try automate-git.py again.

Some progress, but ends in an error again:
--> successfully patched ../content/public/browser/storage_partition.h
Reading patch file /home/thesheeep/git/cef/chromium/src/cef/patch/patches/webview_plugin_2352673003.patch
--> successfully patched ../components/plugins/renderer/webview_plugin.cc

Generating CEF project files...
Creating /home/thesheeep/git/cef/chromium/src/out/Debug_GN_x64 directory.

________ running 'gn gen out/Debug_GN_x64' in '/home/thesheeep/git/cef/chromium/src'
Done. Made 4686 targets from 982 files in 2200ms
Creating /home/thesheeep/git/cef/chromium/src/out/Release_GN_x64 directory.

________ running 'gn gen out/Release_GN_x64' in '/home/thesheeep/git/cef/chromium/src'
Done. Made 4687 targets from 983 files in 2209ms
-------- Running "ninja -C out/Debug_GN_x86 cefclient chrome_sandbox" in "/home/thesheeep/git/cef/chromium/src"...
ninja: Entering directory `out/Debug_GN_x86'
ninja: fatal: chdir to 'out/Debug_GN_x86' - No such file or directory
Traceback (most recent call last):
File "automate-git.py", line 980, in <module>
if options.buildlogfile else None)
File "automate-git.py", line 55, in run
shell=(sys.platform == 'win32'))
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out/Debug_GN_x86', 'cefclient', 'chrome_sandbox']' returned non-zero exit status 1

This looks a bit like I need to do a fully fresh rebuild (--force-clean && --force-build didn't help), so I will do that and see what happens.

Also, good that prebuilt ones are now available, so I got something in case the manual approach fails.
TheSHEEEP
Techie
 
Posts: 10
Joined: Wed Oct 12, 2016 4:10 am

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby TheSHEEEP » Fri Oct 21, 2016 3:56 am

Hmmm, no.
Getting the same error, even after a completely fresh build procedure.

And there is no previous error in the output suggesting that something would be wrong.

Of course, I am on an x64 platform, but usually that wouldn't prevent building x86.
And it especially wouldn't prevent the creation of a folder...
TheSHEEEP
Techie
 
Posts: 10
Joined: Wed Oct 12, 2016 4:10 am

Re: Unable to build CEF 2840 on Ubuntu 16.04 64bit

Postby magreenblatt » Fri Oct 21, 2016 10:21 am

-------- Running "ninja -C out/Debug_GN_x86 cefclient chrome_sandbox" in "/home/thesheeep/git/cef/chromium/src"...
ninja: Entering directory `out/Debug_GN_x86'
ninja: fatal: chdir to 'out/Debug_GN_x86' - No such file or directory

This suggests that there's some file or directory named `out/Debug_GN_x86` that already exists, but the script can't access it. Try manually deleting the `/home/thesheeep/git/cef/chromium/src/out` directory.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: civilogic and 88 guests