Debug_GN_arm error when building on Linux (*not* arm)

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.

Debug_GN_arm error when building on Linux (*not* arm)

Postby Czarek » Mon Mar 13, 2017 2:19 am

I'm building CEF from sources on Linux using automate-git.py tool. Got an error during creation of Debug_GN_arm project. I am *not* building for ARM platform, I'm building for Linux, however despite that ARM projects are being created. How can I disable GN arm projects completely? Here is the error:

Code: Select all
Generating CEF project files...
Creating /home/cz/github/cefpython/build/chromium/src/out/Release_GN_x86 directory.

________ running 'gn gen out/Release_GN_x86' in '/home/cz/github/cefpython/build/chromium/src'
Done. Made 5634 targets from 1201 files in 1962ms
Creating /home/cz/github/cefpython/build/chromium/src/out/Debug_GN_arm directory.

________ running 'gn gen out/Debug_GN_arm' in '/home/cz/github/cefpython/build/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/cz/github/cefpython/build/chromium/src/out/Debug_GN_arm/
Command: python -- /home/cz/github/cefpython/build/chromium/src/build/config/linux/pkg-config.py -s /home/cz/github/cefpython/build/chromium/src/build/linux/debian_wheezy_arm-sysroot -a arm gmodule-2.0 gtk+-3.0 gthread-2.0
Returned 1.
stderr:

Traceback (most recent call last):
  File "/home/cz/github/cefpython/build/chromium/src/build/config/linux/pkg-config.py", line 219, in <module>
    sys.exit(main())
  File "/home/cz/github/cefpython/build/chromium/src/build/config/linux/pkg-config.py", line 138, in main
    prefix = GetPkgConfigPrefixToStrip(args)
  File "/home/cz/github/cefpython/build/chromium/src/build/config/linux/pkg-config.py", line 80, in GetPkgConfigPrefixToStrip
    env=os.environ)
  File "/home/cz/.pyenv/versions/2.7.13/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'gmodule-2.0', 'gtk+-3.0', 'gthread-2.0']' returned non-zero exit status 1

See //build/config/linux/gtk3/BUILD.gn:14:1: whence it was called.
pkg_config("gtk3_internal_config") {
^-----------------------------------
See //chrome/browser/ui/libgtkui/BUILD.gn:144:12: which caused the file to be included.
           "//build/config/linux/gtk3",
           ^--------------------------
Traceback (most recent call last):
  File "tools/gclient_hook.py", line 135, in <module>
    RunAction(src_dir, cmd)
  File "/home/cz/github/cefpython/build/chromium/src/cef/tools/gclient_util.py", line 39, in RunAction
    command, cwd=dir, always=True)
  File "/home/cz/github/cefpython/build/depot_tools/gclient_utils.py", line 303, in CheckCallAndFilterAndHeader
    return CheckCallAndFilter(args, **kwargs)
  File "/home/cz/github/cefpython/build/depot_tools/gclient_utils.py", line 549, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out/Debug_GN_arm' returned non-zero exit status 1 in /home/cz/github/cefpython/build/chromium/src


OS: Ubuntu 14.04 64bit
CEF: branch 2924
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: Debug_GN_arm error when building on Linux (*not* arm)

Postby Czarek » Mon Mar 13, 2017 3:48 am

Here is the culprit from logs:

Code: Select all
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'gmodule-2.0', 'gtk+-3.0', 'gthread-2.0']' returned non-zero exit status 1


However I have all these libs installed. When I run that same command manually it returns exit status 0:

Code: Select all
cz@comp:~/github/cefpython/build$ pkg-config --variable=prefix gmodule-2.0 gtk+-3.0 gthread-2.0
/usr /usr /usr
cz@comp:~/github/cefpython/build$ echo $?
0


So I have no idea what is going on. Perhaps Chromium's script modified env variables and it fails to find gtk or some other module?
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: Debug_GN_arm error when building on Linux (*not* arm)

Postby Czarek » Mon Mar 13, 2017 4:25 am

I see that chromium/src/build/linux/debian_wheezy_arm-sysroot/ has not GTK 3 inside. Only GTK 2. I have forced Chromium update so these should be updated, right?

I've edited chromium/src/build/config/linux/gtk3/BUILD.gn and removed all contents. It solved ARM error, however it caused another error when parsing x86 configuration, which seems to depend on libgtk3 as well.

I've set GN define use_gtk3=false, but it didn't help.

I am using the same Linux configuration as on the AutomatedBuildSetup wiki page, with use_sysroot=true.

The solution for me was to edit gtk3/BUILD.gn and replace:
Code: Select all
"gtk+-3.0" ==> "gtk+-2.0",
...
 "gtk+-unix-print-3.0" ==>  "gtk+-unix-print-2.0"


Now it started compiling, hopefully it will succeed.
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: Debug_GN_arm error when building on Linux (*not* arm)

Postby magreenblatt » Mon Mar 13, 2017 11:51 am

CEF will only attempt to configure arm if you have the debian_wheezy_arm-sysroot installed. You can delete it from the chromium/src/build/linux directory and it should not be re-downloaded unless you request it via GYP_DEFINES (see https://bitbucket.org/chromiumembedded/ ... t-30495117).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Debug_GN_arm error when building on Linux (*not* arm)

Postby Czarek » Mon Mar 13, 2017 12:32 pm

Thanks for info. Will try delete it next time I encounter issues.
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


Return to Support Forum

Who is online

Users browsing this forum: finder2 and 80 guests