Friday, February 12, 2010

How To: Compile MICO-CORBA in SUN Solaris

Here are the steps to download, build and install the MICO COBRA under SUN Solaris machine.
  1. Download MICO CORBA.
  2. Open the terminal window in the directory where you kept the downloaded archive file.
  3. Extract the content of the downloaded archive.

    gzip -dc mico-*.tar.gz | tar -xf –

    And if you are using GNU tar utility (if not installed already, get it from SUN Freeware website.) then

    tar -zxvf mico-*.tar.gz

  4. Run the configure script.

    You can set many parameters through the command line arguments to the configure script. Such parameters are, install directory, Qt directory etc. Check INSTALL.txt file for more information on the list of command line arguments.

    Here are my arguments to the configure script

    ./configure --with-qt=/sect/package/qt/ --prefix=/sect/package/mico-corba/

    Here I have enabled the support for Qt (which is installed in =/sect/package/qt/ directory) and I have indicated that I am planning to install MICO into /sect/package/mico-corba directory.

    Read INSTALL.txt for more information on this.

    Note: When I used one of configure script argument named --enable-final switch, I ended with compilation errors under Solaris. If you are also getting compilation errors, Check if you have used this switch. As per document this switch won’t work under HP-UX. I guess this is applicable to all Unices.

  5. Run the make tool.
    Issue make command for this.
    or if you have GNU make installed (or install it from SUN Freeware website)

  6. Install the MICO CORBA
    Issue the following command in terminal to install MICO to configured directory(if any set while configure script) or to the default directory.
    make install
    gmake install

  7. Update the environmental variables to include MICO install directory.
    Before you can compile, link and execute your first CORBA application, you need to setup the environmental variables correctly.

    Add /sect/package/mico-corba to your PATH environment variable.
    In Bash
    And in csh
    setenv PATH /sect/package/mico-corba/bin:$PATH

    Also modify LD_LIBRARY_PATH to properly link with MICO libraries.

    If required modify the Bash Profile file to set these environment variable at start-up.

    Or you can run Solaris crle command once and add MICO lib directory in it.(Recommended method)

    crle -u -l /sect/package/mico-corba/lib

That's all.

Please leave a comment if this post was useful to you!

No comments: