About Unix and Linux

Friday, July 08, 2005

Compiling svn 1.2.1

Subversion can be downloaded from subversion.tigris.org. After downloading the subversion-1.2.1.tar.gz file

tar xf subversion-1.2.1.tar.gz
cd subversion-1.2.1
./configure --prefix=/work/svn

Note that SVN uses Berkeley DB as its backend. If we dont use Berkeley DB there is some other default that is used. I wasn't able to get SVN compiled with Berk DB even with the --with-berkeley-db option to configure so I am using the default

Compiling berkeley db 4.3

Berkeley DB 4.3 can be downloaded from www.sleepycat.com. The following instructions can be used to compile and install it on Solaris.

tar xf db-4.3.28.NC.tar.gz
cd db-4.3.28.NC/build_unix
../dist/configure --prefix=/work/db
make
make install

My PATH is defined in ~/.bash_profile as follows
PATH=/opt/SUNWspro/bin:/opt/onbld/bin:/usr/sfw/bin:/usr/ccs/bin:$PATH
The /usr/ccs/bin dir contains all the SUN link time commands(ld, ar etc). So thats needs to be there in the PATH. (/usr/sfw/bin contains all those utilities but they are named gld, gar etc to specify their gnu roots. SUN did a good think doing that. This separates out all the utilities cleanly).



Compilation success

After getting bitten by a non bootable cd drive(LTN 403. please avoid it like the plague), burning lots of cds of the wrong release and finally getting the right one I have been blessed with success on the matter of compiling the Solaris kernel. This article at www.opensolaris.org gives a fairly decent overview of the whole process so there is no need for me to go into that here. A concise series of steps would be


cd testws
nightly ./opensolaris.sh&
[... really!!!! do something else here ..... It took 6 hrs or so for me for the compile]
Install -k i86pc -G mykernel
[ tar file created at /tmp/Install.user-id
/Install.i86pc.tar ]
su
[login as root]
cd /platform/i86pc
rm -rf mykernel
mkdir mykernel
(cd kernel; tar cf - .) | (cd mykernel; tar xf -)
cd /
tar xf /tmp/Install.
user-id/Install.i86pc.tar
echo "platform/i86pc/mykernel" >> /boot/solaris/filelist.ramdisk
reboot -- mykernel/unix

After reboot grub gives you a "Solaris_reboot_transient" entry for default boot. On hitting enter it will boot the mykernel/unix image. You can verify that by looking at the version of the solaris kernel during boot time and seeing that it matches what was specified in opensolaris.sh or by doing a uname -a after you login.

Note. do not do "cp -R kernel mykernel" to create a copy of kernel objs for the new kernel. This didnt work for me. I dont know the reason.