SUMMARY make sendmail.8.6.12 by gcc2.6.3 on Solaris 2.4

From: Charoenchai Kiranantawat (ckt@lily.bu.ac.th)
Date: Tue Aug 29 1995 - 23:02:21 CDT


> On Sat, 26 Aug 1995, Charoenchai Kiranantawat wrote:
>
>
> I have fetch sendmail8.6.12.base.tar.Z from ftp.cs.berkeley.edu,
> and compiled sendmail.8.6.12 by gcc-2.6.3,I cp Makefile.solaris to
> Makefile,It have a problem below,

> Script started on Sat Aug 26 18:14:39 1995
> sparc4# make
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c alias.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c arpadate.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c clock.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c collect.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c conf.c
> conf.c: In function `setupmaps':
> conf.c:353: warning: prototype for `host_map_init' follows
> conf.c:253: warning: non-prototype definition here
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c convtime.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c daemon.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c deliver.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c domain.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c envelope.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c err.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c headers.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c macro.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c main.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c map.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c mci.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c parseaddr.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c queue.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c readcf.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c recipient.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c savemail.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c srvrsmtp.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c stab.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c stats.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c sysexits.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c trace.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c udb.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c usersmtp.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c util.c
> gcc -I. -I/usr/sww/include/db -DNDBM -DNIS -DSOLARIS -c version.c
> gcc -o sendmail alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o main.o map.o mci.o parseaddr.o queue.o readcf.o recipient.o savemail.o srvrsmtp.o stab.o stats.o sysexits.o trace.o u
> db.o usersmtp.o util.o version.o -L/usr/sww/lib -lresolv -lsocket -lnsl -lelf
> conf.o(.text+0x1b68): undefined reference to `__switch_gethostbyname'
> conf.o(.text+0x1ba0): undefined reference to `__switch_gethostbyaddr'
> *** Error code 1
> make: Fatal error: Command failed for target `sendmail'
> sparc4# ^D
> script done on Sat Aug 26 18:17:57 1995
>
solution:

1. use Makefile.sunOS.5.x and edit it
#
# This Makefile is designed to work on the old "make" program. It does
# not use the obj subdirectory. It also does not install documentation
# automatically -- think of it as a quick start for sites that have the
# old make program (I recommend that you get and port the new make if you
# are going to be doing any signficant work on sendmail).
#
# This has been tested on Solaris 2.3.
#
# @(#)Makefile.SunOS.5.x 8.5 (Berkeley) 4/12/94
#

# use O=-O (usual) or O=-g (debugging)
# warning: do not use -O with gcc
O=

CC= gcc

# define the database mechanism used for alias lookups:
# -DNDBM -- use new DBM
# -DNEWDB -- use new Berkeley DB
# -DNIS -- include NIS support
# The really old (V7) DBM library is no longer supported.
# See READ_ME for a description of how these flags interact.
#
DBMDEF= -DNDBM -DNIS

# environment definitions (e.g., -D_AIX3)
# include -DSOLARIS_2_3 for version 2.3 and higher
ENVDEF= -DSOLARIS_2_3

# see also conf.h for additional compilation flags

# include directories
INCDIRS=-I/usr/sww/include/db

# library directories
LIBDIRS=-L/usr/sww/lib

# libraries required on your system
LIBS= -lresolv -lsocket -lnsl -lelf

# location of sendmail binary (usually /usr/sbin or /usr/lib)
BINDIR= ${DESTDIR}/usr/lib

# location of sendmail.st file (usually /var/log or /usr/lib)
STDIR= ${DESTDIR}/var/log

# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
HFDIR= ${DESTDIR}/etc/mail

# additional .o files needed
OBJADD=

# things to be made before compilation begins
BEFORE= sysexits.h

################### end of user configuration flags ######################

CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}

OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
        deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
        map.o mci.o parseaddr.o queue.o readcf.o recipient.o \
        savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
        trace.o udb.o usersmtp.o util.o version.o ${OBJADD}

LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
BINOWN= root
BINGRP= sys
BINMODE=6555
INSTALL=/usr/ucb/install

ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0

all: ${ALL}

sendmail: ${BEFORE} ${OBJS}
        ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}

sysexits.h: /usr/include/sysexits.h
        ln -s /usr/include/sysexits.h

NROFF= nroff -h

aliases.0: aliases.5
        ${NROFF} aliases.5 > aliases.0

mailq.0: mailq.1
        ${NROFF} mailq.1 > mailq.0

newaliases.0: newaliases.1
        ${NROFF} newaliases.1 > newaliases.0

sendmail.0: sendmail.8
        ${NROFF} sendmail.8 > sendmail.0

install: install-sendmail install-docs

install-sendmail: sendmail
        ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
        for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
            ${STDIR}/sendmail.st
        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}

# doesn't actually install them -- you may want to install pre-nroff versions
install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0

clean:
        rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0

# dependencies
# gross overkill, and yet still not quite enough....
${OBJS}: sendmail.h conf.h

2. create Macro file to got sendmail.cf

uncompress sendmail.8.6.12.cf.tar.Z and tar xvf
cd cf
cp Makefile.dist Makefile,
and edit Makefile to
#
# Makefile for configuration files.
#
# @(#)Makefile.dist 8.1 (Berkeley) 8/25/93

M4= m4
#M4= /usr/src/usr.bin/m4/obj/m4
CHMOD= chmod
ROMODE= 444
RM= rm -f

.SUFFIXES: .mc .cf

.mc.cf:
        $(RM) $@
        $(M4) $*.mc > $@
        $(CHMOD) $(ROMODE) $@
         ### you will get solaris.cf from MACRO solaris.mc
ALL= solaris.cf cs-hidden.cf cs-exposed.cf \
        hpux-cs-exposed.cf hpux-cs-hidden.cf \
        sunos3.5-cs-exposed.cf sunos3.5-cs-hidden.cf \
        sunos4.1-cs-exposed.cf sunos4.1-cs-hidden.cf \
        ultrix4.1-cs-exposed.cf ultrix4.1-cs-hidden.cf \
        mail.cs.cf mail.eecs.cf ucbvax.cf vangogh.cf \
        chez.cf knecht.cf cogsci.cf alpha.cf s2k.cf auspex.cf \
        python.cf \
        clientproto.cf tcpproto.cf uucpproto.cf

all: $(ALL)

clean cleandir:
        $(RM) $(ALL) core

depend install:

# this is overkill, but....
M4FILES=\
        ../domain/Berkeley.m4 \
        ../domain/cs.exposed.m4 \
        ../domain/cs.hidden.m4 \
        ../domain/eecs.hidden.m4 \
        ../domain/s2k.m4 \
        ../feature/allmasquerade.m4 \
        ../feature/always_add_domain.m4 \
        ../feature/bitdomain.m4 \
        ../feature/domaintable.m4 \
        ../feature/mailertable.m4 \
        ../feature/nocanonify.m4 \
        ../feature/nodns.m4 \
        ../feature/notsticky.m4 \
        ../feature/nouucp.m4 \
        ../feature/nullclient.m4 \
        ../feature/redirect.m4 \
        ../feature/use_cw_file.m4 \
        ../feature/uucpdomain.m4 \
        ../hack/cssubdomain.m4 \
        ../m4/cf.m4 \
        ../m4/nullrelay.m4 \
        ../m4/proto.m4 \
        ../m4/version.m4 \
        ../mailer/fax.m4 \
        ../mailer/local.m4 \
        ../mailer/smtp.m4 \
        ../mailer/usenet.m4 \
        ../mailer/uucp.m4 \
        ../ostype/aix3.m4 \
        ../ostype/bsd4.3.m4 \
        ../ostype/bsd4.4.m4 \
        ../ostype/hpux.m4 \
        ../ostype/irix.m4 \
        ../ostype/linux.m4 \
        ../ostype/nextstep.m4 \
        ../ostype/osf1.m4 \
        ../ostype/riscos4.5.m4 \
        ../ostype/solaris2.m4 \
        ../ostype/sunos3.5.m4 \
        ../ostype/sunos4.1.m4 \
        ../ostype/svr4.m4 \
        ../ostype/ultrix4.1.m4 \
        ../siteconfig/uucp.cogsci.m4 \
        ../siteconfig/uucp.old.arpa.m4 \
        ../siteconfig/uucp.ucbarpa.m4 \
        ../siteconfig/uucp.ucbvax.m4 \

$(ALL): $(M4FILES)

3. This is Solaris Macro file for solaris 2.4 # file solaris.mc

divert(-1)
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

include(`../m4/cf.m4')
VERSIONID(`@(#)sunos5.4.mc 8.1 (Berkeley) 6/7/93')
OSTYPE(solaris2)dnl
MAILER(local)dnl
MAILER(smtp)dnl

Thank Lupe Christoph <lupe@alanya.m.isar.de> very much.

-Charoenchai Kiranantawat <ckt@lily.bu.ac.th>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:32 CDT