Compiling/execution problems!!!

Dennis G. Totin (totidg@rdxsunhost.aud.alcatel.com)
Wed, 21 Aug 96 09:18:30 CDT

I'm having extreme difficulty in getting Scotty to compile/run properly
on a Sparc-5 running SunOS4.1.4

I keep getting the following error when loading ...

tclsh7.5
% load tnm.so
ld.so: Undefined symbol: __res

Has anybody overcome a similar problem?

The entire problem is outlined below.
-----------------------------------------------------

The first problem happened during the final linking stage ...

ld 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 -o tnm.so -lnsl -lrpcsvc -lresolv
ld: /usr/lib/libresolv.a(gethostnamadr.o): can't mix pic and PIC .o
*** Error code 4
make: Fatal error: Command failed for target `tnm.so'

-------------------

I downloaded resolv+2.1.1 and compiled it (which also had problems)...

cc -DNIS -DDEBUG -O -Iinclude -c res_init.c
"res_init.c", line 81: _PATH_RESCONF undefined
"res_init.c", line 173: MAXDFLSRCH undefined

-------------------

I seemingly fixed these problems by adding these two symbols to the Make file,
although, I couldn't get the Shared Library to compile ....

awk -f lorder.awk </usr/lib/shlib.etc/lorder-sparc >lorder-sparc
ld -assert pure-text `/usr/lib/shlib.etc/objsort lorder-sparc tmp` -ldl
sh: 25856 Memory fault - core dumped
*** Error code 139
make: Fatal error: Command failed for target `libc.so'

-------------------

I rebuilt Scotty using the new libresolv.a file but now I get the following error
wheneven I try to load the tnm.so Shared Object ...

tclsh7.5
% load tnm.so
ld.so: Undefined symbol: __res