Sunday, August 26, 2007

My Tinderbox is working...

Posted by Harishankaran (sp2hari)

Yes, you heard it right. My tinderbox is working. Even now i don't know why i was trying to setup a tinderbox after both Emily and Nags asked me to concentrate on Firefox automation. I felt it was almost done and just few more steps, i will be able to set it up. And that's what finally happened :)

So in this post, i am going to mention about all issues i faced in setting up a tinderbox and steps to fix them.

Note :: If you are ever setting up a tinderbox, be prepared to see huge log files. Like once my compilation ran for few hours and produced a log file of size 15MB. And if you are stuck up, DON'T send the entire file. A tail of that file should do. In fact, you should be in a position to find out from while line the exact error starts.

Yeah before you start reading this and has instructions about how to setup Tinderbox in Solaris environment.

Ok the first error i got was

Building deps for jsinterp.c
ube: error: Assert has been violated at '/set/venus/ 305'.
cc: ube failed for jsinterp.c
gmake[4]: *** [jsinterp.o] Error 2

Dave from Sun china asked me use a patch for Sun Studio 11 Compiler C. I don't have the link to the patch now but the patch id is 121016-05. I remember getting it from the sun website. So searching there should give you the link. The above patch was dependent on patch 120759-06. So installed patch 120759-06 first and then install the patch 121016-05.

Steps to add a patch in Solaris are given below. The commands are for patch 121016-05. Change the id according to the patch you are installing.

1. Download and extract the contents in your current directory
2. Login as root
3. root@home# patchadd 121016-05
Note :: If the above command doesn't work, then try
root@home# patchadd . 121016-05

The above steps should install the patch in your system. To check whether the patch is installed properly, check the folder /var/sadm/patch/. You should see seperate directories for each patch you have installed. In my system here, the /var/sdm/patch is like
# cd /var/sadm/patch/
# ls
120759-06 121016-05

That fixed the above problem :).

The next error i got was

ir2hf: error: Ran out of memory
cc: ir2hf failed for jsinterp.c

Now this is a strange problem and which can be fixed without much issue. You need more RAM. My system had 768MB (512+256) RAM, but you need 1GB RAM to fix this issue. So next day i got 1GB RAM and never got this error back.

After that, i got many compilation errors. This happened because of some issue in the mozilla code. This generally never happens. I got errors in lines having inline. Anyway now i am not getting the error anymore. So i think the mozilla code is fixed now. :)

Finally i got an error saying,

gmake[3]: Leaving directory `/export/home/hari/tinderbox
gmake[2]: Leaving directory `/export/home/hari/tinderbox/SunOS_5.11_Depend/mozilla'
make[1]: Leaving directory `/export/home/hari/tinderbox/SunOS_5.11_Depend/mozilla'
firefox-bin built successfully.
firefox-bin built successfully.
firefox-bin binary exists, build successful.
Unable to find path to Talkback client. Proceeding as if Talkback was not installed.

Running regxpcom test ...
Timeout = 120 seconds.
Begin: Fri Aug 24 08:08:37 2007
cmd = /export/home/hari/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/firefox-bin -register
End: Fri Aug 24 08:08:38 2007
----------- Output from regxpcom -------------
----------- End Output from regxpcom ---------
regxpcom: test failed
No profile found, creating profile.
Begin: Fri Aug 24 08:08:38 2007
cmd = /export/home/hari/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/firefox-bin -CreateProfile default
End: Fri Aug 24 08:08:39 2007
----------- Output from Profile Creation -------------
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

(firefox-bin:6432): Gtk-WARNING **: cannot open display:
----------- End Output from Profile Creation ---------
ERROR: profile /export/home/hari/tinderbox/SunOS_5.11_Depend/.mozilla/firefox/ does not exist
no pref file found

The solution for the above bug was to allow connections to X server. This is done by executing the following command before starting a tinderbox compilation. Remember the user who is running the tinderbox should execute the command.

hari@home:~$/usr/openwin/bin/xhost +
access control disabled, clients can connect from any host

Few other things to note while trying to compile firefox under tinderbox are
1. Never ever run two instances of tinderbox at the same time. Make sure the first one is killed before starting a new one.
2. Delete the SunOS_5.11_Depend folder when you are facing any compilation errors.
3. Use -XO3 for CFLAGS and CXXFLAGS
4. Make sure your mozconfig file has these lines
ac_add_options --disable-freetype2
ac_add_options --disable-debug
ac_add_options --disable-tests

No comments: