building balsa (and libesmtp) on solaris8 sparc/x86 - a howto (finally!)
- From: James McPherson <James McPherson Sun COM>
- To: balsa email list <balsa-list gnome org>
- Subject: building balsa (and libesmtp) on solaris8 sparc/x86 - a howto (finally!)
- Date: Thu, 25 Oct 2001 23:00:37 +1000
Hi - I've finally pulled my finger out and documented my process for building
balsa 1.2.0 and 1.2.1 on solaris8 (sparc and x86). Here 'tis.
Step 1
Install the Sun Freeware builds of gcc, libc, gnu build tools (automake, gawk
et al)
from the "Companion Software cdrom" that comes with your Solaris 8 distribution.
Step 1.5 (not totally necessary)
Ensure that your shell sees the gnu versions of the utils which are in
/usr/bin/ and
/usr/ccs/bin by running the following as root:
# cd /usr/bin
# for file in *; do
> if [ -f /opt/sfw/$file ]; then
> ln -s /opt/sfw/$file /opt/sfw/g$file
> fi
> done
Step 2
Install the Gnome 1.4 packages from "Exploring the Gnome 1.4 desktop"
Step 3
Set your PATH:
PATH=/opt/sfw/bin:/opt/gnome-1.4/bin:/usr/bin:/usr/ccs/bin:$PATH ; export PATH
(CFLAGS, CPPFLAGS, LDFLAGS will change with each package)
Step 4
grab pspell 0.12.2 and configure, build, and install as follows:
$ ./configure --prefix=/usr/local --enable-ltdl --enable-ltdl-install
$ gmake
$ gmake install
Step 5
grab pcre 3.4 and configure, build, and install as follows:
$ CC=gcc ./configure --prefix=/usr/local
$ gmake
$ gmake install
Step 6 (optional)
grab openssl 0.9.6b and configure, build and install as follows:
$ ./config --prefix=/usr/local threads shared
$ gmake
$ gmake install
Step 7
grab libesmtp 0.8.6 and configure, build and install as follows:
$ LDFLAGS="-L/usr/local/lib -lsocket -nsl"
$ CFLAGS="-I/usr/local/include"
$ CPPFLAGS=$CFLAGS
$ export CFLAGS CPPFLAGS LDFLAGS
$ ./configure --prefix=/usr/local --enable-all --enable-pthreads \
> --enable-require-all-recipients --enable-starttls --enable-ltdl-install
> for mf in `find . -name Makefile`; do sed -e"s,-ansi -pedantic,,g" <
> ${mf} > ${mf}.new; mv ${mf}.new ${mf}; done
if not fix already integrated, you will see an error compiling with an
include file called crammd5/md5.h due to u_int[8|32]_t not being defined.
Fix this with a quick edit to crammd5/md5.h (after line #include <sys/types.h>):
/* included for Solaris, which doesn't have u_intXX_t * James.McPherson@Sun.COM
*/
#ifdef sun
typedef uint8_t u_int8_t;
typedef uint32_t u_int32_t;
#endif /* ifdef sun */
edit errors.c and protocol.c (before the include for <netdb.h>):
/* added as quick hack by James.McPherson@Sun.COM so that this file
* compiles with Forte C 6.0 (new name for Sun Workshop C Compiler
*/
#ifdef sun
#define __EXTENSIONS__ 1
#endif
/* end James.McPherson@Sun.COM's hackery in this file */
You'll also need the above #define if using gcc because the necessary
definitions
for EAI* that errors.c and protocol.c depend on don't get activated if
__EXTENSIONS__
is null. Weird.
Step 8
If you want to include Emmanuel's filter patches, grab them from
bugzilla.gnome.org
(bugid is 61072 for 1.2.0), use gpatch to apply:
$ gpatch -p0 < balsa_filters_1.2.0._20011002.txt
$ automake
$ CFLAGS="-I/usr/local/include -I/opt/gnome-1.4/include"
$ CPPFLAGS=$CFLAGS
$ LDFLAGS="-L/usr/local/lib -L/opt/gnome-1.4/lib "
$ export CFLAGS CPPFLAGS LDFLAGS
$
LD_LIBRARY_PATH=/opt/gnome-1.4/lib:/opt/sfw/lib:/usr/local/lib:$LD_LIBRARY_PATH
;
$ export LD_LIBRARY_PATH
(For some reason the configure script failed to recognise that iconv* functions
are
included in libc on solaris, so you might need to edit the configure script at
line
5921 to remove the "-liconv". If "-liconv" shows up in the makefiles, a short
sed
script will fix it)
$ ./configure --prefix=/usr/local --with-gnome=/opt/gnome-1.4 \
> --with-gnome-includes=/opt/gnome-1.4/include \
> --with-gnome-libs=/opt/gnome-1.4/lib --with-glib-prefix=/opt/gnome-1.4 \
> --disable-glib-test --with-gtk-prefix=/opt/gnome-1.4 --disable-gtk-test \
> --enable-all --enable-mdn-reply --enable-threads --with-ssl \
> --enable-more-warnings=no --enable-fcntl=yes
obviously if you don't want ssl, don't use --with-ssl. The --enable-fcntl=yes is
there because otherwise libmutt will try to use both fcntl and flock file
locking
(both of which work fine on Solaris) but gcc/cc won't really know which codepath
to choose.
If -liconv needs removing:
$ for mf in `find . -name Makefile`; do
> sed -e"s,-liconv,,g" < $mf > $mf.new
> mv $mf.new $mf
> done
Then the biggy,
$ gmake
$ gmake install
It's pretty simple now (and really easy compared to pre-1.2.0!)
I'm working on a "make pkg" target for the makefiles and i'll post that when I
have it figured out.
I hope this helps people out there - it's nice to have balsa on solaris,
especially
when the next best thing is the entirely bletcherous dtmail!
Oh, I need to put in the obligatory waiver and disclaimer:
Sun Microsystems does not provide support for the above procedure, and does not
guarantee that any of the above procedure is in fact accurate. All care is taken
to ensure the procedure's accuracy, but NO RESPONSIBILITY is given or
undertaken.
(Otherwise I might get larted by my boss). I'm happy to help people get balsa up
and running on Solaris btw but that's totally on my own time and under my own
steam.
best regards to all (and thanks to the development team!)
James C. McPherson
--
TSG Engineer (Kernel/Storage) 828 Pacific Highway
APAC Customer Care Centre Gordon NSW Sun Microsystems
Australia 2072
Failfast panic: those controlling voices in my head have stopped telling me
what to do.....
Read about the VOS Initiative at http://www.vosinitiative.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]