HOWTO: Compile Midori From Source In Ubuntu
UPDATE: If you want Midori but don’t care for the building, there’s now a Midori PPA for that.
You know you want to do it. You know your friends want to do it. You’ve heard stories of people that have done it. We’ve all wanted to do it — compile a program from source. One of the ultimate goals of any geek to own a computer, compiling a program from source just gives you that geek street cred you’ve always wanted. Now you can have it!
I’m going to show you how to get the Midori browser from source. Midori is a project is headed up by Christian Dywan over at TwoToasts.de. I don’t what has happened, but the version packaged up in the Ubuntu repositories is sorely out-of date at v0.0.18. Midori went 0.1.0 on October 2008.
If you want to build from source, you’re going to need to get used to dev packages. If you’ve ever browsed through the Synaptic Package Manager, you may have noticed something along the lines of package.a followed by a package.a-dev. Those -dev packages are usually the source files. If you don’t see them, go to System > Administration > Software Sources and be sure that you have the box next to Source Code checked.
We’re also going to need a more recent version of the webkit libraries than what’s in the main Ubuntu repositories. That’s where Canonical’s Launchpad comes into play. Launchpad is a place for people to collaborate over code, and is often used to package up more recent versions of the packages shipped with Ubuntu.
First we’ll add the Launchpad’s Webkit Team’s PPA repository to Apt:
sudo echo deb http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main >> /etc/apt/sources.list
sudo echo deb-src http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main >> /etc/apt/sources.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 612d9fe65c733a79bb2ab07d991e6cf92d9a3c5b
Next, we need to refresh Apt’s package list
sudo apt-get update
Now we’ll install all the dependencies we need (and some optional ones)
sudo apt-get install intltool libgettext-ruby-util libglib2.0-dev libgtk2.0-dev libidn11-dev libsqlite3-dev libunique-dev libwebkit-dev rst2man
Now we need to get Midori’s source code and extract it:
cd /usr/src
sudo wget http://goodies.xfce.org/releases/midori/midori-0.1.6.tar.bz2
sudo tar xjf midori-0.1.6.tar.bz2
Now it’s time to build!
cd /usr/src/midori-0.1.6
sudo ./waf configure
At this point you may notice the optional hildon package has failed. DON’T INSTALL THIS IF YOU ARE USING GNOME OR KDE! You’ll be missing your menu bar and your main toolbar will be at the bottom if you do.
sudo ./waf build
If all goes according to plan, way to go! One more step to go.
sudo ./waf install
If you ever want to build again, you’ll need to run this command before you start the configure-build-install routine.
sudo ./waf clean
Congratulations! You just compiled a web browser from source!
Miguel Guerreiro 6:28 pm on July 28, 2009 Permalink |
Thanks dude, using Mandriva and ended up compiling this, I didn’t knew these “new waf” commands.
Como compilar o Midori | Perspectivas Abertas 8:56 am on July 30, 2009 Permalink |
[…] Pronto, está feito. O último passo não é propriamente essencial, mas não faz mal a ninguém por isso façam-no. Já podem usar um browser leve e moderno. Claro, existe versão para Windows, mas para esse é a tanga do costume, next->next->next. Fonte. […]
brainwreckedtech 5:05 am on July 31, 2009 Permalink |
If it looks almost Spanish, and Google translate picks up only a few words, it must be Portuguese.
Crappy Google Translation:
[…] Done is done. The last step is not strictly essential, but not hurt anyone so to do it. Can already use a light and modern browser. Of course, there is version for Windows, but for that is the thong custom, next-> next-> next. Source. […]
OK, I can understand getting robotic Internet Speak from a computer, but that doesn’t explain “thong custom.” What have you guys been teaching Google Translate? 🙂
Miguel Guerreiro 4:54 pm on July 31, 2009 Permalink |
Yes, thats right Portuguese .-)
Thoon Custom, is not by close what I wrote, well I guess “old fashion” is a pretty good translation of “tanga do costume” in this context.
Ok, we maybe should spend a little more time with google…
pR@tz 2:42 am on August 10, 2009 Permalink |
After running ./waf configure I encountered an error like this. (Have googled and googled, but couldn’t solve it).
Checking for Python : 033[92m/usr/bin/python033[0m
Checking for WAF : 033[92m/home//install/midori-0.1.9/waf033[0m
calling waf configure with parameters
Checking for program gcc : ok /usr/bin/gcc
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for gcc : ok
Checking for program glib-genmarshal : ok /usr/bin/glib-genmarshal
Checking for program glib-mkenums : ok /usr/bin/glib-mkenums
Checking for program rst2html.py : not found
Checking for program rst2html : ok /usr/bin/rst2html
Checking for program msgfmt : ok /usr/bin/msgfmt
Checking for program intltool-merge : ok /usr/bin/intltool-merge
Checking for header locale.h : ok
Checking for program rsvg-convert : ok /usr/bin/rsvg-convert
Checking for unique-1.0 >= 0.9 : ok
Checking for libidn >= 1.0 : ok
Checking for sqlite3 >= 3.0 : ok
Checking for library m : ok
Checking for gmodule-2.0 >= 2.8.0 : ok
Checking for gthread-2.0 >= 2.8.0 : ok
Checking for gio-2.0 >= 2.16.0 : ok
Checking for gtk+-2.0 >= 2.10.0 : ok
Checking for webkit-1.0 >= 1.1.1 :
/home//install/midori-0.1.9/wscript:172: error: the configuration failed (see ‘/home//install/midori-0.1.9/_build_/config.log’)
Can you help me?
brainwreckedtech 4:40 am on August 10, 2009 Permalink |
Keep in mind this was for Midori 1.6. I see you’re using Midori 1.9, so I hope nothing went wrong with the release.
You ran the installer with root privileges (sudo), right? What does config.log say? I notice the double-slash, but most of the time Linux ignores it. Should either be in /home/[username]/install or /home/install. If /home/install doesn’t exist, try creating it and running ./waf configure again to get the log.
Looks like something crashed with libsoup. Do you have libsoup2.4-dev installed? If not, let me know and I’ll update. I thought it’d be installed by default on an Ubuntu machine, but I could have very well had it installed as a dependency to another program and not know it.
A successful compile should look like this:
[removed in favor of updated midori configure output]
brainwreckedtech 4:51 am on August 10, 2009 Permalink |
I just uninstalled midori 0.1.6, downloaded, configured, compiled, and installed midori 0.1.9, and everything went OK.
The completed configure is a bit shorter, but your’s still stops at libsoup.
Checking for program gcc : ok /usr/bin/gcc
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for gcc : ok
Checking for program glib-genmarshal : ok /usr/bin/glib-genmarshal
Checking for program glib-mkenums : ok /usr/bin/glib-mkenums
Checking for program rst2html.py : not found
Checking for program rst2html : ok /usr/bin/rst2html
Checking for program msgfmt : ok /usr/bin/msgfmt
Checking for program intltool-merge : ok /usr/bin/intltool-merge
Checking for header locale.h : ok
Checking for program rsvg-convert : ok /usr/bin/rsvg-convert
Checking for unique-1.0 >= 0.9 : ok
Checking for libidn >= 1.0 : ok
Checking for sqlite3 >= 3.0 : ok
Checking for library m : ok
Checking for gmodule-2.0 >= 2.8.0 : ok
Checking for gthread-2.0 >= 2.8.0 : ok
Checking for gio-2.0 >= 2.16.0 : ok
Checking for gtk+-2.0 >= 2.10.0 : ok
Checking for webkit-1.0 >= 1.1.1 : ok
Checking for libsoup-2.4 >= 2.25.2 : ok
Checking for libxml-2.0 >= 2.6 : ok
Checking for header unistd.h : ok
Localization: yes (intltool)
Icon optimizations: yes (rsvg-convert)
Persistent history: yes (sqlite3)
IDN support: yes (libidn)
User documentation: yes (docutils)
API documentation: no (gtk-doc)
Configuration finished successfully (00:00:00); project is now ready to build.
pR@tz 5:02 am on August 10, 2009 Permalink |
Thanks for the reply. Well, there are two problems with ./waf configure . One is “Checking for program rst2html.py : not found” and I downloaded and installed docutils to solve it.
Second one is, I think it is the problem with libwebkit (I think my version of libwebkit is not greater than 1.1.1, btw I am using Xubuntu Jaunty). I am trying to install a later version of the same and try the compilation again.
Thanks again for the replies. Will come here to update the developments. 🙂
pR@tz 6:57 am on August 10, 2009 Permalink |
Well, the problem was with the outdated libwebkit. I have now updated my system to karmic (unstable) and tried ./waf configure and it worked!
(lemme now backup files and revert it back)
Thanks a lot… 🙂
brainwreckedtech 12:59 pm on August 10, 2009 Permalink |
Wow, I completely missed the missing “ok.”
This is one of the things that drive me nuts about Linux – package names often contain version numbers. It’s done so that multiple versions can exist on one system, but can lead to confusion.
When I saw
Checking for webkit-1.0 >= 1.1.1
I read that as “I require webkit 1.0, you have webkit 1.1.1” not as “I require webkit-1.0 (the package) 1.1.1 (the version) or greater.”
Cristian 9:19 am on June 16, 2010 Permalink |
Thanks for the help, it worked like a charm!
Just a litte tip for you… update your ‘howto’ text. Midori has reached version 0.2.6.
Thanks again!!
Cristian 9:21 am on June 16, 2010 Permalink |
Sorry for the above typo. litte=little
BrainwreckedTech 2:04 pm on June 17, 2010 Permalink |
It’s too much to keep up with different versions of Ubuntu and Midori. The best thing is to keep the information in tact, so people know that the information might be outdated.