scotty 2.1.5 with Ultrix 4.3a ?

Bernd Hentig (bernd@finow.snafu.de)
Thu, 24 Apr 1997 09:46:43 +0100 (WET DST)

Hi.
I am trying to compile tcl7.6/tk4.2 + scotty 2.1.5 on an ancient
Ultrix 4.3a machine, the previous version tcl7.4/tk4.0/scotty 2.0.x
compiled + were running stable for the last 12 months or so.

I was able to compile the tcl7.6/tk4.2 version with both gcc+gas+gld
and cc+as+ld, the previous mix of gcc+as+ld does not work any more with
gcc 2.7.2 due to 'internal assembler errors'.
The ultrix 'as' generated some core dumps at first due to illegal opcodes,
switching off the (buggy) cc optimizer cured this problem.

When I try to compile scotty2.1.5, the native cc + as combination produces
the following errors:

---
cc -c -O  -G 0  -I. -I./../tnm/generic -I/usr/local/include ./../tnm/generic/tnmDns.c
cfe: Error: ./resolv.h: 72: Cannot open file sys/bitypes.h for #include
cfe: Error: ./resolv.h: 76: Cannot open file sys/cdefs.h for #include
---
O.k., this one is easy, as the resolv.h file in scotty2.1.5/unix won't
compile because "bitypes.h" and "cdefs.h" are not available for Ultrix. 
I removed the unix/resolv.h file and the problem disappeared.
I guess changing the include path from -I. to '-I/usr/include -I.' will
also fix this, but I'm unsure why the resolv.h is in scotty/unix at all.

Next problem is: cc -c -O -G 0 -I. -I./../tnm/generic -I/usr/local/include ./../tnm/generic/tnmSunRpc.c cfe: Warning: ./../tnm/generic/tnmSunRpc.c, line 157: illegal combination of pointer and integer char *p = clnt_spcreateerror(""); ----------^ cfe: Warning: ./../tnm/generic/tnmSunRpc.c, line 186: illegal combination of pointer and integer char *p = clnt_sperrno(res); ----------^ cfe: Warning: ./../tnm/generic/tnmSunRpc.c, line 836: illegal combination of pointer and integer p = clnt_sperrno(res); ------^ O.k., the ANSI prototypes for clnt_* are missing here, so cc assumes that clnt_xxx return integers, but int and char * are both 4 bytes on Ultrix, so I ignored the warnings. Perhaps the problem goes away when installing sunrpc.

Next problem is:

---
cfe: Error: ./../tnm/generic/tnmDns.c, line 160: 'INADDR_LOOPBACK' undefined, reoccurrences will not be reported
            server->S_un.S_addr  = htonl(INADDR_LOOPBACK);
---
This one is easy too, I merged the following line to tnmUnixPort.h:
---
#ifndef INADDR_LOOPBACK
#define       INADDR_LOOPBACK         (u_long)0x7F000001
#endif
---
and tnmDns.c compiled.

Now everything goes fine until I try to install scotty, I get the following errors:

---
...
Installing ./../tnm/library/init.tcl
initialization failed: ld: cannot open linker script file 08038000: No such file or directory
make: *** [tnm-install-library] Error 1
---
Now I'm confused, because the native linker didn't complain when loading
scotty and tkined at first, and I don't know what file 08038000 means.

Of course, Ultrix does not have shared libraries, so even if I say "configure --enable-shared" it won't generate a libtcl.so file for me. There is a ldAout.tcl file in the tcl sources that fakes a dynmamic loader, but that's all about it. Next I tried to create a libtnm.a and libined.a and statically link scotty and tkined, but the result was the same (to my great astonishment).

So I tried to compile with gcc2.7.2 + gas + gld, but I get nearly the same error:

---
Installing ./../tnm/library/init.tcl
initialization failed: ld: cannot open linker script file 10038000: No such file or directory
make: *** [tnm-install-library] Error 1
----
Now its file 10038000 instead of 08038000, but the result is still the same.
I guess scotty doesn't generate the proper static libraries any more but
tries to produce some "lib..o" ... I really don't know if this works for Ultrix.
I tried to find some information in the tcl sources, but documentation is very
very sparse on this item.

a. Has anyone (successfully) compiled scotty-2.1.5 for Ultrix ? b. What exactly does 'ldAout.tcl' do ? Why does scotty produce files ending in '..o' and how does it all work together ? Is there a dynmamic loading scheme for Ultrix ?

Bernd

-- 
+-----------------------------------------------------------+
|Bernd Hentig		        |email: Bernd.Hentig@guug.de|
|Parkstr. 10			|Fon: +49 3335 3233 0       |
|D-16244 Finowfurt (Germany)    |FAX: +49 3335 3233 1       |
+-----------------------------------------------------------+
--
!! 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.