Re: Compile problem under Sun OS 4.1.3

Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Tue, 27 Aug 1996 10:42:39 -0500

Try these porting notes instead:
(I think the ones that you were looking at are a bit older. Do you
have scotty 2.1.1?)

--------------------------------------------
SunOS, various versions
--------------------------------------------

1. configure --enable-shared and build normally. At the end you will get
an error linking tnm.so about mixing pic and PIC .o files.

2. Edit the Makefile and go to the tnm$(SHLIB_SUFFIX) rule. Change the
executed command to be:
$(SHLIB_LD) -assert pure-text -o tnm$(SHLIB_SUFFIX) $(TNM_OBJS)
Also delete the "-lresolv" word from the LIBS line in the Makefile

Go down two rules to the tkined$(SHLIB_SUFFIX) rule
Change it to read:
$(SHLIB_LD) -assert pure-text -o tkined$(SHLIB_SUFFIX) $(TKI_GENERIC_OBJS)

3. get the bind-4.9.4 or bind-4.9.3 source. For purposes here they
are equivalent, but you should get the latest one anyway. It is
available at ftp.vix.com. cd to the res directory. Edit the Makefile
and add -DSPRINTF_CHAR -DSUNOS -DSUNSECURITY and -PIC to the CFLAGS line.
Comment out lines 101-102 by putting a # at the beginning of the line.
(Make sure you use the bundled SunOS C compiler, the SunPRO compilers
will give you errors about redeclared identifiers).

4. You now have a library in the res directory, but you need to link
these files as a shared library with the tnm stuff. So, take all the
.o files from the res directory and copy them into the scotty unix
directory. Now, augment the ld command that failed in step 1 with
these same .o files (either add them to TNM_OBJS in the Makefile, or
execute the ld command by hand with all the tnm objects and bind
objects).

The command will look like this:
ld -assert pure-text -o tnm.so tnmInit.o tnmEvent.o tnmJob.o tnmIned.o
tnmSyslog.o tnmIcmp.o tnmDns.o tnmUdp.o tnmSunRpc.o tnmNtp.o tnmRpc.o
tnmHttp.o tnmNetdb.o tnmUnixLog.o mount_clnt.o mount_xdr.o ether_clnt.o
ether_xdr.o rstat_clnt.o rstat_xdr.o pcnfsd_clnt.o pcnfsd_xdr.o tnmAsn1.o
tnmMD5.o tnmSnmpNet.o tnmSnmpUtil.o tnmSnmpInst.o tnmSnmpSend.o tnmSnmpRecv.o
tnmSnmpAgent.o tnmSnmpTcl.o tnmMibQuery.o tnmMibParser.o tnmMibTree.o
tnmMibFrozen.o tnmMibTcl.o herror.o res_debug.o res_data.o res_comp.o
res_init.o res_mkquery.o res_query.o res_send.o getnetbyaddr.o getnetbyname.o
getnetent.o getnetnamadr.o gethnamaddr.o sethostent.o nsap_addr.o
hostnamelen.o inet_addr.o inet_ntop.o inet_pton.o

now type make again to continue with the build.

5. make install

6. edit $tcl_library/init.tcl and add:
lappend auto_path $tcl_library/../tnm2.1.1 $tcl_library/../tkined1.4.1
(I add it to the end of the file, but it doesn't much matter)

--
____________________________________________________________________________
Doug Hughes					Engineering Network Services
System/Net Admin  				Auburn University
			doug@eng.auburn.edu