Development with JDS-CBE on Solaris 10 for Fun and Profit part II – lets use it to make vim
Posted in OpenSolaris, OpenSource, Packaging, Solaris & OpenSolaris, SunStudio on March 4th, 2008 by Michal BielickiAs always there are some assumptions from my side. You read the part I article, you know the standard solaris pkgadd, pkginfo and pkgrm tools, you have at least heard of the subversion revision control system, environment variables do not scare you and a PATH is not a road through the woods. Oh yes and ‘jdsuser’ is the user I assume you setup correctly according o part I.
This part actually does not make much difference between Solaris 10 and SXCE and I think Indiana neither, but what the heck, I will describe the latter two scenarios in part III and IV, sicne especialy for Indiana you will want to know how we can help you with creating IPS packages. Anyway, lets the games begin.
First lets get into the right environment, so lets do:
. /opt/jdsbld/bin/env.sh
feels much better now that we have the right VARS and PATH set.
Now lets get the SFE repository. Create a nice directory where you want to keep all your project files. Change into it and do:
svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE
after a while of downloading you should now have a complete copy of the SFE repository. A a first example we will build a package of VIM.
Change into the freshly created SFE repo directory, and build the package. Since we want to build a package that can be transferred to other machines we have, lets make the package a one file package in datastream format. Since vim depends on cscope and ctags and pkgtool will not let us build packages whose dependencies haven’t been met, we add SFEctags.spec and SFEcscope.spec to the end of the line to build it as well.
Here we go
cd SFE
pkgtool --interactive --download --pkgformat=ds build SFEvim.spec SFEctags.spec SFEcscope.spec
After some downlaoding, some compiling we should now have a package called SFEvim.pkg in ~/jdsuser/packages/PKGS/SFEvim.pkg, which we can install and copy to other solaris 10 boxens to be installed there as well as usual with pkgadd. On our box its already installed. Would we have wanted not to install it, pkgtool would have required the command build-only instead of build, and we would have had to build and install SFEctags and SFEcscope first and than just create the SFEvim package.
Congrats for building your first SFE based SVR4 package.
Blogged with the Flock Browser
Development with JDS-CBE on Solaris 10 for Fun and Profit part I – installation and setup
Posted in OpenSolaris, OpenSource, Packaging, Solaris & OpenSolaris, SunStudio on March 3rd, 2008 by Michal BielickiJDS-CBE is the common build environment used by the Java Desktop System people as well as by porters who utilize the Spec Files Extra repository and the pkgbuild utilities. This makes it possible to use rpm like .spec files on Solaris and Opensolaris. The syntax is pretty much the same as on penguin systems besides some additional tags needed to generate correct SysV Solaris packages.
I will assume in this article that the reader knows how to setup a developers workstation on Solaris 10 with SunStudio 12 or SunStudio Express. You will need to leave space for the common build environment on /opt, space for the SFE spec files and packages bulding and storage in your home directory and of course ahve enough space on your /usr partition for installing all the nice packages you create
I also assume that you know about having enough swap space to run sunstudio and know how to compile software with it.
OK, so lets go.
Start with patching your system to the latest patchlevel. When done, insert your Solaris10U4 DVD or mount your iso image. Once you are done with that, you will need to select the user that will be your build user (we will use jdsuser for now) and change his security preferences by issuing the following command (thanks to trochej for corrrecting me. I first advised against better knowledge to edit the user_attr file directly):
usermod -P "Software Installation" jdsuser
download the following file:
http://dlc.sun.com/osol/jds/downloads/cbe/jds-cbe-1.6.0-src.tar
and extract it somewhere where you want to build it, it will need some space since it will create quite some new packages.
Change into the directory the unpacking process created called jds-cbe-1.6.0.
We will need to edit the file cbe-install but before we do that we need to change its permissions. So go ahead and do a
chmod 755 cbe-install
and than open the file cbe-install in your favorite editor and remove the two words:
SUNWsmbaS and SUNWseuos.
Save the file and run it
The install will ask for an installation directory, agree with it. It will complain about the compiler version not being the recommended one, ignore that and answer yes when it asks you if you want to use this compiler anyway.
CBE will now install all required optional packages as well as create some new ones and install them in /opt/jdsbld. Once finished you have all required stuff to use SFE and specfiles on your Solaris 10 box.
To use jds-cbe, just source /opt/jdsbld/bin/env.sh like this:
. /opt/jdsbld/bin/env.sh
and yes, there is a dot at the beginning of the former line.
Enjoy
Everything you always wanted to know about how to start using the IDE in SunStudio 12 and where afraid to ask …
Posted in OpenSolaris, Solaris & OpenSolaris, SunStudio on June 15th, 2007 by Michal BielickiThe guys from the developer department over at SUN have created a nice little QuickStart Guide for the SunStudio 12 IDE. You can find it here, I like it a lot
. It should be good enough to enlighten the pro while still giving a novice a chance to quickly start coding in Sun Studio 12. So as I said .. the only professional IDE for c, c++ and fortran on Solaris and Linux is waiting for you, don’t miss your chance …
Technorati Tags: Solaris, SunStudio, OpenSolaris, IDE
Powered by ScribeFire.

