jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Tue Jul 03, 2012 10:30 am

It seems like I can't edit my old post.

The most recent chromium-browser package in debian unstable has not finished building for debian-armhf yet. The armel build has failed, because of missing vpx symbols when linking. I guess that this problem is partly because of the "use_system_vpx=1" gyp define, which is not being used at all anywhere in the upstream source code or debian patches, so it probably has no effect.
The debian-i386 build succeeded, and I noticed that the build log shows that on i386, libvpx.a is built from a bundled vpx source copy even though "use_system_vpx=1" is set for i386 as well. On debian-armhf, that libvpx.a is not getting built.

My patch from above changes ffmpeg.gyp to add -lvpx to the linker flags if use_system_vpx=1 is set. I don't think this is a correct solution, as src/remoting/base/decoder_vp8.cc (where the linker errors occur) #includes a local-copy vpx header file, so linking against the system vpx library like my patch does is probably a bad idea. A proper solution should probably change the #includes to the system libvpx and then link against it, or make sure the bundled libvpx gets built and linked against.

I'm now building the most recent package (with debian's vpx patch removed, just to see if it breaks anything :mrgreen: ) and have noticed that changing gyp's input.py file (as explained in my old post) is no longer required.

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Thu Jul 05, 2012 6:46 am

This is becoming a monologue, but please let me comment on my progress. ;)

There is good news and bad news.
Good news first:
chromium.png
It works!
chromium.png (56.32 KiB) Viewed 4211 times
Bad news:
I believe that I made no actual progress since my last post, I only figured out some more things. The crashes apparently occur when anything uses javascript, which happens to be pretty much almost any web page and all of the chrome:// tabs.

I used gdb and it showed me this:

