From: sti@cs.hut.fi (Sami-Jaakko Tikka)
Subject: Still it won't compile
X-Md4-Signature: bbea8715db4db7022a2898ad0db16842
Reply-To: Sami.Tikka@hut.fi
Organization: Helsinki University of Technology, Finland
Distribution: comp
Date: Mon, 7 Sep 1992 11:57:50 GMT


First of all, thank you!

Couple of kind people pointed out to me that compiling MH with shared
libraries on SunOS requires it to be compiled with /bin/cc, not with
gcc.  The reason being that gcc doesn't grok -pic -option.

So now I have the shared library built all right but the problems
start after that.  I get a lot of errors because of undefined symbols.
For example linking mts.o leaves symbol _main undefined.  I tried to
grep the file mts.c for a string 'main' but didn't come up with a
function named main.  Do I have a corrupted distribution or have I
done the configuration wrong?

Here are again my conf/MH-configuration file,
conf/config/mtstailor-file and compilation symptoms:

(BTW what is the meaning of the 'servers:' line in mtstailor?  Do I
have it ok now?)

# For Sun OS 4.* with SendMail, running Yellow Pages, and /etc/named.
# MH will post mail through an SMTP connection to the localhost's
# SendMail daemon.  Be sure to set "servers" in your mtstailor file.
#
#bin	/usr/new/mh
bin     /v/MH-6.7.2/bin
#etc	/usr/new/lib/mh
etc     /v/MH-6.7.2/mh
mail	/usr/spool/mail
manuals	new
editor	prompter
mts	sendmail/smtp
options	BSD42 BSD43 SUN40 SUN41 TYPESIG=void
options	DBM
options BIND
curses	-lcurses -ltermcap
#cc      gcc
ccoptions -O 
ranlib	on
ldoptions -s -O
sharedlib on
slibdir   /usr/lib
#
# include "bbc" support to read NetNews via the NNTP.
#
bboards	nntp
bbdelivery on
bbhome /v/MH-6.7.2/bboards
pop	on
#
# These are optional: 
#
# DUMB	  restricts some address defaulting
# RPATHS  don't throw away UNIX "From " lines
# MHE	  for Emacs/MH interface
# SBACKUP change to "#" instead of ","
# MSGPROT default messages to 0600 protection mode
#
options	DUMB 
options	RPATHS
options	MHE 
options	SBACKUP='"\\043"'
options	MSGPROT='"0600"'
options FOLDPROT='"0700"'
options ATTVIBUG
options ISI
options LOCKF
options MHRC
options POP2
options UK

servers:	localhost \01localnet

mmdfldir:	@(MHDROPATH)
mmdflfil:	@(MHDROPFIL)
uucpldir:	/usr/spool/mail
uucplfil:	
mmdelim1:	\001\001\001\001\n
mmdelim2:	\001\001\001\001\n
mmailid:	0
umincproc:
lockldir:

hostable:	@(MHETCPATH)/hosts
sendmail:	/usr/lib/sendmail

And here is an excerpt from the compilation, after it started to emit
errors:

ar r sendmts.a hosts.o smail.o; ranlib sendmts.a
Creating archive file `sendmts.a'
rm -f ../libmts.a
ln sendmts.a ../libmts.a
rm -f ../llib-lmts
ln llib-lsendmail ../llib-lmts
-rw-r--r--   2 sti      user        12518 Sep  7 14:36 sendmts.a
SendMail/SMTP-MTS library built normally
for d in mts bboards tws mf; do (cd $d; make DESTDIR= -k all); done
/bin/cc -DBSD42 -DBSD43 -DSUN40 -DSUN41 -DTYPESIG=void -DDBM -DBIND -DDUMB -DRPATHS -DMHE -DSBACKUP='"\043"' -DMSGPROT='"0600"' -DFOLDPROT='"0700"' -DATTVIBUG -DISI -DLOCKF -DMHRC -DPOP2 -DUK -DSENDMTS -DSMTP -DPOP -DBPOP -DNNTP -O -I..   -c mts.c -o mts.o
/bin/cc -s -O  mts.o    -o mts
ld: Undefined symbol 
   _main 
make[2]: *** [mts] Error 2
/bin/cc -DBSD42 -DBSD43 -DSUN40 -DSUN41 -DTYPESIG=void -DDBM -DBIND -DDUMB -DRPATHS -DMHE -DSBACKUP='"\043"' -DMSGPROT='"0600"' -DFOLDPROT='"0700"' -DATTVIBUG -DISI -DLOCKF -DMHRC -DPOP2 -DUK -DSENDMTS -DSMTP -DPOP -DBPOP -DNNTP -O -I..   -c lock.c -o lock.o
/bin/cc -s -O  lock.o    -o lock
ld: Undefined symbol 
   _main 
   _lockstyle 
   _lockldir 
   _mts_init 
make[2]: *** [lock] Error 2
/bin/cc -DBSD42 -DBSD43 -DSUN40 -DSUN41 -DTYPESIG=void -DDBM -DBIND -DDUMB -DRPATHS -DMHE -DSBACKUP='"\043"' -DMSGPROT='"0600"' -DFOLDPROT='"0700"' -DATTVIBUG -DISI -DLOCKF -DMHRC -DPOP2 -DUK -DSENDMTS -DSMTP -DPOP -DBPOP -DNNTP -O -I..   -c client.c -o client.o
/bin/cc -s -O  client.o    -o client
ld: Undefined symbol 
   _main 
   _servers 
make[2]: *** [client] Error 2
make[2]: Target `all' not remade because of errors.
--
Sami.Tikka@hut.fi                                  "Live Long and Prosper!"
---------------------------------------------------------------------------
"I think there's a world market for about 5 computers."
        - Thomas J. Watson, Chairman of the Board, IBM (around 1948)
Newsgroups: comp.mail.misc