ARM64 binaries

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.

ARM64 binaries

Postby Fdominguez » Wed Oct 30, 2019 4:59 pm

Hi,

I've been trying to cross-compile CEF for an ARM64 processor. As I understand it is possible to do so, however I have not encountered a straightforward way to do it.

My end goal is to use the CEF binaries to make my own custom app and run it in a ARM64 microcontroller. I have the app written already using the CEF-project tutorial. Now I just want to cross compile it.

For this I followed this thread https://bitbucket.org/chromiumembedded/ ... t-47229762 (Seth Laforge answer), but I couldn't manage to get the CEF binaries as the person showed.

I also followed this thread viewtopic.php?f=6&t=16963 and I did manage to compile the cef-simple application and have it under out/Debug_GN_arm64, but I don't understand how I shall do to use my own custom made app. Shall I just take the libcef.so and link to it on my own app?

I might be missing some details on my explanation. I can explain further if required.
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm

Re: ARM64 binaries

Postby magreenblatt » Wed Oct 30, 2019 5:55 pm

You need to create a binary distribution. The easiest way to do that is by following the instructions here: https://bitbucket.org/chromiumembedded/ ... figuration. Add the ARM-specific settings to GN_DEFINES and the --arm64-build flag to automate-git.py.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: ARM64 binaries

Postby dmklementiev » Wed Oct 30, 2019 7:36 pm

If I understood your question correctly you might want to look at this discussion - https://magpcss.org/ceforum/viewtopic.php?f=6&t=16988&p=42899&hilit=ARM64#p42899
dmklementiev
Mentor
 
Posts: 54
Joined: Wed Jul 31, 2019 7:11 pm

Re: ARM64 binaries

Postby Fdominguez » Thu Oct 31, 2019 12:08 pm

magreenblatt wrote:You need to create a binary distribution. The easiest way to do that is by following the instructions here: https://bitbucket.org/chromiumembedded/ ... figuration. Add the ARM-specific settings to GN_DEFINES and the --arm64-build flag to automate-git.py.


That was a really helpful hint. I did try before --force-distrib but didn't add a distrib to build. Thanks.

My next problem tho is that when doing the automate-git.py I get an error that it does not find the cef_config.h to be transferred. Here is the error:

Code: Select all
Failed to copy file from /home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef/include/cef_config.h to /home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef/binary_distrib/cef_binary_78.0.0-master.2072+gb51a4de+chromium-78.0.3904.0_linuxarm64/include/cef_config.h: No such file or directoryTraceback (most recent call last):
  File "make_distrib.py", line 677, in <module>
    'include/', include_dir, options.quiet)
  File "make_distrib.py", line 216, in transfer_gypi_files
    copy_file(src, dst, quiet)
  File "/home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef/tools/file_util.py", line 55, in copy_file
    shutil.copy2(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef/include/cef_config.h'
Traceback (most recent call last):
  File "automate-git.py", line 1691, in <module>
    run(path, cef_tools_dir, depot_tools_dir)
  File "automate-git.py", line 61, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef/tools/make_distrib.sh', '--ninja-build', '--arm64-build']' returned non-zero exit status 1


Any thoughts?
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm

Re: ARM64 binaries

Postby magreenblatt » Thu Oct 31, 2019 12:22 pm

The cef_config.h file should be created indirectly by the cef_create_projects.sh step. You can also try running the tool manually to create the file:
Code: Select all
cd /home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef
python tools/make_config_header.py --header include/cef_config.h --cef_gn_config ../out/Debug_GN_arm64/args.gn
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: ARM64 binaries

Postby Fdominguez » Thu Oct 31, 2019 1:05 pm

magreenblatt wrote:The cef_config.h file should be created indirectly by the cef_create_projects.sh step. You can also try running the tool manually to create the file:
Code: Select all
cd /home/ferencz/Documents/CEF/cefARM64v2/chromium/src/cef
python tools/make_config_header.py --header include/cef_config.h --cef_gn_config ../out/Debug_GN_arm64/args.gn


Yes, but isn't the cef_create_project.sh step come after the automate-git.py?

I tried running the tools/make_config as you suggested, but I don't have the Debug_GN_arm64 directory. I'm feeling I missed an step at some point. This is the process I'm doing:

1. Pretty much until step 5 in this page https://bitbucket.org/chromiumembedded/ ... ckStart.md then
2. sudo ./install-build-deps.sh --no-chromeos-fonts --arm
3. export GYP_DEFINES=target_arch=arm64
4. export GN_DEFINES="use_jumbo_build=true is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 enable_nacl=false use_cups=false arm_float_abi=hard"
5. python automate-git.py --download-dir=/home/ferencz/Documents/CEF/cefARM64v2/ --depot-tools-dir=/home/ferencz/Documents/CEF/cefARM64v2/depot_tools/ --arm64-build --force-distrib --client-distrib --minimal-distrib --force-clean --no-build --build-target=cefsimple

At step 5 I get the no cef_config.h file error

Is the process right up to that point?
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm

Re: ARM64 binaries

Postby magreenblatt » Thu Oct 31, 2019 1:09 pm

The cef_create_projects.sh script should be run by automate-git.py. You're passing --no-build, so it's not building anything. You should remove that flag and pass --force-build instead.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: ARM64 binaries

Postby Fdominguez » Mon Nov 04, 2019 9:20 am

magreenblatt wrote:The cef_create_projects.sh script should be run by automate-git.py. You're passing --no-build, so it's not building anything. You should remove that flag and pass --force-build instead.


I finally got it to compile and now I have the binary distributions. It took about 2 days to build in my virtual machine with 8GB RAM. It might be due to me using the machine while is building, but still it was quite the long time for a single build

Thanks for the hep
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm

Re: ARM64 binaries

Postby magreenblatt » Mon Nov 04, 2019 10:56 am

Fdominguez wrote:I finally got it to compile and now I have the binary distributions. It took about 2 days to build in my virtual machine with 8GB RAM. It might be due to me using the machine while is building, but still it was quite the long time for a single build

Build time scales linearly with available CPU. If you want a faster build you will need faster or more cores.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: cmp4694 and 57 guests