Friday, June 29, 2007

Tinderbox ....

You never know when things will work and but if you believe that they will work ,they will. Ha, finally my own quote :P .

The Solaris download which i asked my friend to do failed :-( . Crap . I waited for that for more than 2 days and finally it failed. Now i can't to afford to wait more. I have to proceed with Tinderbox, that too with real pace. With Emily's trip to GUADEC and college reopening soon, i really have to do some magic.

Emily wanted me to update from Solaris Nevada snv_55 to Solaris Nevada snv_64. Even i wanted to see what's new in next version but looks like fate was against me.

As such i had to reinstall my Solaris Nevada snv_55 because while installing i made a stupid mistake of selecting the default options. If you are ever planning to install Solaris, never ever do that. Do choose the custom install . After some two steps it will ask you which hard disk to choose and after that you can edit the partition size. If you fail to do this, Solaris by default allocates only required space to / and rest all to /export/home. For me it ended up having only 400MB free space in / while my /export/home had around 15GB free space :-(. I never wanted to try gparted and other things. A reinstall will fix all the problems and it did.

So finally my partition size fixed and i am ready to start Tinderbox, when the postman gave a parcel for me. It was Solaris Nevada snv_64 from SUN, which i had registered few days back. I didn't know whether to cry or laugh. Felt like banging my head on the monitor. Murphy is GOD . :-)

So made another install of Solaris Nevada snv_64 and finally was ready to start with Tinderbox. Now i had Solaris Nevada snv_64 and all the softwares required. A new and nice thing about this version is a Shutdown button in the start menu. I really missed that in the previous version.


Another small thing about networking in Solaris. If you want your Solaris box to work with dns entries provided, then you should edit the /etc/nsswitch.conf as follows .

A line in /etc/nsswitch.conf will be as follows
hosts: files
Change that line to
hosts: files dns
This will make sure that first /etc/hosts and then dns entires are looked during networking.

The mail from Emily had the following details with this attachment.

Pre-steps
1. Install the latest Solaris Express(s11)
2. Install SunOne Studio compiler
3. Install JDS CBE

1. Set up environment var. (See myenv.sh attached)
2. Check out tinderbox client from community
$ . /path/to/myenv.sh
$ cvs co -d tinderbox mozilla/tools/tinderbox
3. Some modification to be done in the tinderbox source code
1) post-mozilla.pl
$ cd tinderbox; mv post-mozilla.pl post-mozilla.pl.bak
2) tinder-confg.pl (modify the one attached and use it)
$BuildAdministrator = "%YOUR_ALIAS"
$CVS = 'runsocks cvs -q': (only necessary if you use proxy to access Internet)
3) mozconfig (use the one attached)

4, this step is necessary only if you access Internet via proxy
1) build-seamonkey-util.pl(see the patch file build-seamonkey-util.pl.diff)
2) set http_proxy and ftp_proxy in $HOME/.wgetrc since tinderbox client uses wget to send test result to server

5, let's go -- start up your tinderbox client
$ . /path/to/myenv.sh
$ cd /path/to/tinderbox && ./build-firefox.pl --depend -t MozillaTest > ~/build-firefox.log 2>&1 &

So things were really were clear in her mail.
As of now, i was in pre-steps with just Solaris 11 and neither a Solaris studio nor a CBE . So i started with Solaris studio.

The nice thing about Solaris is that the installing a new software is a matter of few clicks. Almost all the installers in Solaris works right out of the box. So with a few seconds i had Solaris studio installed . I had to change my PATH variables like

export PATH=/opt/SUNWspro/bin:$PATH
export MANPATH=/opt/SUNWspro/man:$MANPATH

So after this, you will have to run sunstudio, but i got the following error saying "java 2 SDK not found"
Omg, so now i had to install j2sdk. Downloaded the file "j2sdk-1_4_2_15-solaris-i586.sh" and when i ran that shell script, it created a folder in the current directory with quite a few files.

No i had no clue what to do that. Finally pinging a few of my friends, came to know that i had to set JAVA_HOME and change PATH variable again. I copied the folder that shell script created (j2sdk1.4.2_15) to /opt and had to modify the environment variables as shown below.

export JAVA_HOME=/opt/j2sdk1.4.2_15
export PATH=/opt/j2sdk1.4.2_15/bin:$PATH

