Solaris 10 compiling environment

Posted on 2006-03-27
Last Modified: 2013-12-21

I have had a tough time setting up an environment for compiling programs in Solaris 10 using the gcc and other packages from Sunfreeware.

Could someone list all the tools and path settings for compiling something like Apache2, and php under Solaris 10 ?

Yes, I know that Apache2 is available as a package on, but our environment requires some other stuff to be compiled into it.

It is possible that my path is out of order or that I don't have a tool or 2 necessary for the complete compile, so a detailed list of what you have used for a successful compile, along with the paths would be a good answer for my question.

Thank you for your help.
Question by:arthurjb
    LVL 48

    Assisted Solution

    If you have a preference for the GNU tools from sunfreeware (remember Solaris 10 includes gcc and all the associated GNU tools), then all you really need is to install


    and make sure you have the SUNWbtool package installed, which has all the tools under /usr/ccs/bin (eg: ar, make etc)
    LVL 38

    Accepted Solution

    If you use gcc from  sunfreeware  make sure that you download and install
    GNU autoconf, automake and zlib as well.

    then set PATH and LD_LIBRARY_PATH before complie the packages,  eg if the package are install in  /usr/local, you do:


    Note: if you use mysql add mysql bin and lib to PATH LD_LIBRARY_PATH as well

    then follow the instructions in this doc:

    please remember to adjust the path to suit your installation

    LVL 27

    Assisted Solution

    I agree with Tintin.

    If you have full solaris 10 distribution, you already have native working gcc and GNU autotools in:

    If you wish also install gcc from sunfreeware (I don't recommend you to install second gcc), it will be in:


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now