SUMMARY: BIND 4.9.6 on 2.5.1

Dave Wreski (dave@nic.com)
Tue, 09 Dec 1997 23:58:26 -0500 (EST)

Hi all. Received some great responses. My question was regarding
bind-4.9.6-REL failing to compile on solaris 2.5.1 and 2.6. It seems 'ld -x'
is not understood on ld for solaris.

Many people suggested removing the '-x' from the ld command, which probably
would have worked.

A better suggestion is to fully read the Makefile before not understanding
why it doesn't work. I searched for 'solaris' in the Makefile, and should
have searched for 'sunos5'.

Uncomment the correct section, and it will work as advertised. You'll still
need to decide whether you want the solaris compatibility stuff, but wasn't
necessary for me, so I didn't investigate that further.

Thanks to:
Khanh Vo <KVO@nrc.gov>
Karl E. Vogel <vogelke@c17mis.region2.wpafb.af.mil>
Casper Dik <casper@holland.Sun.COM>
Stefan Voss <s.voss@terradata.de>

Follows is the relevant section from the Makefile:

#(solaris2.x/sunos5.x)
#be careful with installation - note in particular that the system
#ships with /usr/sbin/in.named (with in.) and /usr/sbin/named-xfer
#(without in.) to emulate this naming, INDOT should be set to 'in.'
#while XFER_INDOT should be empty. also, under solaris2.x, use
#'make install' at your own risk. don't include sys/stream.h via
#netinet/in.h by defining _SYS_STREAM_H. ->and note that sun moved
#their nslookup to /usr/sbin for some odd reason; when you install
#this one in /usr/bin you should delete sun's or else you will get
#confusing results since you never know which nslookup you're using.
PIDDIR = /etc
LEX = lex
#uncomment next line for Sun C compiler
CC = /opt/SUNWspro/bin/cc $(CPPFLAGS) -R$(DESTLIB)
#uncomment next two lines for GNU C compiler
#CC = gcc $(CPPFLAGS)
#LDFLAGS=-Xlinker -R$(DESTLIB)
#otherwise uncomment the next line and hope for the best
#CC = cc $(CPPFLAGS)
CDEBUG = -O
CPPPFLAGS = -DSVR4 -D_SYS_STREAM_H
CPPFLAGS = $(CPPPFLAGS) $(SOLCOMPAT)
INDOT = in.
XFER_INDOT =
LIBS = -ll -lnsl -lsocket
DESTEXEC = /usr/sbin
DESTHELP = /usr/lib
INSTALL_COMPAT = install-compat
LDS = :
INSTALL = /usr/ucb/install
RANLIB = :
ARPREF = `lorder
ARSUFF = | tsort`
MANDIR = man
MANROFF = cat
CATEXT = $$$$N
PS = ps -p
IOT = IOT
#uncomment next line for link-compatibility with Solaris
#resolver library
SOLCOMPAT = -Dgethostbyname=res_gethostbyname \
-Dgethostbyaddr=res_gethostbyaddr \
-Dgetnetbyname=res_getnetbyname \
-Dgetnetbyaddr=res_getnetbyaddr -Dsethostent=res_sethostent \
-Dendhostent=res_endhostent -Dgethostent=res_gethostent \
-Dsetnetent=res_setnetent -Dendnetent=res_endnetent \
-Dgetnetent=res_getnetent
# for details on shared library building, see shres/solaris/INSTALL
#uncomment next line to build a shared library version of libresolv
SHRES = shres/solaris
#uncomment next line to build tools and named with shared libresolv
#if you do so, you *must* define SOLCOMPAT as well
#(and it must be in CPPFLAGS)
RES = $(SHRES)/libresolv.so
# uncomment only one of the triplets of lines below
# -- if you use gcc (recommended)
# (if -fpic doesn't work, see shres/solaris/ISSUES)
#SHCC = gcc -B/usr/ccs/bin/ $(CPPPFLAGS)
#PIC= -fpic
#SHLD = /usr/ccs/bin/ld -G
# -- if you use Sun's cc
SHCC = /opt/SUNWspro/bin/cc $(CPPPFLAGS)
PIC = -Kpic
SHLD = /opt/SUNWspro/bin/cc -G

--------------End of forwarded message-------------------------