Now if you run sunstudio, things work fine :-) . So now 2/3 pre-steps done. The only step remaining is Common Build Environment (CBE).
Now this again wasn't that difficult. The only catch is to give the proper C compiler. As such, i was supposed to use the Solaris compiler that comes along with Sun studio and not gcc. So first time i made a mistake of giving the path to gcc but next time did that fine.

Phew, all pre-steps done. Now to setup tinderbox. All the steps mentioned there worked right out of box. In step 2, it needed the environment variable $CVSROOT. As such $CVS_ROOT was configured in Emily's script. So just changed that to $CVSROOT and things worked fine :-)

Now finally i ran tinderbox and i am not quite sure about the ouput it produced . It surely generates a lot of output . I had no clue what the output meant and what i am supposed to do with that.
The output i got was like

Name "TreeSpecific::clobber_target" used only once: possible typo at ./build-firefox.pl line 33.
Name "TreeSpecific::build_target" used only once: possible typo at ./build-firefox.pl line 31.
Name "TreeSpecific::checkout_clobber_target" used only once: possible typo at ./build-firefox.pl line 13.
Name "TreeSpecific::extrafiles" used only once: possible typo at ./build-firefox.pl line 34.
Possible unintended interpolation of @gmail in string at (eval 318) line 23.
Starting dir is : /root/tinderbox/SunOS_5.11_Depend

tinderbox: tree: MozillaTest
tinderbox: builddate: 1183129260
tinderbox: status: building
tinderbox: build: SunOS/i386 5.11 home Depend trunk
tinderbox: errorparser: unix
tinderbox: buildfamily: unix
tinderbox: version: $Revision: 1.1 $
tinderbox: END

Opening SunOS_5.11_Depend.log
current dir is -- home:/root/tinderbox/SunOS_5.11_Depend
Build Administrator is sp2hari.com
uname -a = SunOS home 5.11 snv_64a i86pc i386 i86pc
AB_CARDCATALOG=/usr/dt/share/answerbooks/C/ab_cardcatalog
ADDON_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:
COLORTERM=gnome-terminal
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
CVS_ROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-zAaS6sa66Z,guid=9c8119a191db027be12633004684e7cc
DESKTOP_STARTUP_ID=
DISPLAY=:0.0
DTAPPSEARCHPATH=/root/.dt/appmanager:/usr/dt/appconfig/appmanager/%L:/usr/dt/appconfig/appmanager/C
DTDATABASESEARCHPATH=/root/.dt/types,/usr/dt/appconfig/types/%L,/usr/dt/appconfig/types/C
DTDEVROOT=
DTHELPSEARCHPATH=/root/.dt/help/root-home-0/%H:/root/.dt/help/root-home-0/%H.sdl:/root/.dt/help/root-home-0/%H.hv:/root/.dt/help/%H:/root/.dt/help/%H.sdl:/root/.dt/help/%H.hv:/usr/dt/appconfig/help/%L/%H:/usr/dt/appconfig/help/%L/%H.sdl:/usr/dt/appconfig/help/%L/%H.hv:/usr/dt/appconfig/help/C/%H:/usr/dt/appconfig/help/C/%H.sdl:/usr/dt/appconfig/help/C/%H.hv
DTSCREENSAVERLIST=StartDtscreenSwarm StartDtscreenQix StartDtscreenFlame StartDtscreenHop StartDtscreenImage StartDtscreenLife StartDtscreenRotor StartDtscreenPyro StartDtscreenWorm StartDtscreenBlank
DTSOURCEPROFILE=true
DTUSERSESSION=root-home-0
DTXSERVERLOCATION=local
EDITOR=/usr/dt/bin/dtpad
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/var/tmp/keyring-a1aGab/socket
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=yes
G_FILENAME_ENCODING=@locale,UTF-8
HELPPATH=/usr/openwin/lib/locale:/usr/openwin/lib/help
HOME=/root
JAVA_HOME=/opt/j2sdk1.4.2_15
LANG=C
LC_ALL=C
LC_CTYPE=C
LD_LIBRARY_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla/dist/bin:
LIBPATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:
LIBRARY_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/components:
LOGNAME=root
MAIL=/var/mail/root
MANPATH=/opt/SUNWspro/man:/usr/dt/man:/usr/man:/usr/openwin/share/man
MOZCONFIG=/root/tinderbox/mozconfig
MOZILLA_FIVE_HOME=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin
MOZ_BYPASS_PROFILE_AT_STARTUP=1
MOZ_CO_DATE=06/29/2007 15:01 +0000
MOZ_PACKAGE_MSI=0
MOZ_SYMBOLS_TRANSFER_TYPE=scp
NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat:/usr/dt/lib/nls/msg/C/%N.cat
NO_EM_RESTART=1
OLDPWD=/root
OPENWINHOME=/usr/openwin
PATH=/opt/csw/bin:/opt/SUNWspro/bin:/opt/SUNWspro/bin:/opt/j2sdk1.4.2_15/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin
PWD=/root/tinderbox
SDT_NO_DTDBCACHE=1
SDT_NO_TOOLTALK=1
SESSIONTYPE=altDt
SESSION_MANAGER=local/home:/tmp/.ICE-unix/316,inet6/home:35165,inet/home:60138
SESSION_SVR=home
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=321
SSH_AUTH_SOCK=/tmp/ssh-XXXAaGNa/agent.316
START_SPECKEYSD=no
TERM=xterm
TZ=Asia/Calcutta
USER=root
WINDOWID=41943093
XFILESEARCHPATH=/etc/dt/app-defaults/%L/%N:/etc/dt/app-defaults/C/%N:/usr/dt/app-defaults/%L/%N:/usr/dt/app-defaults/C/%N:/usr/openwin/lib/locale/%L/%T/%N%S:/usr/openwin/lib/%T/%N%S
XMBINDDIR=/usr/dt/lib/bindings
XMICONBMSEARCHPATH=/root/.dt/icons/%B%M.bm:/root/.dt/icons/%B%M.pm:/root/.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B
XMICONSEARCHPATH=/root/.dt/icons/%B%M.pm:/root/.dt/icons/%B%M.bm:/root/.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B
XPCOM_DEBUG_BREAK=warn
_=./build-firefox.pl
dtstart_sessionlogfile=/dev/null
-->mozconfig<----------------------------------------
# Make flags
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_MODULE="mozilla/tools/codesighs"

