Solaris 10 compiling environment


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.
LVL 14
Who is Participating?
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

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)
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:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.