Page 1 of 1

webkitgtk - 1 file, 2MB compressed, flash & gxine work too

Posted: Sat 30 Jan 2010, 06:08
by technosaurus
Now that libICU is no longer required I thought I would revisit Midori, but in the mean time I found that the included "gtklauncher" would play youtube and embedded video using gxine and render most webpages quite well while only using ~half the resources as seamonkey

It is VERY basic though - VERY VERY basic, but it will play youtube

I renamed it to webkitgtk since there has already been a gtklauncher in puppy

just extract it anywhere it is a 2.2MB executable
http://puppy-development.googlecode.com ... gtk.tar.gz

Midori could take some time since it may need patched to use glib instead of ICU for unicode

Posted: Sat 30 Jan 2010, 22:09
by technosaurus
Ok, Midori is now built as well

Here is the forum thread
http://murga-linux.com/puppy/viewtopic.php?t=51971

Here is the 2.5MB pet package
http://puppy-development.googlecode.com ... 2.2-92.pet

Posted: Sat 30 Jan 2010, 23:04
by disciple
I saw 2.2 and 2.5MB and thought someone had worked a miracle... but I see you upxed the executables, which made them dramatically smaller :)

If anyone wants to know, both of them fail on 4.1.x with

Code: Select all

./webkitgtk: symbol lookup error: ./webkitgtk: undefined symbol: g_resolver_get_default
Google suggests this is a problem with libsoup... so now we see the downside of building it in statically :)

Posted: Sun 31 Jan 2010, 00:06
by technosaurus
Midori's pet is just over 3MB without being upx'd (its only an 8MB executable) - for binaries over 1MB, upx makes sense, but it doesn't really change the package size significantly (only half a MB here because gzip sucks - a pxt package using xz compressing and non-upx'd binary is only 2.2MB)
Here is the 2.2MB .pxt (xz compressed pet) with midori binary un-upx'd
http://puppy-development.googlecode.com ... 2.2-92.pxt

I can upload a non-UPX'd version so that you can run ldd to see what dependencies are missing - probable the gio/glib difference - it is actually more likely that the shared libraries that are the problem, but nice try - if it were fully static then all the symbols would be there - this is not a fully static build or it would be much larger

I did not link libsoup-2.4 and libwebkit-1.0 against static libraries, which required adding all of their FLAGS to midori so that the shared libraries got linked in (due to limitations of waf). Specifically I added a hack to _build/c4che/default.cache.py so that it would actually build
CHANGED
LINKFLAGS_GMODULE = ['-Wl,--export-dynamic']
TO
LINKFLAGS_GMODULE = ['-Wl,--export-dynamic,-lstdc++,-ljpeg,-lXt,-lsqlite3,-lxslt,-latk-1.0,-lgailutil,-lglib-2.0,-lxml2,-lsoup-2.4,-lwebkit-1.0,-lenchant']
There is probably a better way but this worked and I wasn't prepared to fix the whole waf build system

these are the shared libraries that you need:
linux-gate.so.1, libstdc++.so.6, libjpeg.so.62, libXt.so.6, libsqlite3.so.0, libxslt.so.1, libatk-1.0.so.0, libgailutil.so.18, libglib-2.0.so.0, libxml2.so.2, libenchant.so.1, libm.so.6, libgio-2.0.so.0, libgobject-2.0.so.0, libgmodule-2.0.so.0, libgthread-2.0.so.0, librt.so.1, libgtk-x11-2.0.so.0, libgdk-x11-2.0.so.0, libpangoft2-1.0.so.0, libgdk_pixbuf-2.0.so.0, libpangocairo-1.0.so.0, libcairo.so.2, libpango-1.0.so.0, libfreetype.so.6, libz.so.1, libfontconfig.so.1, libX11.so.6, libssl.so.0.9.8, libcrypto.so.0.9.8, libdl.so.2, libpthread.so.0, libc.so.6, libpng12.so.0, libgcc_s.so.1, /lib/ld-linux.so.2, libSM.so.6, libICE.so.6, libpcre.so.0, libXfixes.so.3, libresolv.so.2, libXi.so.6, libXext.so.6, libXrender.so.1, libXinerama.so.1, libXrandr.so.2, libXcursor.so.1, libexpat.so.1, libpixman-1.so.0, libXau.so.6, libXdmcp.so.6

