Wednesday, 15 February 2012

my efforts to get chromium on rhel5 and more about rpm

I tried to get chromium browser build from source on rhel 5 x86_64 . After a day of struggling i realized that i might hit a road block like others. But in that process i learn couple of things:
If you get this error on centos 5 or rhel 5 when launching gclient, then it means that python version is old and needs to be updated to 2.5 or later.
                              File "/opt/depot_tools/", line 1455
                                        jobs = 1 if sys.platform == 'cygwin' else 8

gclient is the sync tool of the part of depot_tools provided by chromium team to sync the source content after downloading the latest tar file as instructed here.

Then if you upgrade to python2.6 as available in epel repository then you hit a roadblock. The default python is 2.4 which wont work with depot_tools. So you can sym link the python26 to python. This will make depot_tools work but your other tools will fail. most importantly yum wont work any longer. So the solution. rename all references to python in depot_tools to be called as python26 and dont touch default python. I accomplished this by running the command below in depot_tools directory:
for i in `find . -exec egrep -l '/usr/bin/env python$' {} \;`; do
> sed -i 's@#!/usr/bin/env python@#!/usr/bin/env python26@g' $i
> done

and after that in the same directory this, as i noticed that there are some reference to python in files:

for i in `find . -exec grep -l '/usr/bin/env python\\n' {} \;`; do
sed -i 's@#!/usr/bin/env python\\n@#!/usr/bin/env python26\\n@g'$i

 This was the easy part. Now comes the part where i stuck in proceeding:
 Running "gclient sync" in the directory /opt/chromium/src/ might produce the following error when done in rhel 5/centos 5:

Call to 'pkg-config --cflags gio-2.0' returned exit status 1.

The reason for this error is glib2 package in the up to date rhel 5 doesnt have the module gio-2.0 library module. it is provided by a more recent package that is meant for rhel6/centos6. glib2 depends on glibc which in turn depends on glibc-commons. And then there is a circular dependency between glibc and glibc-commons. And these have further dependency on rhel6 version of binutils, prelink and nss.  And all these package version of rhel6 wont install in rhel5. Nobody has backported these packages for rhel5. I dont think anybody will in the near future. So the way out would be to compile them from source. But i read changing glibc is like changing the fundamental system of linux. So will be posting this task to a later date till i figure out the implications of this change. Till then i will stick with the latest version of firefox, which doesnt happen to be such a pain as chromium on rhel 5.

These are some rpm command i learn as a part of trying to get the required dependencies installed:
rpm installlation options:

--replacefiles : usefull if you are installing a later version of pkg in parallel to a older version and hence the file is owned by both the packages and it throws a conflict error.

--replacepkg : install the Package Even If Already Installed

--nodeps : dont do dependency resolution , just install.

These options should not be used unless you know the implication of doing the above.

You can even use yum to install locally downloaded packages and it tried to take care of dependencies also:
yum localinstall /path/to/locally/downlaoded/rpms
yum install /path/to/locally/downlaoded/rpms

yum localinstall is for older version yum and newer verison uses just install.

when doing installation from rpm , and you see something like this,


then , the one in braces mean PayloadIsXz is a module in rpmlib file.


  1. I've tried to build GTK3 on CENTOS 6.x and also hit lots of roadblocks. I'm just thinking that I'm not doing anything wrong... it's just that the system has evolved lots of core libraries and now updating them all at once is surely going to break things.

    I'm thinking it all goes well upwards because the distro is evolving and everybody is adjusting specs here and there whenever somethings gets updated... but going backwards is a major pain.

    Are you aware of any repositories with backports for centos 5/6 ?

    1. Hi gtirloni,

      After this post i stopped putting efforts on getting chrome on rhel5. The easiest way to get chrome on rhel5/centos5 would be use the prebuild package here .I tried this and it works. But you wont get any updated version. The way i found is to use firefox. I am able to get the latest version of firefox to work in rhel5 and i am also able to get firefox updates. I installed the latest firefox from mozilla site.