Given that David Humphrey is not really available to work on it currently, lets try again

Based on the following bug supposed to be for a generic DXR :
https://bugzilla.mozilla.org/show_bug.cgi?id=553490

It says to first install Dehydra, let’s go :
https://developer.mozilla.org/En/Dehydra/Installing_Dehydra

I have a redhat5, not necessarily the very last version, but we’ll try.
About that, to configure yum to get packages from local cdrom :

vim /etc/yum.repos.d/local.repo
[local]
name=Local CD Repo
# the appropriate directory is the one that has repodata/repomd.xml as a subdirectory
baseurl=file:///mnt/cdrom/Server
enabled=1
# Don’t test signature. Or else import it
# with : rpm –import /mnt/cdrom/RPM-GPG-KEY-redhat-release
gpgcheck=0

I’ll have to install mercurial packages first :
http://packages.sw.be/mercurial/
Download and then :

rpm -i mercurial-1.7.2-1.el5.rf.x86_64.rpm
rpm -i mercurial-hgk-1.7.2-1.el5.rf.x86_64.rpm
rpm -i mercurial-ssh-1.7.2-1.el5.rf.x86_64.rpm

We must activate the Mercurial Queues Extension. The documentation is here
http://mercurial.selenic.com/wiki/MqExtension
with this about mercurial config files :
http://www.selenic.com/mercurial/hgrc.5.html

I end up doing (no mercurial.ini in my setup, and config files at that location) :

vim /etc/mercurial/hgrc.d/MqExtension.rc
[extensions]
mq =

Let’s check :

hg help
…blah blah…
extensions activées [« Activated extensions »]:
mq manage a stack of patches

Sounds good !

OK, now I need gcc 4.5 which is said to an horror story on redhat, and I can believe that from my previous attempts. Lets try OpenPkg to get a package of that ! Support is here : http://www.openpkg.org/community/support.php some of the doc is outdated since the new version 4 and it’s stricter licence system.

mkdir -p /storage/openpkg
ln -s /storage/openpkg /openpkg
wget http://openpkg.org/go/download/openpkg.src.sh
export FORCE_UNSAFE_CONFIGURE=1 # if running as root
sh openpkg-*-*.src.sh –prefix=/openpkg –tag=openpkg –user=openpkg –group=openpkg
## sh openpkg-4.2.0-20110101.src.sh –prefix=/openpkg –tag=openpkg –user=openpkg –group=openpkg
sh openpkg-*-*.*-openpkg.sh
## sh openpkg-4.2.0-20110101.amd64-rhel5.3-openpkg.sh
vim ~/.bashrc
PATH=/openpkg/bin:/openpkg/sbin:/openpkg/local/bin:/openpkg/local/sbin:$PATH
su – openpkg
/openpkg/bin/openpkg build gcc | bash
# This at the moment gets and install the latest gcc4.5.2. I haven’t found how to get a specific version.
# Even if the documentation says « build gcc45 » is supposed to work, it’s broken

The openpkg licence will be active for 30 days after installation, but the already installed gcc package can still be used after that. Building the package recompiles everything so it takes a while even on a fast machine, but it’s 100% automatized, including dependencies.
If the openpkg licence expires, you can still swicth to another with

su – openpkg
/openpkg/bin/openpkg license list
/openpkg/bin/openpkg license activate [COMMUNITY|EVAL|EXAMPLE]

Next, installing a recent SpiderMonkey without taking all of Mozilla source :
Recent SpiderMonkey is a PITA, because it require python > 2.4 but < 3. 0 ! Fortunately that's what openpkg has : source for python is python-2.7.1-20101205 su – openpkg
/openpkg/bin/openpkg build python

I can download the gz archive from http://hg.mozilla.org/mozilla-central/file/tip/js/ (avoid the bz2 version, just too slow to construct)

#### Give up, it’s broken right, won’t activate JS_METHODJIT and won’t work without it
## wget http://hg.mozilla.org/mozilla-central/archive/0474f6b72e6e.tar.gz
## tar xzvf mozilla-central-0474f6b72e6e.tar.gz mozilla-central-0474f6b72e6e/js
## mv mozilla-central-0474f6b72e6e/js .
wget -O- http://mirror.leaseweb.com/software/mozilla/firefox/releases/4.0b8/source/firefox-4.0b8.source.tar.bz2 | tar xjvf – mozilla-central/js ; mv mozilla-central/js .
cd js/src ; autoconf-2.13
## Had to correct the python detection routine in configure.in : Don’t take python-2.4, do take python-2.7 (trunk has that fix already)
mkdir build-release ; cd build-release
../configure –prefix=~/install_dxr/SpiderMonkey
make ; make install

Next, dehydra, that’s pretty fast

cd install_dxr
hg clone http://hg.mozilla.org/rewriting-and-analysis/dehydra/ ; cd dehydra
export CXX=/openpkg/bin/g++
./configure \
–js-headers=$HOME/install_dxr/js/src \
–js-libs=$HOME/install_dxr/SpiderMonkey \
–gcc-build=$HOME/install_dxr/dehydra/gcc-build


It did avance a lot recently, I’m going to more or less start again from the github version :
https://github.com/mozilla/dxr
https://github.com/jcranmer/dxr/network