Re: [tkined] problems compiling scotty-2.1.6 with msql-1.0.11

Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Fri, 12 Sep 1997 09:22:04 -0500

>Hello!
>
>I have tried to install scotty-2.1.6 on a SPARCstation 20 with Solaris
>2.5.1, Tcl/Tk 8.0 (dynamically linked) and mSQL 1.0.11 (statically linked):
>
>./configure --enable-gcc --enable-msql
>gmake 'CFLAGS=-O2 -DHAVE_RPCENT' fails:
>
>There is a problem with 'libmsql.a':
>
>/usr/ccs/bin/ld -G -z text tnmInit.o tnmUtil.o tnmJob.o tnmIned.o tnmSyslog.o tnmIc
>mp.o tnmDns.o tnmEvent.o tnmUdp.o tnmSunRpc.o tnmNtp.o tnmRpc.o tnmHttp.o tnmNetdb.
>o tnmUnixInit.o tnmUnixLog.o tnmUnixSocket.o tnmUnixIcmp.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 tnmAs
>n1.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 msqltcl.o -o tnm.so -L/usr/local/Minerva/lib -lmsql
>Text relocation remains referenced
> against symbol offset in file
>free 0x67c /usr/local/Minerva/lib/libmsql.a(libmsql.o)
>free 0x198 /usr/local/Minerva/lib/libmsql.a(libmsql.o)
>free 0x60c /usr/local/Minerva/lib/libmsql.a(libmsql.o)
>
>[...]
>
>readTimeout 0x244 /usr/local/Minerva/lib/libmsql.a(net.o)
>readTimeout 0x23c /usr/local/Minerva/lib/libmsql.a(net.o)
>readTimeout 0x39c /usr/local/Minerva/lib/libmsql.a(net.o)
>readTimeout 0x398 /usr/local/Minerva/lib/libmsql.a(net.o)
>readTimeout 0x258 /usr/local/Minerva/lib/libmsql.a(net.o)
>readTimeout 0x25c /usr/local/Minerva/lib/libmsql.a(net.o)
>
>[...]
>
>ld: fatal: relocations remain against allocatable but non-writable sections
>gmake: *** [tnm.so] Error 1
>
>Can someone help me?

Don't statically link msql with your applications. Create an msql loadable
module for Tcl (instructions should be included with 2.X on how to do this)
and then use load or package require to load in msql just like you do
with TNM. This gives you MUCH better flexibility as to what you can link
with what, plus you don't have to link in msql with every application that
you build.

So, rebuild scotty without msql support, and then dynamically load msql, and
it all works just fine.

(I do this now. I collect SNMP data from our hubs and rmon taps and stick
it in an MSQL database)

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

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.