Posted: Sun 31 Jan 2010, 00:48
by ttuuxxx
Hi techno arora http://code.google.com/p/arora/ is a nice browser, its based on QT, and only needs a few QT libs,
libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0xb651f000)
libQtScript.so.4 => /usr/lib/libQtScript.so.4 (0xb623d000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb5610000)
libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xb54bb000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb51dc000)
Arora and flash 10 work great together also. Fullscreen youtube etc works perfectly, no drag etc.
ttuuxxx

Posted: Sun 31 Jan 2010, 01:27
by technosaurus
I tried arora before - static QT ended up making it pretty HUGE still and required several hacks to build it - it ended up being unstable and seamonkey's size if I remember correctly - that one got flushed with my ram on reboot

did I mention I hate the waf build system - not that it is bad - I just finally figured out how makefiles worked - waf has too much stuff hidden

Posted: Sun 31 Jan 2010, 02:15
by disciple
Sorry, I wasn't suggesting an un-upxed package as well...
I did unupx it and run ldd, which says there aren't any dependencies missing.
if it were fully static then all the symbols would be there
Yes :)

Posted: Sun 31 Jan 2010, 02:17
by disciple
OK, the problem is worse than I thought. I just tried it on my 4.3.1 install, and get the same error. What Puppy is it supposed to be for?

Posted: Sun 31 Jan 2010, 02:33
by ttuuxxx
technosaurus wrote:I tried arora before - static QT ended up making it pretty HUGE still and required several hacks to build it - it ended up being unstable and seamonkey's size if I remember correctly - that one got flushed with my ram on reboot

did I mention I hate the waf build system - not that it is bad - I just finally figured out how makefiles worked - waf has too much stuff hidden
Hmmm when I downloaded it, it was using Qmake and not waf. Ya waf is a bit so so.
ttuuxxx

Posted: Sun 31 Jan 2010, 03:25
by technosaurus
ttuuxxx wrote: Hmmm when I downloaded it, it was using Qmake and not waf. Ya waf is a bit so so.
ttuuxxx
sorry ttuuxxx for confusion - I was still referring to Midori

And I owe everyone a great BIG apology - I forgot that I had to upgrade glib to build libsoup...I will package it up

Posted: Sun 31 Jan 2010, 04:54
by disciple
Wow, midori's really impressive, especially for such an obscure browser. The main downside seems to be just that the sidebar has a minimum width set by the number of (huge) buttons along the bottom :?

Unfortunately neither of these builds supports HTTPS, so they couldn't really replace seamonkey in a puplet. Was that one of the "large extensions" that you left out?

Posted: Sun 31 Jan 2010, 05:03
by technosaurus
https support could be added - it may have required gnutls or a later version of openssl and I was just trying to see if it would build

the HUGE extensions are cookie-manager, web-cache, feed-panel, adblock and formhistory

It would even support html5 audio and video if we had gstreamer

Posted: Sun 31 Jan 2010, 05:11
by disciple
Is it possible for you to post a matching _DEV file for the updated glib please?

Posted: Sun 31 Jan 2010, 06:16
by technosaurus
sure

Posted: Sun 31 Jan 2010, 07:16
by disciple
Great, thanks.

Posted: Tue 27 Apr 2010, 06:16
by earksiinni
Hi technosaur,

Could you explain briefly how you configured the waf scripts to get Midori to link statically?

Posted: Tue 27 Apr 2010, 14:48
by technosaurus
Just compile your libraries that you want to link statically with --enable-static --disable-shared (or the equivalent) ... otherwise you can sometimes just delete the corresponding .so file (for more info see pet packaging 100 & 101)

However midori uses waf which appears to assume that everything is a shared lib so I added them manually

to find out the proper stuff to link in I should have used pkg-config (but actually I easter egged it based on the output)
pkg-config --cflags --libs webkit (or whatever the name of the *.pc file is)

I entered a bug report:
here

Posted: Wed 28 Apr 2010, 05:11
by DaveS
Really glad to see Midori is not being forgotten. I have tried and tried to build this from scratch but the learning curve is steep for a mere user.