Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
building webkit-gtk on rpi3 rpi 3 rasberry pi arm arm7 arm8
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
deadram
n00b
n00b


Joined: 20 Dec 2006
Posts: 32

PostPosted: Sun Nov 13, 2016 7:26 am    Post subject: building webkit-gtk on rpi3 rpi 3 rasberry pi arm arm7 arm8 Reply with quote

Hey all, trying to get a decent browser on my new rpi3. Got firefox built, but its awful slow. Checked and its using gpu acceleration... apparently... emerge eats less CPU with MAKE_OPTS="-j4" set! Anywho, chromium didnt compile, and I stumbled on midori, which I think I have a chance at. By the by, using "links -g" and X or gtk in the use, both are enabled globaly but I forget what links needed.

Past couple tries failed after half a day or so (yah, compiling native, my good box got taken over by my wife and son). Searching about the interwebs I found a few tips on getting webkit-gtk to work on an arm. I basically ran these commands, but stuff like opengl, gles1, gles2 are global enabled.

Code:

# compile webkit-gtk with a single thread, somewhere in the interweb this was recommened, i think on the rpi forums, but for slackware
echo 'MAKE_OPTS="-j1" # put this as last line or only makeopts line' >> /etc/portage/make.conf
# disable a bunch of stuff for webkit-gtk only, because past 2 tries have been complaining about gl related compile errors
echo 'net-libs/webkit-gtk -egl -gles1 -gles2 -opengl -gstreamer -geolocation -webgl -introspection' >> /etc/portage/package.use
# Set xorg-x11 as the selected opengl while compiling (should be able to change this later to raspberrypi-userland, maybe...), found on gentoo forums, but for an older webkits version, and an x86, and an nvidia... meh arm, x86 with a real gpu... same diff, lol
eselect opengl list
eselect opengl set 2 # in my case xorg-x11 is 2
# build webkit-gtk, and hopefully eventually epiphany or midori to try out
emerge -uND midori


build fails in webkit-gtk, complaining the first time, cause i needed to "emerge -uND @world" after playing with global use flags, and the second time, because a long long int or something like that isnt a void* XD opengl stuff basically, that the compiler doesnt like or understand.

Anywho, anyone else have success on arm, and hopefully with opengl enabled for acceleration for webkit-gtk? If you can send me your global and package use flags, and any other tips, It really help... especially since each try takes 12 hours or so to fail XD waiting on this try, with most of webkit-gtk disabled, but it will probably be tomorrow afternoon before i know if the above worked.

Dont think Ill be patching the webkit source on this raspberry, but if I have to, Ill setup gentoo and vnc on my real box and see if I cant hack out a patch via cross-compiling or... try to get chromium to emerge instead.

PPS: The rpi3 is an arm8, but most of the firmware is 32-bit as far as I understand anywho. 64-bit kernels are experimental and buggy. Im basically using the arm7 kernel, so an arm8 in 32-bit mode. Running gentoo on a 32GB SD card, 512MB boot, rest gentoo, with 10 times the normal inodes by the way, 28.7GB. Also have a 2x8GB USB sticks as swap/tmp. Still have to setup a raid 0 for the tmp, but X and wmaker and xdm are working fine, and heres output from glxgears with 1 core sitting at 100% building webkit-gtk... hopefully without errors XD

Code:
# glxgears
353 frames in 5.0 seconds = 70.584 FPS
580 frames in 5.0 seconds = 115.933 FPS
569 frames in 5.0 seconds = 113.712 FPS
585 frames in 5.0 seconds = 116.829 FPS
617 frames in 5.0 seconds = 123.230 FPS


Ohh, I purchased the MPG2 and WVC1 hardware codex too, apparently the rpi ships without the hwaccelerator working to cut cost 0.o

------- EDIT --------

So the above changes to use flags got midori to compile, youtube doesnt seem to work and theres a few other small issues, compaired to firefox, but the CPU is sitting nice and quiet, writing this a core will jump to 50%, then swap cores, and with my new config options setting 256MB GPU RAM, Im at about 256MB free out of 1G total. Ill update again if I can get opengl acceleration and video playback and such working.
_________________
echo deadram; fortune
Back to top
View user's profile Send private message
deadram
n00b
n00b


Joined: 20 Dec 2006
Posts: 32

PostPosted: Mon Dec 12, 2016 7:02 am    Post subject: Reply with quote

After playing with firefox, midori, and Dooble, I started trying to compile chromium. Took a week, but I finally got chromium to compile, and it seems to be working, and much faster then the other browsers. I'll be working on getting chromium to compile with rpi-userland opengl, and maybe the proprietary codex, and then I'll setup a patch for chromium to compile on the rpi for the rpi.

There are a few things to keep in mind for the build, and they most likely apply to webkits as well. I keeped all the opengl use flags disabled to compile webkits, but I bet if I used the same trick I used to compile chromium on a webkits build, the opengl stuff would work too.

First I had to edit the /usr/portage/www-client/chromium/chromium-version.ebuild file, to by-pass the RAM requirements. When using z-ram, the linking fails, but if I turn off zram, and have a 5G swapfile the linking is awful slow, roughly 1 day, but it doesn't fail. I doubt this will apply to building webkits, but it might, I never bothered watching the ram requirements on webkits at linking time.

Next I had to add a few typedef's to some .cc files. I forget which ones, but it's basically the ones where the compiler complains and you see GLuint64, or GLint64 in the error. edit the files in the error message and add "typedef unsigned long long int GLuint64;" and "typedef long long int GLint64;" somewhere above the line number the compiler spit out with the error message. I don't think there was anything else left undefined in chromium, but I haven't tried it on webkits, and there might be a few more typedef's to add in.

If you know a little C/Cpp then you should be fine, I'll try to get a patch for chromium together soon (well within thew month, the full compile and linking isprobably about 2 to 3 days). I might bother with a webkits patch too... depending on time, but chromium seems much more stable, and speedy then the other browsers I've tried, and it's based off webkits, but thinned out for portable/arm devices.

Ohh, PS: this is an Rpi3 in 32-bit mode, so basically an arm7. Dono if the arm6's can handle webkits/chromium.
_________________
echo deadram; fortune
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39961
Location: 56N 3W

PostPosted: Mon Dec 12, 2016 9:01 am    Post subject: Reply with quote

deadram,

deadram wrote:
First I had to edit the /usr/portage/www-client/chromium/chromium-version.ebuild file, to by-pass the RAM requirements.

Put
Code:
I_KNOW_WHAT_I_AM_DOING=1
# ... maybe
in make.conf
That makes RAM and build space checks non-fatal.

In 64 bit mode, there is no sound and no video acceleration and for me, no wifi or bluetooth yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
E-Razor
n00b
n00b


Joined: 11 Jul 2004
Posts: 62

PostPosted: Thu Jan 18, 2018 6:05 pm    Post subject: Reply with quote

If anyone is interested, I compiled webkit-gtk natively on RPI3 for aarch64.

I'm using a small shell for weston which simply creates a webkit window.

Sad thing is, even with DRI rendering seems pretty slow :-(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum