Solaris
From rsyslog wiki
Solaris is fully supported starting with version 4.7.2 and 5.5.4.
This page is kept to aid development on the Solaris platform.
Contents |
Setting up Solaris for compiling rsyslog
Every time I go back to Solaris after a while, I have problems setting it up. So I include this rough reminder item here.
During installation, it is very important to use custom install. This a) permits to select the developer package and b) permits to specify partition sizes. Partition sizes are important. If one follows the installation procedure below, all new components are installed into the root partition. However, the default install makes this rather tiny. So my work-around is to change the partition sizes so that the root partition gets the lion's share of the whole disk.
Very first things first: after install, the Solaris registration wizard starts. Interestingly, the AltGr key seems not to be supported inside it. The bottom line is that I am unable to get the @-sign on my non-US keyboard. Workaround: open terminal window, type @ (there it works ;)), copy and paste into the registration wizard - voila...
If you need a proxy, add this first. Note that the not-yet existing PATH components do not cause any issue, so you may add them together with the rest of the statements.
add to ~/.bashrc
export PATH=/opt/csw/bin:/opt/csw/gcc4/bin:$PATH:/usr/local/bin export ftp_proxy=http://name:port export http_proxy=http://name:port
if you need a proxy for wget, you can also modify/create ~/.wgetrc:
ftp_proxy=http://name:port http_proxy=http://name:port
First of all, we get (almost) all the free software we need from blastwave. So the first step after a Solaris install is to set up the Blastwave pkgutil setup procedure. Secondly, some software is NOT available on blastwave. There, we need to use the SunFreeware site. Probably the most important software missing on blastwave is the git client.
VMWare
VMWare tools (when selecting VM/Install VMWare Tools) reside on CD. They need to be copied over to disk, unpacked and then "pkgadd -d vmware..." be issued. Be sure to use a reasonable screen size!
Use vmware-toolbox script (usually in /usr/bin) to configure time sync and other minor things. Use /usr/bin/vmware-config-tools.pl to configure the base vmware settings (the important ones).
SolarisFreeware
It looks, like SolarisFreeware is no longer required, at least not gzip and git (which is now available via blastwave as well). So it probably is better to try get everything from blastwave. I leave the content below intact, just in case it is needed again (it took quite a while to assemble it).
First, install gzip, as this is required to unzip all packages.
To install any package, download (and unzip) it first, then use "pkgadd -d package-name".
We need git, plus all dependencies listed on that site. As it looks, we need the dependencies from SolarisFreeware even though the same softwares are installed from BlastWave. There are probably ways around this, however, I do not care - the goal is to get a compile environment, not something that is used as a workstation on a daily basis ;)
I don't know how often I need to reinstall, so here I post what currently needs to be downloaded:
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/git-1.6.1-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssl-0.9.8j-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/curl-7.19.4-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libiconv-1.11-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libidn-1.12-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/expat-2.0.1-sol10-x86-local.gz wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/zlib-1.2.3-sol10-x86-local.gz gunzip *.gz pkgadd -d curl-* pkgadd -d libiconv-* pkgadd -d exapt-* pkgadd -d libidn-* pkgadd -d libintl-* pkgadd -d openssl-* pkgadd -d zlib-* pkgadd -d libgcc-* pkgadd -d git-*
Blastwave
From BlastWave, we need to install at least:
Note: the blastwave tool for package management is named pkgutil, use pkgutil -i to install, add -y to answer all questions with "yes" (highly recommended!)
- git (the version from blastwave now seems to work fine)
- gcc4
- automake
- autoconf
- libtool
- pkgconfig (for PKG_CHECK)
- wget
- gmake (do "ln gmake make" in /opt/csw/bin to have a "normal" make available afterwards)
- gvim ;) (this also loads a large number of runtime files, so it solves most of rsyslog
- dbus
- of course, dependencies, too
Things we need to build all modules of rsyslog (list will be completed once I go there):
- gnutls
- various database drivers
After installing base software
To disable console beep: echo 'set bell-style none' >> ~/.inputrc
Remember to set git default user:
$ git config --global user.name "Your Name Comes Here" $ git config --global user.email you@yourdomain.example.com
Things to note after the initial git clone, a "touch INSTALL" may be needed to get autoreconf going (not sure yet if this file should be in git, I don't think so).
Fixing broken stuff
When trying to build against GNU TLS, pkgconfig can spit out this message:
Unknown keyword 'URL' in '/opt/csw/lib/pkgconfig/gnutls.pc'
The quick and dirty solution is to pop open /opt/csw/lib/pkgconfig/gnutls.pc in your favorite editor and remove the 'URL:' line from the file.
Building rsyslog
To be able to build with TLS or RELP, PKG_CONFIG_PATH needs to be set properly. Assuming a sane configuration, this should work:
PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:/usr/local/lib/pkgconfig
Some GNU tools have different names under Solaris. If in doubt, it is always a good idea to try a "g" in front of the usual tool name. The most prominent example is "ar", which is called "gar" under Solaris (with blastwave at least). Configure needs to be told about such things. A minimal configure line I used (and that worked) is as follows:
./configure AR=gar --options...
We have seen cases (especially on Sparc) where ./configure fails with an error message in the spirit of "compiler available, but can not build programs". That most probably means that header files "must be fixed". There is an FAQ on that available on blastwave (https://www.blastwave.org/wiki/display/CSW/Blastwave+troubleshooting+FAQ -- see "unexpected missing symbols"). It is rather simple to fix, command lines are
- # /opt/csw/gcc4/libexec/gcc/sparc-sun-solaris2.8/4.3.4/install-tools/mkheaders (for Sparc)
- # /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.10/4.3.4/install-tools/mkheaders (fox x86)
Deployment
Before trying to run rsyslogd, do:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/csw/gcc4/lib:/opt/csw/lib
Development
Random notes and useful things.
In the early stages of the porting effort, rsyslog had lot's of fun deleting /dev/log. It took me quite a while to find out how to re-create it on Solaris. This is how it works:
ln -s /devices/pseudo/log@0:log /dev/log
Note that in previous versions imuxsock was guilty of removing /dev/log. This is a known issue if you use rsyslog prior to at least 4.6.3. Note that you can avoid the problem by not loading imuxsock, which is not strictly required on Solaris.