Google Chrome(chromium) on ARM: the return

Hi,

So as i posted previously,

i got to build www-client/chromium on ARM. However all the javascript-enabled webpages didn’t work. That was because we(us and Ubuntu) we’re disabling v8 building, which as you may know, its chromium’s javascript engine. So obviously javascript wouldn’t work.

So it was easy to enable it, but there was two problems. For some reason, there’s some parts of the v8 code that forces to use the -m32 flag, which is for building 32bits binaries on 64bits systems. ARM is 32bits, so that flag doesn’t exist. To be honest i’m not sure what its doing there. Maybe i’m not getting the logic of it. If you build stuff for arm on a 64bits system, you need to use a crosscompiler. That ARM crosscompiler AFAIK doesn’t support -m32. However for compiling for x86 on a amd64 system you don’t need a crosscompiler, but you need to use -m32, am i wrong? Then i don’t see the point on using that…
Anyway, the bugs are filed upstream: here and here. Meanwhile in the 9999 ebuild i’ll apply a hackish patch.

The second problem is that the build of v8 on armv5te segfaults:

g++ -Os -march=armv5te -pipe -Os -march=armv5te -pipe -pthread -fno-exceptions -Wall -D_FILE_OFFSET_BITS=64 -O0 -g -fno
-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -D__ST
DC_FORMAT_MACROS -DDISABLE_NACL -DV8_TARGET_ARCH_ARM -DCHROMIUM_BUILD -D_DEBUG -DDEBUG -DENABLE_DISASSEMBLER -DV8_ENABLE_
CHECKS -Iv8/src -MMD -MF out/Debug/obj.host/mksnapshot/v8/src/mksnapshot.o.d.tmp -c -o out/Debug/obj.host/mksnapshot/v8/s
rc/mksnapshot.o v8/src/mksnapshot.cc
g++ -Wl,-O1 -Wl,-O1 -pthread -rdynamic -o out/Debug/mksnapshot -Wl,--start-group out/Debug/obj.host/mksnapshot/v8/src/m
ksnapshot.o out/Debug/obj.host/v8/tools/gyp/libv8_nosnapshot.a out/Debug/obj.host/v8/tools/gyp/libv8_base.a -Wl,--end-gro
up -lrt
export LD_LIBRARY_PATH=/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/lib.host:/var/tmp/portage
/www-client/chromium-9999/work/chromium-9999/out/Debug/lib.target:$LD_LIBRARY_PATH; cd v8/tools/gyp; mkdir -p /var/tmp/po
rtage/www-client/chromium-9999/work/chromium-9999/out/Debug/obj.target/geni; "/var/tmp/portage/www-client/chromium-9999/w
ork/chromium-9999/out/Debug/mksnapshot" "/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/obj.target/geni/snapshot.cc"

#
# Fatal error in v8/src/arm/assembler-arm.cc, line 1795
# CHECK((instr & (7*B25 | P | U | B | W | 15*B16 | Off12Mask)) == (2*B25 | P | U | pc.code()*B16)) failed
#

/bin/sh: line 1: 26922 Aborted "/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/mksnapshot" "/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/obj.target/geni/snapshot.cc"
make: *** [out/Debug/obj.target/geni/snapshot.cc] Error 134
*

If anyone knows what that means, i would be glad to hear :) On the other part, it builds on armv7. So that makes me think that v8 only works on ARMv7…but i’m no ARM assembler or expert or anything, so i can’t tell… Could be that the softfloat armv5tel toolchain is doing something wrong…but looks unlikely considering nothing else fails…

Here’s a pic of it working finally on armv7(the red dots as always are kindly added by my graphic card :):

So yeah, we now have a 100% working www-client/chromium on ARM natively, only on armv7 though. But i’m pretty sure nobody wanted a browser on armv5te that didn’t had javascript, so…better than nothing :)

Here’s the binary for armv7a: http://dev.gentoo.org/~armin76/arm/chromium-9999_armv7a.tbz2

About these ads

12 Responses to “Google Chrome(chromium) on ARM: the return”

  1. Christopher Friedt Says:

    very cool – I’ll be working on this as well very soon.

  2. Christopher Friedt Says:

    I just thought I would let you know, that you don’t need -m32 on ARM… all ARM machines are 32-bit (except for thumb code, but that requires -mthumb-interwork). There are a few architectures that use either -m32 or -m32-bit but ARM is not one of them (see ‘man gcc’).When cross-compiling for ARM. Even if your build system is a 64-bit system, you still don’t need -m32.

  3. Google Chrome/Chromium keyworded ~arm(the definitive post) « Armin76's Blog Says:

    [...] Armin76's Blog Gentoo « Google Chrome(chromium) on ARM: the return [...]

  4. lince Says:

    Thank you very much for sharing this :)

  5. spbmap Says:

    Look nice
    I try port it on my Ubuntu Toshiba AC100 Tegra
    ldd chome get log

    libmime3.so.12 => not found
    libplds4.so.8 => not found
    (other not founded)

    libjpeg.so.7 => not found

    Why you used to libjpeg.so.7 ? Why not version 8 ?

  6. spbmap Says:

    I had resolved problem with the libs besides libjpeg.7.
    At first library was been not found. I did link on libjpeg.8.0.2
    ln /usr/lib/libjpeg.so.8 /usr/lib/libjpeg.so.7. After that I get a some message – version `LIBJPEG_7.0′ not found (required by ./chrome)
    I had seen header of lib. Indeed in first string of lib file’s there is string – LIBJPEG_8.0. I had did link but inside of the file version wasn’t changed.
    I not find source code libjpeg7 and I take libjpeg8.
    After had change libjpeg.map from LIBJPEG_8.0 to LIBJPEG_7.0 and after recompiling version was changed.
    But I get again same message about error!
    What wrong? where I missed some update of file?

  7. Mike Staszel Says:

    Whoops, the link should be https://github.com/archlinuxarm/PKGBUILDs/tree/master/aur/chromium-dev

  8. Ed Hemphill (@trailrun33) Says:

    Here is a newer blog post I did on V8 cross compile for ARM, for those that need it. http://www.wigwag.com/devblog/?p=172

  9. Ed Hemphill (@trailrun33) Says:

    I ran into a similar issue with node.js 0.7.0 recently, which uses Chromium’s .gyp files. Long story short, it build on arm7 because there is a variable set called ‘armv7′ which if ’1′ is going to build using NEON and vfp3. On most armv5 processors you don’t have that – so you need to modify the .gyp file to fix this.

    Details are here: http://www.wigwag.com/devblog/cross-compile-node-js-for-arm/

  10. Raivis Jaunroze Says:

    hi there, I understand this is old as can be – BUT is there any way to get some bash history how to build chromium browser on arm v7 ? i can croscompile or compile on same arm ? – i have cubietruck with debian 3.4 kernel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: