New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 635477 link

Starred by 4 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: ----



Sign in to add a comment

Native build on Linux/ARM is broken

Reported by industr...@gmail.com, Aug 8 2016

Issue description

Machine: Asus FlipBook C100PA
CPU: ARMv7 (Rockchip RK3288, 1.7Ghz, 4 Cores)
RAM: 4Gb
OS: Gentoo Linux
Version: Latest

Try to do native (NOT cross-compile!!!) build of chromium on ARM machine under Linux.

Build failed with message :

Chrome configure/build:
Running ['/var/tmp/portage/www-client/chromium-54.0.2810.2/work/chromium-54.0.2810.2/third_party/ffmpeg/configure', ... '--extra-cflags=-march=armv7-a', '--enable-cross-compile', '--target-os=linux', '--cross-prefix=armv7a-cros-linux-gnueabi-', ...]
armv7a-cros-linux-gnueabi-gcc is unable to create an executable file.
C compiler test failed.


Expected result: build succeeded

The problem is in third_party/ffmpeg/chromium/scripts/build_ffmpeg.py.
It's assumed that for the ARM architecture is always only cross-compilation.
But there are enough powerful ARM machines which can perform build of chromium.
Here is small patch that enables native build on ARM machines.

PS: Sorry for bad english 
 
chromium-bundled-ffmpeg-native-arm-build.patch
1.4 KB Download
Cc: dalecur...@chromium.org sbc@chromium.org
Labels: -Restrict-View-Google
I don't think anyone else is doing arm builds on an arm hot, there's probably a lot of stuff not working.

sbc had a x86->arm cross bot for regular linux builds somewhere, but I don't remember where and I'm not sure if it survived the gn transition.

cc'ing dalecurtis for the ffmpeg patch
Everything is working fine. Incuding Hangouts and PepperFlash plugin.
Currently i'm writing this post from chromium built directly on my ARM-netbook.

ChromeLinuxARM.png
126 KB View Download
Happy to take the patch, but please upload it following the directions here:

https://www.chromium.org/developers/contributing-code
The Linux ARM bots "survived" the GN transition in that they were broken before and are broken after :). There's a builder on the FYI waterfall and a trybot. But, yeah, sbc@ was pretty much the only one who cared about them, and they were x86->arm as you say.
Better late than never :)
https://chromium-review.googlesource.com/c/446345/
Who can I ask to review?
OOC, why are you trying to use build_ffmpeg.py? We really only use that when we want to change the ffmpeg build flags; but most users don't need to do this. Are you trying to enable your own set of codecs?

Comment 7 Deleted

Comment 8 Deleted

No! The only thing i want to change is the logic of detection of cross-compilation.
Right now when building for ARM-target under Linux build_ffmpeg.py always thinks it should use of cross-compilation. But this is wrong when host (build) machine is ARM itself
But build_ffmpeg.py is never called automatically, so I don't understand how it's being run... If you're not modifying Chrome's copy of ffmpeg there's no need to use this script.
It always called when I'm trying to emerge chromium on my ARM-machine. And it always falling with message "armv7a-cros-linux-gnueabi-gcc is unable to create an executable file." 

Comment 12 Deleted

Anyway logic in build_ffmpeg.py is completely wrong - we should not assume that we need cross-compilation when doing realy native build.
Here's how build_ffmpeg.py called:

        # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
        einfo "Configuring bundled ffmpeg..."
        pushd third_party/ffmpeg > /dev/null || die
        chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
            --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die

Yeah patch is fine either way, just curious how it was being used. Looking at the ebuilds which use this, that code is sketchy. Instead they should just set the normal ffmpeg_branding defines and patch ffmpeg_options.gni to disable assembly for ia32 pic (if that's really necessary??? PIC+IA32 should be fine).
Project Member

Comment 16 by bugdroid1@chromium.org, May 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/d5d95caef9305b6adfc14ee92b71430b6ee2dd1c

commit d5d95caef9305b6adfc14ee92b71430b6ee2dd1c
Author: Igor Baranov <industrium@gmail.com>
Date: Thu May 25 20:56:03 2017

Enable native builds on Linux on ARM 

Previously it was only possible to cross-compile for ARM. 
Now it's possible to build for ARM on ARM.

BUG=635477

Change-Id: Ibf084f2d148addc5f34b000f37838bfc8df70160
Reviewed-on: https://chromium-review.googlesource.com/446345
Reviewed-by: Chris Watkins <watk@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>

[modify] https://crrev.com/d5d95caef9305b6adfc14ee92b71430b6ee2dd1c/chromium/scripts/build_ffmpeg.py

Sign in to add a comment