This will cover how to 'compile' the basic set of software for Solaris.
Use ether a Developer Install of the OS or a customized jumpstart/flash setup.
I've tested against the following:
OS: Solaris 10 01/06 Hardware: SPARC 4u (v210) & Dell 1850 (x86/IA64) Compiler: Sun Studio 11 & GCC (I prefer Sun Studio 11 since it's free)
This is the default .profile I used for the build:
# NOTES: keep in mind 'some' GNU applications require the GNU-ld and GNU-ar # and GNU-as. Sun, comes with ar,as,ld within /usr/ccs/bin # Some applications need /usr/ccs/bin out of the application or make # symlinks in /opt/sfw/bin/gld /opt/sfw/bin/gar /opt/sfw/bin/gas to be # ld/ar/as # # - wpool #EDITOR=/usr/bin/vi FCEDIT=/usr/bin/vi PATH=/opt/sfw/bin:/usr/sfw/bin:/usr/bin:/usr/sbin:/sbin:/opt/sfw/sbin:/usr/ccs/bin:/usr/local/bin MANPATH=/usr/man:/usr/share/man:/usr/sfw/man:/usr/sfw/share/man:/opt/sfw/man:/opt/sfw/share/man export EDITOR FCEDIT PATH MANPATH
PGSQL8 Compile Flags
LDFLAGS="-L/opt/sfw/lib -L/usr/sfw/lib" export LDFLAGS CPPFLAGS="-I/opt/sfw/include -I/usr/sfw/include" export CPPFLAGS ./configure --prefix=/opt/sfw/pgsql8 \ --localstatedir=/var \ --enable-integer-datetimes \ --enable-thread-safety \ --with-openssl
Postfix Compile Flags
make makefiles CC=/opt/SUNWspro/bin/cc \ CCARGS='-DFD_SETSIZE=2048 -DEF_DAEMON_DIR=\"/usr/lib/postfix\" -DEF_MANPAGE_DIR=\"/usr/share/man\" -DEF_HTML_DIR=\"/usr/share/doc/postfix/html\" -DEF_README_DIR=\"/usr/share/doc/postfix\" -DHAS_PCRE -I/opt/sfw/include -DHAS_PGSQL-I/opt/sfw/pgsql8/include' \ AUXLIBS="-L/opt/sfw/lib -L/opt/sfw/pgsql8/lib -L/usr/sfw/lib -R/opt/sfw/lib -R/opt/sfw/pgsql8/lib -R/usr/sfw/lib -lpcre -lpq -lpthread"
ClamAV Compile Flags
# Requires cc/gcc and gmake Sun's /usr/ccs/bin/make will NOT work # Also make sure gmp http://www.swox.com/gmp is installed! # # UID / GROUP can be whatever # LDFLAGS="-L/opt/sfw/lib -R/opt/sfw/lib -lgmp" export LDFLAGS CPPFLAGS="-I/opt/sfw/include" export CPPFLAGS ./configure --prefix=/opt/sfw \ --localstatedir=/var \ --sysconfdir=/etc/postfix \ --with-sendmail=/usr/sbin/sendmail \ --with-user=720 \ --with-group=720 \ --with-dbdir=/etc/postfix/virusdb \ --enable-bigstack
DSPAM Compile Flags
LDFLAGS="-L/opt/sfw/lib -L/opt/sfw/pgsql8/lib -L/usr/sfw/lib -R/opt/sfw/lib -R/opt/sfw/pgsql8/lib -R/usr/sfw/lib" export LDFLAGS CPPFLAGS="-I/opt/sfw/include -I/usr/sfw/include -I/opt/sfw/pgsql8/include" export CPPFLAGS LDOPTIONS=$LFLAGS ./configure --prefix=/opt/sfw \ --sysconfdir=/etc/postfix/dspam \ --with-dspam-home=/var/dspam \ --enable-large-scale \ --with-storage-driver=pgsql_drv \ --with-pgsql-includes=/opt/sfw/pgsql8/include \ --with-pgsql-libraries=/opt/sfw/pgsql8/lib \ --with-userdir=/var/dspam \ --with-userdir-owner=dspam \ --with-userdir-group=postdrop \ --with-dspam-owner=dspam \ --with-dspam-group=postdrop \ --with-dspam-mode=4510 \ --with-local-delivery-agent=/usr/sbin/sendmail \ --enable-daemon \ --enable-virtual-users \ --enable-preferences-extension \ --enable-clamav \ --enable-long-usernames \ --disable-trusted-user-security \ --enable-syslog \ --with-logfile=/var/dspam/log/dspam.log \ --with-logdir=/var/dspam/log # Add if you want debugging - great for testing #--enable-debug #--enable-verbose-debug