# Configure flags
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
ac_add_options --enable-codesighs
ac_add_options --enable-crypto
ac_add_options --enable-xft
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --disable-freetype2
ac_add_options --disable-debug
ac_add_options --disable-tests
-->end mozconfig<----------------------------------------
Didn't find /root/tinderbox/post-mozilla.pl
===============================
Compiler is -- CC
===============================
Begin: Fri Jun 29 20:32:28 2007
cvs -q checkout -P -D "06/29/2007 15:01 +0000" mozilla/client.mk mozilla/browser/config
End: Fri Jun 29 20:32:31 2007
/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/firefox-bin does not exist.
No binary detected; none deleted.
Begin: Fri Jun 29 20:32:31 2007
make -f client.mk checkout
make: Fatal error in reader: client.mk, line 126: Unexpected end of line seen
End: Fri Jun 29 20:32:32 2007
Error: CVS checkout failed.

The last line is scary :-(. Have to ask about that to emily or nags soon. And oh yeah, now that i have setup a Tinderbox in Solaris, i want to setup one in Linux. Just want to see whether it is so easy in Linux. ;). Now i got my confidence back :). I can now really finish lots in integration of Firefox Test cases into Tinderbox before i go back to college. And now i am no more scared of Solaris :-) .

Have to figure out something about the Tinderbox log.
Bye for now.

5 comments:

Anubhav said...

One of the best blogs i have ever read n i pray that this is the last time i read this kinda blog :P

Just wanna "delete" this "TinderBox" thing :P

Common dude, i know u can come up with much better stuff....

And ur quote is cool :)

Harishankaran said...

@anubhav : sorry, you will have loads of blogs coming from me like this :P

i can come up with better things, but that's the best tinderbox could come up with. So better dont "delete" it :P

Thanks about the quote :)

Manas Garg said...

The easiest way to write a blog entry which is long (and which no one will read) is to copy-paste a log file into it. What say?

Anonymous said...

and u actually pasted the entire error log here :O . could have done pastebin .

Harishankaran said...

@manas and @taggy, yeah even i do love to have a long entry. The entire post is not a copy-paste. Just the log file. As such even i was clueless what to do with the log. So pasted it here :P