Code: Select all

   ┌───────────────────────────────────────────────────────────────────────────┐
  >│0x57232028      movw   r1, #56900      ; 0xde44                            │
   │0x5723202c      movt   r1, #10989      ; 0x2aed                            │
   │0x57232030      ldr    r12, [pc, #624] ; 0x572322a8                        │
   │0x57232034      blx    r12                                                 │
   │[…]                                                                        │
   └───────────────────────────────────────────────────────────────────────────┘
AIUI, movw (and movt as well) is an ARMv7 instruction, which is not supported by the raspi.
Grepping for "movw" showed that (to my surprise) it is apparently contained in some v8 .o files (why are assembly mnemonics in compiled binary files?**). Then a google search later...
[02:15:28] <Hexxeh> getting illegal instruction on pages with JS, is there anywhere that v8 needs to be separately configured for armv6, not armv7?
[02:35:35] <Hexxeh> looks like movw sneaking it's way in somehow
Unfortunately, there was no response.

Maybe the patches used for the v8 package can help here. I will try them later.

** just now it appears to me that v8 is a JIT compiler, so it probably does have "movw" spelled out somewhere as a string.. Just a guess.

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Thu Jul 05, 2012 9:36 am

That's right, yet another post. Sorry. :oops:

I applied parts of the v8 patch by Andy Nichols (good work!), and now chromium works fine on my pi.
The sad thing is, start-up takes 45s from launching until CPU-usage drops below 90% and the chromium "new tab" page is displayed. Then going to raspberrypi.org takes about a minute to load completely, and about 30s into the load time until first content is shown.

A very simple page like blog.fefe.de loads within a few seconds (entering the URL seems to be the most resource intensive part of going to that page).
heise.de took about 30 seconds, and 15 seconds until some parts of the website are visible on-screen. m.heise.de (optimized for mobile phones) loads and renders completely within ~15s.

I was using chromium via vncserver, as there is no screen attached to my raspi.

Attaching my patch that I added to 20.0.1132.43~r143823-1 from debian. It includes parts of Andy's patch. I hope that's legally okay. v8 is licensed under BSD, so I guess it is. debian/rules now needs the following gyp defines:

Code: Select all

ifeq (armhf,$(DEB_HOST_ARCH))
GYP_DEFINES += -DUSE_EABI_HARDFLOAT 
GYP_DEFINES += \
        v8_use_arm_eabi_hardfloat=true \
        v8_can_use_vfp2_instructions=true \
        arm_fpu=vfp \
        arm_float_abi=hard \
        arm_thumb=0 \
        armv7=0 \
        arm_neon=0 \
        $(NULL)
endif
Edit:
Oops, forgot to mention this:
In order for the build to succeed, you also need to get rid of the debian vpx.patch. If I remember correctly, this should work:
quilt pop vpx.patch # this should un-apply everything up to vpx.patch
quilt remove vpx.patch # this should un-apply and remove vpx.patch from the patch queue
quilt push -a # this should re-apply every patch un-applied in step 1
Then you can probably quilt import the patch attached to this post.
Attachments
fix-rpi.patch.bz2
(3.25 KiB) Downloaded 189 times

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Chromium browser build failure

Thu Jul 05, 2012 10:38 pm

Hey, don't worry about the postings. There are many people curious about the progress you are making with Chromium.

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Sat Jul 14, 2012 10:16 pm

The chromium version I used for my last post is now available in Debian wheezy.

Earlier today/yesterday, a new chromium source package, chromium-browser-20.0.1132.57~r145807, was uploaded to Debian unstable. It contains a fix for the vpx patch, so there's no need to remove it from the quilt patch queue any more.

However, the package now uses the gold linker, which is supposed to use less memory and cpu time for linking the chrome executable. Linking appears to be a serious armhf buildd problem, as it takes very long for anything that needs more than 1gb of ram (due to swapping). Gold should help with that, however it failed to link libffmpegsumo.so for me. Not sure where the problem is, it might be with my setup. I disabled the gold linker by changing "binutils-gold," in debian/control to "binutils-gold [!armhf],".

The patch attached to my last post can still be imported and pushed using quilt, and the build succeeds. I think that all the changes in the patch file are still required for raspbian, though I'm not 100% sure about the skia memset one. Apparently, it doesn't hurt for raspbian at least.

Of course, chromium is still slow. Very slow. :(

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Sat Jul 14, 2012 10:21 pm

Can you paste a debian source package (dsc and the files it depends on) somewhere based on the version of chromium-browser currently in sid for me to review. If it looks reasonable i'll push it into raspbian.

centerorbit
Posts: 1
Joined: Tue Jul 17, 2012 10:06 pm

Re: Chromium browser build failure

Tue Jul 17, 2012 10:40 pm

@jui-feng: Would you guess that chromium runs incredibly slow due to high use of software-floating point? Would you expect it to run much faster on raspbian?

Also good work with the compiling and bug tracking. I really like seeing these results.

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: Chromium browser build failure

Tue Jul 17, 2012 10:50 pm

centerorbit wrote:@jui-feng: Would you guess that chromium runs incredibly slow due to high use of software-floating point? Would you expect it to run much faster on raspbian?
if it was due to soft FP, wouldn't it also run slowly on the Squeeze distort? it doesn't.

ren

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Tue Jul 17, 2012 11:01 pm

centerorbit wrote:@jui-feng: Would you guess that chromium runs incredibly slow due to high use of software-floating point? Would you expect it to run much faster on raspbian?
I think that my chromium build was already using hardware floating point, so it's probably not due to software floating point.

I don't know why it is slow. It's taking up all of the CPU for pretty long times. Maybe because I am using it via vncserver? Or maybe because of only 32MB of memory for the GPU? Or maybe something went wrong when compiling it? Or maybe chromium just needs a better CPU to work well (though I read that in squeeze, chromium was faster than midori. OTOH, the squeeze version is pretty old..).

Anyway, I've sent plugwash a link to the source package so he may review my changes. If he finds the time, is satisfied with my patch, and there is some spare build capacity on the raspbian build servers, you might see the chromium-browser package appear in the raspbian repo, so you can check the slowness out for yourself. ;)

marsman2020
Posts: 72
Joined: Sun May 20, 2012 11:26 pm

Re: Chromium browser build failure

Wed Jul 18, 2012 12:20 am

The last version of Chromium I was able to test on the Pi was the version that is in the squeeze repo pointed to by the original 4-19-2012 Debian Squeeze image.

It seemed a tad faster then Midori, so I don't really understand the slowness that you are seeing.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Chromium browser build failure

Wed Jul 18, 2012 12:26 am

marsman2020 wrote:The last version of Chromium I was able to test on the Pi was the version that is in the squeeze repo pointed to by the original 4-19-2012 Debian Squeeze image.

It seemed a tad faster then Midori, so I don't really understand the slowness that you are seeing.
The version in squeeze was truly ancient. It's very possible (likely even) that architectural changes in chromium mean that performance is currently poor on the Raspberry Pi.

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Wed Jul 18, 2012 1:13 am

jui-feng wrote: Anyway, I've sent plugwash a link to the source package so he may review my changes. If he finds the time, is satisfied with my patch, and there is some spare build capacity on the raspbian build servers, you might see the chromium-browser package appear in the raspbian repo, so you can check the slowness out for yourself. ;)
I got your patch and it looks sane, I had some minor issues getting it into the repo (not your fault just little annoyances like a source package that can't do an indep-only build so I had to do a full build on amd64 to get the indep packages built), the source and architecture independent packages are now in the repo and build00 has started building the architecture dependent packages.

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: Chromium browser build failure

Wed Jul 18, 2012 12:55 pm

asb wrote:
The version in squeeze was truly ancient. It's very possible (likely even) that architectural changes in chromium mean that performance is currently poor on the Raspberry Pi.
This is probably an incredibly stupid question but why can't it be built using that version?

ren

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Thu Jul 19, 2012 2:11 pm

I was sent a debdiff by jui-feng which I applied and uploaded to the repo. Unfortunately our autobuilder failed to build it.

http://archive.raspbian.org/raspbian/lo ... rowser.log

Anyone have any idea what the problem might be?

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Sat Jul 21, 2012 12:19 am

The log at the time I made my last post was an old one, I should have checked that. Maybe something killed the buidl-server or something.

So I gave the package back in the hope of getting a log. That build died with an inactivity timeout.

I've now added a zero to the inactivity timeout and given it back again.

Stay tuned, we should hopefully have chromium in the repo soon.

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Sat Jul 21, 2012 8:42 am

plugwash wrote:I've now added a zero to the inactivity timeout and given it back again.
25 hours link time ought to be enough for anybody.

Thanks for your efforts to get this working on the build servers!

maui
Posts: 25
Joined: Sun Jul 08, 2012 10:10 am

Re: Chromium browser build failure

Sat Jul 21, 2012 4:46 pm

The news of Chromium browser on the Pi even got to engadget ;)

http://www.engadget.com/2012/07/19/chro ... available/

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Sat Jul 21, 2012 5:36 pm

That post on engadget is reffering to hexxeh's builds of chromium beta's. This thread is about getting a chromium build that matches debian's as closely as reasonable into our repository.

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Sun Jul 22, 2012 11:28 am

chromium is now in the repository and according to jui-feng it works.

jui-feng
Posts: 57
Joined: Sun Mar 04, 2012 11:02 am

Re: Chromium browser build failure

Sun Jul 22, 2012 11:38 am

I'm posting this from chromium in vncserver running on my Raspberry Pi, and everything is rather slow.

If you've used Hexxehs chromium build (which is v22) and want to try chromium from the repository (which is v20), it will complain about your existing profile. I removed the ~/.config/chromium directory to fix that warning.

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: Chromium browser build failure

Tue Jul 24, 2012 1:06 pm

Loaded Chromium tonight after I found it in the updates. Found something quite curious:

Configuration =
(1) HDMI main screen (:0), own keyboard & mouse (wireless iPazzport kbd/mouse ex ebay, actually :D )
(2) tightvncserver running, with separate (:1) screen showing by vnc on my laptop

Start chromium on native screen (:0). Starts normally. Shows on main screen.
Now start chromium from vnc screen. This second invocation of chromium shows on screen :0 !!!

Start over:
First chromium on VNC screen. Normal. Shows on vnc screen.
Start second chromium from main screen :0. The second chromium actually shows on the vnc screen.

Is chromium always perverse like this? or only on a rPi? or only on Raspbian?

plugwash
Forum Moderator
Forum Moderator
Posts: 3453
Joined: Wed Dec 28, 2011 11:45 pm

Re: Chromium browser build failure

Tue Jul 24, 2012 1:57 pm

My guess would be that like many web browsers it tries to avoid starting a second instance of itself instead opening a new window from the existing instance but when it does that it doesn't get that one user can have multiple X sessions.

You could probablly work arround the issue by using different users for the main screen and the VNC screen.

Return to “Raspbian”