Writing software, the wrong way

Monday, March 24, 2008

Building OpenKomodo

I use OpenKomodo on windows all the time. It is a nice IDE for javascript and detects formats that you use in Mozilla development like .idl and .xul. The only bad thing about it is that it has a lot of Mozilla 1.8 (Firefox 2) memory problems. You can go over 700 megabytes just by doing nothing.

I wanted to have it here on my Linux box, but they do not offer a 64bit version of OpenKomodo. But because they released it late last year, I can build it. The experience was a little... refreshing. Reminded me of building Firefox for the first time.

If you can build Firefox, you should be able to build Komodo. The steps to build are outlined on their svn's README.txt. I'll have to hand it to them for getting something out in 3 months :)

There are a few things that I stumbled on when doing this that I will note here :

  • There build searches for your distro. I got an error :
    platinfo.InternalError: Could not determine distro & release from first line of
    '/etc/bluewhite64-version' (Bluewhite64 12.0.0).

    I had to add "Bluewhite64": re.compile("^Bluewhite64 ([\d\.]+)"), to line 583 of util/platinfo.py and later src/release/codeintel/support/platinfo.py.

  • I had to build python because they only offered the x86 binary. Two mistakes I made were trying to have it find python on my system and symbolic linking python. At one point during the install, something was taking a lot of time and disk was spinning like crazy. I stopped and looked and it was copying everything in /usr to some other directory. A time consuming process indeed.
    To solve this, I :

    1. got python 2.5 source
    2. created a folder in my home directory called root: mkdir $HOME/root
    3. untarred and configured python with --prefix $HOME/root and --enable-shared
    4. compiled. Then I went to $HOME/root and zipped up the contents : zip -r linux-x86_64.zip .
    5. Copied linux-x86_64.zip to mozilla/prebuilt/python-2.5/


  • Undefined reference to X...., was a already patched but not committed bug.

  • There is something in linux-x86.zip python binary that isn't in the linux-x86_64.zip binary we created. Had to unzip lib/python2.5/site-packages/activestate.py from linux-x86.zip and copy it to build/cvs1.8-ko4.3/mozilla/ko-rel-gtk2-ns-shared-tools/dist/python/lib/python2.5/site-packages/

  • I had to explicitly say the version : bk configure -V 4.3.0-devel

I hope this is useful for anyone else who wants to build it.

No comments: