Re: BSDI and Tcl/Tk 7.6/4.2 an Scotty 2.1.5

Cameron Laird (claird@Starbase.NeoSoft.COM)
Tue, 7 Jan 1997 20:39:19 -0600 (CST)

From owner-tkined@ibr.cs.tu-bs.de Tue Jan 7 19:35:31 1997
.
.
.
Ronnie> Is it possible to compile Scotty 2.1.5 under BSDI 2.1
Ronnie> with Tcl/Tk 7.6/4.2?
Kind of.

Ronnie> I can run the configure script without a problem,
Ronnie> but when I thry to compile I get the following:

Ronnie> ~/tcl/scotty-2.1.5/unix > make
Ronnie> cc -c -O -fPIC -I. -I./../tnm/generic -I/usr/contrib/include
Ronnie> ./../tnm/generic/tnmDns.c
Ronnie> cc1: Invalid option `-fPIC'

This looks bad. Make sure you are using the correct compiler options
to create position independent code. If BSDI can't build dynamic
loadable Tcl packages, you either have to rewrite the Makefiles and
the Scotty initialization code or you have to fix Tcl7.6 on BSDI (or
the other way round :-).
The PIC stuff surprises me a bit.
I'm not sure why you're running
into that, but, as Juergen hints,
tinkering with compiler options
will probably get you what you
want quickly.

More serious is that most (but ap-
parently not all, according to one
correspondent) BSDIs don't know how
to construct dynamically loadable
Tcl packages. I've taken to hacking
at the Makefile to get it to work
<URL:http://starbase.neosoft.com/
~claird/comp.lang.tcl/scotty.html#mine>
and it's now routine for me, but I
haven't decided yet how to document
it so that others have the complete
story. If there aren't enough details
for you in the URL above, tell me,
and I'll work on it a bit more.

Ronnie> ./../tnm/generic/tnmDns.c: In function DnsInit:
Ronnie> ./../tnm/generic/tnmDns.c:160: `INADDR_LOOPBACK' undeclared (first use
Ronnie> this function)

This one is interesting. INADDR_LOOPBACK is explicitely defined in
unix/tnmUnixPort.h for those UNIX versions that don't define this
constant. I have no idea why this definitions is not available in
tnmDns.c (which includes tnmPort.h which includes tnmUnixPort.h).
Yes you do, Juergen; we've talked
about it before <URL:http://www.
cs.tu-bs.de/ibr/projects/nm/tkined/
marchive-1996/1165.html>. Can you
make a pointing of mentioning this
in the porting.notes, please?
Anyway, copy the define into tnmDns.c if this helps.
Presumably from /usr/include/rpc/types.h,
which is where it's likely to appear for
BSDI.

Finally, ignore all the warnings that are caused by incompatible
resolver prototypes.
Agreed.
.
.
.
Cameron Laird
Network Engineered Solutions http://starbase.neosoft.com/~bodi/nesi.html
claird@calladan.com +1 713 763 8366
claird@NeoSoft.com +1 281 996 8546 FAX
Houston WWW Business Guide: http://starbase.neosoft.com/~bodi/HouGuide.html