Building Geocode-glib

I was trying to build Geocode-glib on Ubuntu 12.04. But I was getting the following error while running ./configure –

configure: error: Package requirements (gio-2.0 >= 2.34
   json-glib-1.0 >= 0.14
   libsoup-2.4) were not met:
Requested 'gio-2.0 >= 2.34' but version of GIO is 2.32.3
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables GEOCODE_CFLAGS
and GEOCODE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Initially I solved the above problem with jhbuild. I used –
jhbuild buildone glib geocode-glib
And jhbuild took care of the version mismatch problem by picking up the gio library from where jhbuild installed it.
I looked into the config.log file in the directory where jhbuild successfully built geocode-glib. It had set  –
PKG_CONFIG_PATH='<where_jhbuild_installed_gnome_modules>/gnome/lib/pkgconfig:<where_jhbuild_installed_gnome_modules>/gnome/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig'
So if you want to build without jhbuild on Ubuntu 12.04, first get the latest glib from http://git.gnome.org/browse/glib and install it. Then you can either do –
./configure <the_flags_you_want_to_set>  PKG_CONFIG_PATH='<where_you_installed_latest_glib>/gnome/lib/pkgconfig:<where_you_installed_latest_glib>/gnome/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig'
or
you can set the environment variables GEOCODE_CFLAGS and GEOCODE_LIBS –
./configure <the_flags_you_want_to_set> GEOCODE_CFLAGS='-pthread -l<where_you_installed_latest_glib>/gnome/include/glib-2.0 -I<where_you_installed_latest_glib>/gnome/lib/glib-2.0/include -I/usr/include/json-glib-1.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2  ' GEOCODE_LIBS='-L<where_you_installed_latest_glib>/gnome/lib -ljson-glib-1.0 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lglib-2.0  '
Note that, the json-glib and libsoup libraries are taken from the default libraries that Ubuntu provides.
Advertisements

Gnome Outreach Program for Women 2013

Well, I applied for it and the result was to come out at 8 pm GMT on December 11. I am ahead of GMT by 5:30 hours. So I had to stay awake till 1:30 in the night to check the result. I decided to sleep.

Had a very uncomfortable sleep towards the end. Had multiple dreams of checking the result on internet, but somehow could not see what it is. Then in the end, I realized – what the hell! this is my dream. Therefore I decided in my dream that I got through it. This dream sequence went on repeating itself for some time. When I could take no more, I got up, booted my laptop, went to the Gnome OPW page, and jumped in the air. 😀 YES!!!! I got through. I am now one of the 20 interns that have been selected to contribute to opensource software projects. For this, I thank my mentor Bastien Nocera who guided me during my contribution and did an awesome code review (one of the best I’ve seen in my limited experience as a software engineer in India).

Did you just say – it was only for women, what’s the big deal about that? Well….when I’ll write a program which you’ll use – we’ll talk that day! 😀

Tryst with Ruby on Rails at Rails Girls Gurgaon

I have all along been coding in C/C++. I did touch perl, tcl etc some times. But let me confess, I enjoyed programming in C more than anything else. But these days I have time and I am upbeat about learning new things. Besides, web and mobile are the new big things now. So I didn’t want to loose one such opportunity when I heard that Rails Girls Gurgaoon (with the help of Thoughtworks, Hoppr and Cloud Foundry) is organizing a free one-day workshop on Ruby on Rails at Gurgaon. We were to get familiarized with the framework, build a simple application and we could host it on either Heroku or Cloud Foundry.

I learnt some basic stuff about Ruby on Rails but need to put them in use before I forget everything about them. Watch this space for my brand new app on Ruby on Rails!!

In the mean time, check out the photos at – Rails Girls Gurgaon, 8 December 2012

Contributing to Geocode-glib in Gnome

I recently to contributed a small patch to Geocode-glib library. It was my first patch and it was definitely thrilling to see my name as the author in the repository. So, let me give you a walk through on what is Geocode-glib and what I did in it.

What is Geocode-glib?

It’s a convenience library for the Yahoo! Place Finder and GeoPlanet APIs. The Place Finder Web service allows to do geo-coding and reverse geo-coding. It’s used by Empathy and Evolution.

What did I do in Geocode-glib?

I hacked on the library’s test program. The test-program earlier did not have any feature to differentiate search results with same name. e.g. if you search with a “Delhi” it would show you results with only latitudes and longitudes. And from that result, you could not differentiate the search results with name “Delhi”.

I came up with a way which would show relevant information along with the place name and its latitude and longitude so that the place can be differentiated. So now if you search with Delhi, it would show –

MyScreenshot

Thus you can differentiate between the places now. Here’s the link to my commit

It was really great to code after such a long time! And now I am wondering, why the hell didn’t I contribute to such projects earlier! But, you know what they say –  better late than never! 😀