The Linux Page

Installing Solaris to compile your software

Now a day I like to install Solaris to check that my code compiles and generally runs under that OS.

I think that's a good way to prove that the code is multi-OS ready even if it is only for Unices.

OpenSolaris is free and can be downloaded from Oracle. The last URL I use was:

http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

The system, by default, comes with a directory named /usr/sfw which includes a really old version of gcc. It is possible, though, to move forward with a newer version of the compiler by installing a package. Under Solaris 11.2, this is done with:

sudo pkg install gcc-c++-48

The list of available packages can be determined using the search command:

pkg search g++

and you will get a list of packages in link with g++. Only installing g++ will also install gcc since it depends on it.

The search may give you a list of very specific versions (with an @ character and the version information) which can be specified to install that very version.

Now I also mainly use git so I install that package too in order to retrieve the source files of my projects:

sudo pkg install git

I'm sure you could also install svn and cvs if you are using those type of repositories still.

Finally, I use cmake to create the Makefile that works at once:

sudo pkg install cmake

And I'm ready.

Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • FTP
  • XML

    Extensible markup language. First mainly used on the Internet, XML was born out of a constrained version of HTML (SGML). It is now used for all sorts of data.

  • inline
  • slow
  • zlib

    The Z library is a compression library based on an algorithm that compresses at best in some automated and simle way. For better performance, the entire input file is necessary. Note that you can get better results with other methods, this one is excellent for streaming, however.