Closed magreenblatt closed 4 years ago
Forum threads that discuss ARM build support:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=13130&p=32244 http://www.magpcss.org/ceforum/viewtopic.php?f=10&t=12339
Original comment by Gutemberg Ribeiro (Bitbucket: galvesribeiro, GitHub: galvesribeiro).
Having non-X11 support on ARM devices that doesn't have a Window Manager and only have the device framebuffer(i.e. /dev/fb) is something really needed. Also there is a requirement that the device MUST have VFP/FPU which is not true on many embedded devices so would be good to have it optional as well.
ARM build support has been added in master revision 6158110 (bb) and 2840 branch revision c316966 (bb).
To cross-compile CEF for ARM using an Ubuntu 14.04 64-bit host system and either the automated or manual build method:
export GYP_DEFINES=target_arch=arm
. This will cause the debian_wheezy_arm-sysroot to be installed by gclient [1].export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 arm_float_abi=hard"
Creating an official build avoids failures due to the linker running out of memory.Automated build: In addition to the instructions on the AutomatedBuildSetup Wiki page:
--arm-build
command-line flag.Manual build: In addition to the instructions on the MasterBuildQuickStart Wiki page:
ninja -C out/Debug_GN_arm cefsimple
to build the Debug configuration. Change "Debug" to "Release" to build the Release configuration. Note that the cefclient target cannot be built when using a sysroot environment.--arm-build
command-line flag to generate a binary distribution from the ARM build.To verify the architecture of the resulting binaries:
$ file out/Debug_GN_arm/cefsimple
cefsimple: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=d29f0414c30e44c7248a71adc59f74b4221f2985, not stripped
[1] Alternately, you can run ./build/linux/sysroot_scripts/install-sysroot.py --arch=arm
manually after downloading Chromium source code.
Chromium support for ARM64 cross-compile is being tracked in https://bugs.chromium.org/p/chromium/issues/detail?id=613452.
The attached arm64.patch file adds ARM64 build support to master. It won't build successfully until CEF has moved past the changes in the above Chromium issue.
ARM build tested to run successfully on an ASUS C201 Chromebook running Crouton.
sudo apt-get install libnss3 libnspr4 libxss1
cefsimple --no-sandbox
Running with sandbox enabled fails with the following error:
The setuid sandbox is not running as root. Common causes:
* An unprivileged process using ptrace on it, like a debugger.
* A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...)
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Original comment by Vlad Spiridonescu (Bitbucket: speedyxvn).
Any update on the arm64 support? I cannot get past the atomic operations error.
Original comment by Fredrik Qvarnstrom (Bitbucket: Fred Q).
Same here, any update? @magreenblatt? I have been waiting for you for over 5 months.
I need to use CEF on Raspberry Pi.
Thanks
Original comment by Fredrik Qvarnstrom (Bitbucket: Fred Q).
That's great, @basicer !
Would you like to share how to do it?
Original comment by Robert Blanckaert (Bitbucket: basicer, GitHub: basicer).
For Raspberry Pi 3 it pretty much just works out of the box.
export GYP_DEFINES=target_arch=arm
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 arm_float_abi=hard
Original comment by Paulo Coutinho (Bitbucket: Paulo Coutinho).
Hi, any update to ARM support? More specific to Raspberry 3. Thanks. I want add support to CEF on my tool EzoRed (ezored.com).
Original comment by AndreRenaud (Bitbucket: AndreRenaud, GitHub: AndreRenaud).
Following these instructions, and performing the build on Ubuntu 17.10 x86_64, I'm seeing issues with the cross compilation: [29/42847] ASM obj/third_party/boringssl/boringssl_asm/aes-armv4.o FAILED: obj/third_party/boringssl/boringssl_asm/aes-armv4.o ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/boringssl/boringssl_asm/aes-armv4.o.d -DBORINGSSL_CLANG_SUPPORTS_DOT_ARCH -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"318667-1\" -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/boringssl/src/include -I../.. -Igen -fno-integrated-as -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes -std=gnu11 --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=neon -gdwarf-3 -g1 --sysroot=../../build/linux/debian_stretch_arm-sysroot -c ../../third_party/boringssl/linux-arm/crypto/fipsmodule/aes-armv4.S -o obj/third_party/boringssl/boringssl_asm/aes-armv4.o /usr/bin/as: unrecognized option '-mfloat-abi=hard' clang: error: assembler command failed with exit code 1 (use -v to see invocation) [38/42847] CXX obj/third_party/webrtc/...ideo_stream_api/video_receive_stream.o ninja: build stopped: subcommand failed.
It looks like it's ending up on a native clang instance rather than the cross compilation. Does anyone have any pointers on how best to resolve this?
Original comment by Marcos Cereijo (Bitbucket: Marcos Cereijo).
I am having some troubles while trying to compile CEF for ARM. Can anybody give me some insight about what is going wrong?
Here is the output log:
#!bash
[47414/47785] CXX obj/cef/libcef_static/window_x11.o
FAILED: obj/cef/libcef_static/window_x11.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/libcef_static/window_x11.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"328716-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=329375 -DCR_LIBCXXABI_REVISION=329629 -DCR_SYSROOT_HASH=ed31924757f11885a21793dc4b928d07ab25740c -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBUILDING_CEF_SHARED -DUSING_CHROMIUM_INCLUDES -DWEBP_EXTERN=extern -DUSE_EGL -DTOOLKIT_VIEWS=1 -DEXPAT_RELATIVE_PATH -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DV8_USE_EXTERNAL_STARTUP_DATA -DLEVELDB_PLATFORM_CHROMIUM=1 -DMESA_EGL_NO_X11_HEADERS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DFT_CONFIG_CONFIG_H=\"freetype-custom-config/ftconfig.h\" -DFT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\" -DFT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\" -DPDFIUM_REQUIRED_MODULES -DCHROMIUM_RESTRICT_VISIBILITY -I../../third_party/crashpad/crashpad -I../.. -Igen -I../../cef -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party/libyuv/include -I../../third_party/usrsctp/usrsctplib -I../../third_party/webrtc -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/boringssl/src/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libwebm/source -I../../third_party/blink -Igen/third_party/blink -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/re2/src -I../../third_party/mesa/src/include -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen -I../../third_party/flatbuffers/src/include -I../../third_party/brotli/include -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/zlib -I../../v8/include -Igen/v8/include -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/harfbuzz-ng/src/src -I../../third_party/breakpad/breakpad/src -fno-strict-aliasing -fmerge-all-constants --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=neon -mthumb -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -gdwarf-3 -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-header-guard -isystem../../build/linux/debian_sid_arm-sysroot/usr/include/nss -isystem../../build/linux/debian_sid_arm-sysroot/usr/include/nspr -Wno-exit-time-destructors -DLIBXML_STATIC= -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_arm-sysroot -fvisibility-inlines-hidden -c ../../cef/libcef/browser/native/window_x11.cc -o obj/cef/libcef_static/window_x11.o
../../cef/libcef/browser/native/window_x11.cc:30:26: error: no member named 'xany' in 'ui::Event'
::Window target = xev->xany.window;
~~~ ^
../../cef/libcef/browser/native/window_x11.cc:31:12: error: reference to non-static member function must be called; did you mean to call it with no arguments?
if (xev->type == GenericEvent)
~~~~~^~~~
()
../../cef/libcef/browser/native/window_x11.cc:32:47: error: no member named 'xcookie' in 'ui::Event'
target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
~~~ ^
../../cef/libcef/browser/native/window_x11.cc:278:11: error: cannot initialize a variable of type 'XEvent *' (aka '_XEvent *') with an lvalue of type 'const ui::PlatformEvent' (aka 'ui::Event *const')
XEvent* xev = event;
^ ~~~~~
4 errors generated.
[47419/47785] CXX obj/cef/libcef_static/render_widget_host_view_osr_linux.o
FAILED: obj/cef/libcef_static/render_widget_host_view_osr_linux.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/cef/libcef_static/render_widget_host_view_osr_linux.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"328716-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=329375 -DCR_LIBCXXABI_REVISION=329629 -DCR_SYSROOT_HASH=ed31924757f11885a21793dc4b928d07ab25740c -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBUILDING_CEF_SHARED -DUSING_CHROMIUM_INCLUDES -DWEBP_EXTERN=extern -DUSE_EGL -DTOOLKIT_VIEWS=1 -DEXPAT_RELATIVE_PATH -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DV8_USE_EXTERNAL_STARTUP_DATA -DLEVELDB_PLATFORM_CHROMIUM=1 -DMESA_EGL_NO_X11_HEADERS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DFT_CONFIG_CONFIG_H=\"freetype-custom-config/ftconfig.h\" -DFT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\" -DFT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\" -DPDFIUM_REQUIRED_MODULES -DCHROMIUM_RESTRICT_VISIBILITY -I../../third_party/crashpad/crashpad -I../.. -Igen -I../../cef -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party/libyuv/include -I../../third_party/usrsctp/usrsctplib -I../../third_party/webrtc -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/boringssl/src/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libwebm/source -I../../third_party/blink -Igen/third_party/blink -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/re2/src -I../../third_party/mesa/src/include -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen -I../../third_party/flatbuffers/src/include -I../../third_party/brotli/include -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/zlib -I../../v8/include -Igen/v8/include -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/harfbuzz-ng/src/src -I../../third_party/breakpad/breakpad/src -fno-strict-aliasing -fmerge-all-constants --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=neon -mthumb -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -gdwarf-3 -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-header-guard -isystem../../build/linux/debian_sid_arm-sysroot/usr/include/nss -isystem../../build/linux/debian_sid_arm-sysroot/usr/include/nspr -Wno-exit-time-destructors -DLIBXML_STATIC= -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_arm-sysroot -fvisibility-inlines-hidden -c ../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc -o obj/cef/libcef_static/render_widget_host_view_osr_linux.o
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:170:3: error: use of undeclared identifier 'window_'
window_ = new CefWindowX11(NULL, None, gfx::Rect(0, 0, 1, 1));
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:171:24: error: use of undeclared identifier 'window_'
compositor_widget_ = window_->xwindow();
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:178:10: error: unknown type name 'window_'; did you mean 'Window'?
DCHECK(window_);
^~~~~~~
Window
../../base/logging.h:888:54: note: expanded from macro 'DCHECK'
#define DCHECK(condition) EAT_STREAM_PARAMETERS << !(condition)
^
../../cef/libcef/browser/native/window_x11.h:11:23: note: 'Window' declared here
typedef unsigned long Window;
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:178:18: error: expected expression
DCHECK(window_);
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:179:3: error: use of undeclared identifier 'window_'
window_->Close();
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:186:10: error: use of undeclared identifier 'invisible_cursor_'
if (!invisible_cursor_) {
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:187:7: error: use of undeclared identifier 'invisible_cursor_'
invisible_cursor_.reset(new ui::XScopedCursor(ui::CreateInvisibleCursor(),
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:190:12: error: use of undeclared identifier 'invisible_cursor_'
return invisible_cursor_->get();
^
../../cef/libcef/browser/osr/render_widget_host_view_osr_linux.cc:192:12: error: cannot initialize return object of type 'ui::PlatformCursor' (aka 'void *') with an rvalue of type '::Cursor' (aka 'unsigned long')
return GetXCursor(ToCursorID(type));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 errors generated.
ninja: build stopped: subcommand failed.
Original comment by Seth LaForge (Bitbucket: Seth-LaForge).
I'm trying to get ARM build to work with automate-git.py. I've successfully built for ARM and run on a Raspberry Pi 3+. I had to make a few changes to automate-git.py and make_distrib.py to make it work. I tried to create a pull request, but I don't see any way within bitbucket to create one - the left bar has no "Create Pull Request" item - maybe I need additional permissions? In case, the following change lets me build for ARM:
https://bitbucket.org/Seth-LaForge/cef/commits/e12bf363bcec9b26541f17e6c916cc8b9f566636?at=arm-build
It doesn't seem to build swiftshader - I haven't figured out why, or if it would be reasonable to do so.
Here's how I've gotten it to build, on a clean VM with ubuntu 16.04 server:
mkdir cef
cd cef
sudo apt-get install curl libgtkglext1-dev
curl 'https://chromium.googlesource.com/chromium/src/+/master/build/install-build-deps.sh?format=TEXT' | base64 -d > install-build-deps.sh
chmod 755 install-build-deps.sh
sudo ./install-build-deps.sh --no-chromeos-fonts
wget https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Make changes in my commit above #
export PATH=$HOME/cef/depot_tools:$PATH
export GYP_DEFINES=target_arch=arm
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 arm_float_abi=hard"
python ./automate-git.py --download-dir=$HOME/cef --branch=3497 --arm-build --build-target=cefsimple
scp -r chromium/src/cef/binary_distrib/cef_binary_3.3497.1818.g17f0192_linuxarm pi@my-pi:cef/
I can build & run cefsimple on the Pi:
cd cef/cef_binary_3.3497.1818.g17f0192_linuxarm
mkdir build && cd build
sudo apt install gcc-6 g++-6
# comment out swiftshader from ../cmake/cef_variables.cmake
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DPROJECT_ARCH=arm ..
make -j4 cefsimple
EXE="/home/pi/cef/cef_binary_3.3497.1818.g17f0192_linuxarm/build/tests/cefsimple/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
./tests/cefsimple/Debug/cefsimple
Original comment by Romain Caire (Bitbucket: Romain Caire).
If it's usefull to anyone, I've managed to build the arm64 build using this patch (loosely based on the previous patch, with the atomic file embedded)
https://gist.github.com/supercairos/3a5c296333fe1641ab6a60f8d49d94b8
To use:
Setup your build environment properly (follow MasterBuildQuickStart for a quick start guide roughly until step 5)
Download CEF source within your download folder (using automate-git.py)
#!bash
mkdir ~/cef-3729
mkdir ~/cef-3729/automate
mkdir ~/cef-3729/chromium_git
cd ~/cef-3729/automate/
wget https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py
cd ~/cef-3729/chromium_git/
python $HOME/cef-3729/automate/automate-git.py --download-dir=$HOME/cef-3729/chromium_git --branch=3729 --force-clean --no-distrib --no-build
#!bash
cd ~/cef-3729/chromium_git/chromium/src/cef/
wget https://gist.githubusercontent.com/supercairos/3a5c296333fe1641ab6a60f8d49d94b8/raw/b37ea4f5155875e245205af3c86e6f58fcf96127/cef_3729_arm64.patch
git apply cef_3729_arm64.patch
rm cef_3729_arm64.patch
#!bash
cd ~/cef-3729/chromium_git/chromium/src/
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
#!bash
export GYP_DEFINES=target_arch=arm64
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1 enable_nacl=false use_cups=false"
#!bash
cd ~/cef-3729/chromium_git/
python $HOME/cef-3729/chromium_git/chromium/src/cef/tools/automate/automate-git.py --download-dir=$HOME/cef-3729/chromium_git --branch=3729 --arm64-build --no-update --force-build --minimal-distrib --client-distrib --force-distrib --build-target=cefsimple
Again those commands are based on my (poor) experience of compiling CEF and might probably be optimized.
@magreenblatt I'm wondering why the arm64 has not been merged onto master ? It's quite useful for linux setup box :)
Original comment by Tejendra Singh Tomar (Bitbucket: Tejendra Singh Tomar).
After following normal steps by adding arm flag to buildeps and automated build, I am getting following errors
ninja: Entering directory `out/Debug_GN_arm' [1/370] ACTION //tools/v8_context_snapshot:generate_v8_context_snapshot(//build/toolchain/linux:clang_arm) FAILED: v8_context_snapshot.bin python ../../build/gn_run_binary.py ./clang_x86_v8_arm/v8_context_snapshot_generator --output_file=v8_context_snapshot.bin ././clang_x86_v8_arm/v8_context_snapshot_generator: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory ./clang_x86_v8_arm/v8_context_snapshot_generator failed with exit code 127 ninja: build stopped: subcommand failed.
I already have this library under code/chromium_git/chromium/src/build/linux/debian_sid_arm-sysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0, any idea what might be causing this, as i am not able to find any solution for this?
@super-cairos Can you submit your patch as a PR? Thanks.
Original comment by Frank Pfattheicher (Bitbucket: Frank_Pfattheicher).
ARM builds now available from Chromely project: http://chromely.org/
I can begin providing ARM 32-bit/64-bit builds on the Spotify builder if we can reach agreement on the specific configuration settings (GN_DEFINES) to use. This is the default GN configuration in Chromium: https://cs.chromium.org/chromium/src/build/config/arm.gni?type=cs&sq=package:chromium&g=0&l=11
To all Watchers of this issue: Would the default configuration work for you? If not, what configuration would you prefer?
Original comment by Romain Caire (Bitbucket: Romain Caire).
Chromium flags seams fine. On our end we’ve removed CUPS and NaCL both to improve build time & less dependency.
Unfortunalty, I won’t have time to provide a PR until end of next week…
@super-cairos Thanks for the feedback. The CEF build should be setting enable_nacl=false
by default (from gn_args.py). We’d probably want to leave CUPS enabled for the official builds.
Original comment by David Sowa (Bitbucket: david_sowa).
I have built the current master for arm64 using the patch from @{557058:1abc75c9-ed35-467b-9d29-aa6fd2ae20fb} as a guide. There are 2 or 3 little changes needed as the python scripts have changed over time. I would really like to see the arm64 support get finalized as a feature. Is this planned? Can I assist to get this added?
@{5cf13fe3f0a52d0f240668d9} Can you submit a PR with Romain’s patch plus your changes? Thanks.
Original comment by David Sowa (Bitbucket: david_sowa).
I submitted the PR for the arm64 build additions.
Just a side note I started the process on an Ubuntu VM with 64GB of disk which filled up and failed, it succeeded after raising the disk to 100GB. Just to save anyone trying to replicate this a time consuming extra step.
Add ARM64 build and binary distribution support (see issue #1990)
Adds a new --arm64-build
option to automate-git.py and make_distrib.py.
→ <<cset f0c82200ba7f (bb)>>
Original comment by Gutemberg Ribeiro (Bitbucket: galvesribeiro, GitHub: galvesribeiro).
Hey folks!
I know it is pretty late to ask but, the final overcome here looks like we finally have an ARM64 build option. That is awesome! Great work for everyone!
I’m looking on Spotify builds here http://opensource.spotify.com/cefbuilds/index.html and look like we don’t have those pre-built binaries there…
@magreenblatt you mentioned that you could add it there. Is there a chance to have the binaries on it?
Thank you!
Original comment by Fabien Picarougne (Bitbucket: fpicarougne, GitHub: fpicarougne).
Hi everybody.
Builds provided by @{5bdffcbe234047479f9a2264} on the chromely website works very well for my application on a raspberry pi 4. @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} is it possible to have automated builds on spotify as you mentioned it? or @{5bdffcbe234047479f9a2264} is it possible to update your build with the current version?
Thank you very much for the work you have already done.
Linux: Add CEF_INSTALL_SYSROOT env variable for calling install-sysroot.py (see issue #1990)
→ <<cset f2f6ae4f296d (bb)>>
Linux: Add CEF_INSTALL_SYSROOT env variable for calling install-sysroot.py (see issue #1990)
→ <<cset fc9ef34529f1 (bb)>>
ARM/ARM64 build instructions have been added to the AutomatedBuildSetup Wiki page.
Automated ARM/ARM64 builds are now available from Spotify.
Original comment by Frank Pfattheicher (Bitbucket: Frank_Pfattheicher).
Great to hear: Automated ARM/ARM64 builds are now available
Original comment by Chris Frolik (Bitbucket: cfrolik).
The Spotify link posted by @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} currently returns a 404 error. Is there another location where the automated builds are available?
Original comment by Paulo Coutinho (Bitbucket: Paulo Coutinho).
Hi,
It is here: https://cef-builds.spotifycdn.com/index.html
Original comment by kiem duong (Bitbucket: KiemDuong, GitHub: KiemDuong).
Hi,
We have made a video recording/editing android app that targets Chromebook users at https://play.google.com/store/apps/details?id=com.screencastomatic.app.chromebook&hl=vi&gl=US
Since the recorder written by Android doesn't work well on ChromeOS, we decided to
Switch the recorder to the PWA
Reuse the current editing tool written by Android
Now, we can't find a way to combine the PWA recorder and editing tool inside an apk. Can I integrate this CEF deeply into the app that works for recording API?
Note that I use the in-app android webview, it does not support web recording API.
Thanks,
Original report by me.
CEF currently supports building for x86/64 processors only. Chromium supports building for ARM processors [1] [2]. It should therefore be possible to support CEF building for ARM processors.
ARM support will be implemented in stages:
Example of target systems:
[1] https://chromium.googlesource.com/chromium/src/+/master/docs/linux_chromium_arm.md
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=564059