I will update this page was I find issues that are specific to this platform. Note that all of our building is done in the /source directory, which is actually a symlink to any place on the system that has room enough for the packages.
These weren't all installed at the same time, and intermediate OS upgrades may mean that options used to build one package may not apply to the next one.The SCO C compiler produces bogus code when the alloca() intrinsic is used from within another function call, such as:
char *dst = strcpy( alloca(n), src );The compiler pushes the src argument onto the stack, and then calls alloca() to make the local buffer. But this operation changes the stack, completely losing track of the src parameter pushed earlier. When strcpy() gets called, the stack is messed up badly, and it only gets worse when this function exits. Saved registers get trashed, and it's just an unholy mess.
I've submitted a bug report to SCO, but the workaround at the source level is straightforward. We simply change the above constructions to:
char *dst = alloca(n);
strcpy( dst, src );
This patch can be applied to the source to adjust this in three or four places. The patch has been submitted to the popt maintainers via comment posted at freshmeat.
Also - the shared library produced by the default configuration seem to be broken: code that depends on it won't even load properly. I spent some time trying to track this down but decided it wasn't worth the time. So I ended up just building and installing this library statically.
$ ./configure --disable-shared
$ make
$ make install
Our fix for this was to build GNU fileutils-4.1 and install just the mkdir command to /usr/local/bin and insure that this was in the path before the system version at /usr/bin/mkdir.
Our environment:
The postfix "hash" access method needs a DB package, and we're always of a mind to install the latest and greatest. This meant Berkeley DB 4.1. We fetched the software from Sleepycat Software and unpacked it to our build area.# date Sun May 25 21:40:15 PDT 2003 # uname -a UnixWare hostname 5 7.1.2 i386 x86at Caldera UNIX_SVR5 # cc -V UX:cc: INFO: Optimizing C Compilation System (CCS) 4.0 06/09/01 (OU8.0.0bl7)
This installs the software to /usr/local/BerkeleyDB.4.1/, but because this system doesn't seem to support the loader configuration file, it's too much work to insure that /usr/local/BerkeleyDB.4.1/lib is always in LD_LIBRARY_PATH. So, we make a symbolic link for the name loaded by the package to the real location:# cd /source # gtar -xzvf tarballs/db-4.1.25.tar.gz # cd db-4.1.25/build_unix # ../dist/configure # make # make install
This puts the library required in the "usual" library path.# cd /usr/lib # ln -s ../local/BerkeleyDB.4.1/lib/libdb-4.1.so.0.0.0 libdb-4.1.so.0
Then to Postfix, and it's a good idea to add the users required first:
Then build the code. Because of the options involved, we typically create a small configuration file in the /source directory:# groupadd postfix # groupadd postdrop # useradd -g postfix -d /var/spool/postfix -s /bin/true -c 'Postfix' postfix
/source/configure-postfixthen configure and build Postfix:make makefiles DEBUG='' \ CCARGS='-Kthread -I/usr/include -I/usr/ucbinclude -I/usr/local/BerkeleyDB.4.1/include -DHAS_DB' \ AUXLIBS="-L/usr/local/BerkeleyDB.4.1/lib -ldb"
The make install process will ask where the various parts of the system are to be installed, and I normally put everything under /usr/local/ - this is not the default location. Configure to taste, but in any case it will be necessary to create symbolic links so that the rest of the system knows how to inject mail into the system:# cd postfix-2.0.10 # sh ../configure-postfix # make # make install
Finally, we arrange for postfix to launch when the system boots:# ln -s ../local/bin/sendmail /usr/sbin/sendmail # ln -s ../local/bin/sendmail /usr/lib/sendmail
# cd /etc # cat init.d/postfix #!/sbin/sh PATH=/usr/local/bin:$PATH ; export PATH case "$1" in start) echo "Starting postfix" postfix start ;; stop) echo "Stopping postfix" postfix stop ;; esac # ln -s ../init.d/postfix rc2.d/S99postfix # ln -s ../init.d/postfix rc2.d/K01postfix
Navigate: More Tech Tips