Issues running cefclient using 32-bit chroot on Linux 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.

Issues running cefclient using 32-bit chroot on Linux 64bit

Postby Czarek » Thu Mar 16, 2017 6:39 am

Initially there was build issue, it couldn't find gtk.h, fixed it by editing cmake variables. Created issue:
https://bitbucket.org/chromiumembedded/ ... n-building

Then run into issues during linking, it couldn't find many .so libraries. I had to install these:
Code: Select all
apt-get install libnss3 libnspr4 libxss1 libgconf-2-4


It built fine now. However when running cefclient or cefsimple I get error:
Code: Select all
./cefclient
Illegal instruction (core dumped)


Debugged it using gdb and see:
Code: Select all
Program received signal SIGILL, Illegal instruction.
InitializeResourceBundle () at ../../cef/libcef/common/main_delegate.cc:647


It is this line:
Code: Select all
      CHECK(resources_dir.IsAbsolute());


Source ref: https://bitbucket.org/chromiumembedded/ ... ate.cc-647

Files in the tests/cefclient/Release/ directory:
Code: Select all
drwxr-xr-x 4 root root      4096 Mar 16 11:26 .
drwxr-xr-x 4 root root      4096 Mar 16 11:21 ..
-rw-rw-r-- 1 root root    324107 Mar 16 11:22 cef_100_percent.pak
-rw-rw-r-- 1 root root    435922 Mar 16 11:22 cef_200_percent.pak
-rwxr-xr-x 1 root root   1434917 Mar 16 11:22 cefclient
drwxr-xr-x 2 root root      4096 Mar 16 11:22 cefclient_files
-rw-rw-r-- 1 root root   3581680 Mar 16 11:22 cef_extensions.pak
-rw-rw-r-- 1 root root   6519856 Mar 16 11:22 cef.pak
-rwxrwxr-x 1 root root     20008 Mar 16 11:22 chrome-sandbox
-rw-r--r-- 1 root root         0 Mar 16 11:26 debug.log
-rw-rw-r-- 1 root root   4816809 Mar 16 11:22 devtools_resources.pak
-rw-rw-r-- 1 root root  10130464 Mar 16 11:22 icudtl.dat
-rwxrwxr-x 1 root root 541813212 Mar 16 11:22 libcef.so
drwxr-xr-x 2 root root      4096 Mar 16 11:22 locales
-rw-rw-r-- 1 root root    342741 Mar 16 11:22 natives_blob.bin
-rw-rw-r-- 1 root root    813944 Mar 16 11:22 snapshot_blob.bin


Using 32-bit chroot on ubuntu 14.04 64-bit.
CEF branch 2924.
Last edited by Czarek on Thu Mar 16, 2017 6:57 am, edited 2 times in total.
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: Issues building cefclient using 32-bit chroot on Linux 6

Postby Czarek » Thu Mar 16, 2017 6:54 am

I have downloaded latest Sample Application for Linux 32-bit from Spotify and the same error occurs. File: "cef_binary_3.2987.1594.g92fba9c_linux32_client". Running ./cefsimple (cefclient is missing) and the same error occurs "Illegal instruction (core dumped)" with the same 647 line in main_delegate.cc.

I can run fine GUI apps in chroot, "gedit" runs fine.
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: Issues running cefclient using 32-bit chroot on Linux 64

Postby magreenblatt » Thu Mar 16, 2017 3:34 pm

I wonder what the value of |resources_dir| is. What does CefGetPath(PK_FILE_MODULE, str) return? You can try working around the problem using the --resources-dir-path=XXX command-line flag (specify an absolute full path).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Issues running cefclient using 32-bit chroot on Linux 64

Postby Czarek » Fri Mar 17, 2017 1:58 am

Here are PathKey values when running from within chroot:

Code: Select all
[0317/064300.583980:INFO:cefsimple_linux.cc(37)] PK_FILE_MODULE=
[0317/064300.584152:INFO:cefsimple_linux.cc(40)] PK_DIR_MODULE=.
[0317/064300.584188:INFO:cefsimple_linux.cc(43)] PK_DIR_EXE=.
[0317/064300.584215:INFO:cefsimple_linux.cc(46)] PK_DIR_CURRENT=/var/cefpython/build/cef_binary_3.2924.1575.g97389a9_linux32/build_cefclient/tests/cefsimple/Release
[0317/064300.584240:INFO:cefsimple_linux.cc(49)] PK_DIR_TEMP=/tmp
[0317/064300.584256:INFO:cefsimple_linux.cc(52)] PK_FILE_EXE=/tmp
[0317/064300.584270:INFO:cefsimple_linux.cc(55)] PK_LOCAL_APP_DATA=/tmp
[0317/064300.584283:INFO:cefsimple_linux.cc(58)] PK_USER_DATA=/tmp


Note the small dot in PK_DIR_MODULE and PK_DIR_EXE.

The issue with resources can be resolved by setting both --resources-dir-path and --locales-dir-path switches. However after solving the previous issue there is yet another "Illegal instruction" error when running:

Code: Select all
Program received signal SIGILL, Illegal instruction.
Init () at ../../content/browser/zygote_host/zygote_communication_linux.cc:270


Source of that file (https://chromium.googlesource.com/chrom ... nux.cc#270):
Code: Select all
     base::Pickle pickle;
     pickle.WriteInt(kZygoteCommandGetSandboxStatus);
-->  if (!SendMessage(pickle, NULL))
        LOG(FATAL) << "Cannot communicate with zygote";


I have created a 32-bit linux using VirtualBox and with that everything works good. However it would be nice to be able to run CEF in chroot, as it would allow for better automation of processes. CEF/Chromium already can be build from sources only on 64bit machine. I can build fine with chroot, however I still need to run unit tests to make sure it works fine.
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: No registered users and 47 guests