1
This is an old version of the file "porting.notes". It contains
2
porting information that people submitted for Tk releases numbered
3
3.6 and earlier. You may find information in this file useful if
4
there is no information available for your machine in the current
5
version of "porting.notes".
7
I don't have personal access to any of these machines, so I make
8
no guarantees that the notes are correct, complete, or up-to-date.
9
If you see the word "I" in any explanations, it refers to the person
10
who contributed the information, not to me; this means that I
11
probably can't answer any questions about any of this stuff. In
12
some cases, a person has volunteered to act as a contact point for
13
questions about porting Tcl to a particular machine; in these
14
cases the person's name and e-mail address are listed. I'd be
15
happy to receive corrections or updates.
17
RCS: @(#) $Id: porting.old,v 1.2 1998/09/14 18:23:54 stanton Exp $
19
---------------------------------------------
21
---------------------------------------------
23
1. There appears to be a compiler/library bug that prevents tkTrig.c
24
from compiling unless you turn off optimization (remove the -O compiler
25
switch). The problem appears to have been fixed in the 1.3-4 version
28
---------------------------------------------
30
---------------------------------------------
33
HP-UX Release 7.05 on a series 300 (68k) machine.
34
The native cc has been used for production.
35
X11r4 libraries and include files were taken from
36
internet archives, where as the server came with HPUX release 7.05.
39
Symbol table space for cc had to be increased with: -Wc,-Ns3000
40
tkBind.c did not compile under -O:
41
C1 internal error in "GetField": Set Error Detected
43
tkBind.c did compile without optimization (no -O).
45
2. Note: if you have trouble getting xauth-style access control to work
46
(and you'll need xauth if you want to use "send"), be sure to uncomment
49
# Vuelogin*authorize: True
51
in the file /usr/vue/config/Xconfig, so that the server starts up with
52
authorization enabled. Also, you may have to reboot the machine in
53
order to force the server to restart.
55
---------------------------------------------
57
---------------------------------------------
59
Getting Tk to run under SCO Unix:
61
Add a "#undef select" to tkEvent.c, and remove the reference to TK_EXCEPTION
62
around line 460 of main.c.
64
Tk uses its own scheme for allocating the border colors for its 3D widgets,
65
which causes problems when running TK on a system with "PseudoColor"
66
display class, and a 16-cell colormap.
68
If you can't go to eight bitplanes, you can instead start the server with a
69
"-static" (Xsco) or "-analog" (Xsight) option, making the display class
70
become "StaticColor". This makes the entire colormap read-only, and it will
71
return the color that most closely maps to the desired color as possible.
73
---------------------------------------------
74
Silicon Graphics systems:
75
---------------------------------------------
77
1. Change the CC variable in the Makefile to:
79
CC = cc -xansi -D__STDC__ -signed
81
2. Change the LIBS variable in the Makefile to use the X11 shared library
82
("-lX11_s" instead of "-lX11").
84
3. Under some versions of IRIX (e.g. 4.0.1) you have to turn off
85
optimization (e.g. change "-O" in CFLAGS to "-O0" or remove it
86
entirely) because of faulty code generation. If the Tcl or Tk test
87
suites fail, turn off optimization.
89
4. Add a "-lsun" switch just before "-lm" in the LIBS definition.
90
Under some versions of IRIX (5.1.1.3?) you'll need to omit the
91
"-lsun" switch, plus remove the "-lsocket" and "-lnsl" switches
92
added by the configure script; otherwise you won't be able to
93
use symbolic host names for the display, only numerical Internet
96
5. Rumor has it that you'll also need a "-lmalloc" switch in the
99
6. In IRIX 5.2 you'll have to modify Makefile to fix the following problems:
100
- The "-c" option is illegal with this version of install, but
101
the "-F" switch is needed instead. Change this in the "INSTALL ="
103
- The order of file and directory have to be changed in all the
104
invocations of INSTALL_DATA or INSTALL_PROGRAM.
106
---------------------------------------------
108
---------------------------------------------
109
1. To allow ALT- sequences to work on the RS-6000, the following
110
line should be changed in tkBind.c:
113
{"Alt", Mod2Mask, 0},
115
{"Alt", Mod1Mask, 0},
117
---------------------------------------------
119
---------------------------------------------
121
1. The first major hurdle is that SVR4's select() subtly differs
122
from BSD select. This impacts Tk in two ways, some of the Xlib calls
123
make use of select() and are inherently broken and Tk itself makes
124
extensive use of select(). The first problem can't be fixed without
125
rebuilding one's Xlib, but can be avoided. I intend to submit part
126
of my work the XFree86 guys so that the next version of XFree86 for
127
SVR4 will not be broken. Until then, it is necessary to comment out
128
this section of code from Tk_DoOneEvent() (which is near line 1227):
131
void (*oldHandler)();
133
oldHandler = (void (*)()) signal(SIGPIPE, SIG_IGN);
136
(void) signal(SIGPIPE, oldHandler);
139
if you don't comment it out, some scripts cause wish to go into
140
an infinite loop of sending no-ops to the X server.
142
2. As for fixing Tk's calls to select(), I've taken the simple
143
approach of writing a wrapper for select and then using #define to
144
replace all calls to select with the wrapper. I chose tkConfig.h
145
to load the wrapper. So at the very end of tkConfig.h, it now looks
149
# include "BSDselect.h"
152
#endif /* _TKCONFIG */
154
The file BSDselect.h looks like this:
156
#include <sys/types.h>
157
#include <sys/time.h>
158
#include <sys/select.h>
160
/* This is a fix for the difference between BSD's select() and
161
* SVR4's select(). SVR4's select() can never return a value larger
162
* than the total number of file descriptors being checked. So, if
163
* you select for read and write on one file descriptor, and both
164
* are true, SVR4 select() will only return 1. BSD select in the
165
* same situation will return 2.
167
* Additionally, BSD select() on timing out, will zero the masks,
168
* while SVR4 does not. This is fixed here as well.
170
* Set your tabstops to 4 characters to have this code nicely formatted.
172
* Jerry Whelan, guru@bradley.edu, June 12th, 1993
177
BSDselect(nfds, readfds, writefds, exceptfds, timeout)
179
fd_set *readfds, *writefds, *exceptfds;
180
struct timeval *timeout;
185
rval = select(nfds, readfds, writefds, exceptfds, timeout);
188
case -1: return(rval);
191
case 0: if(readfds != NULL)
195
if(exceptfds != NULL)
201
default: for(i=0, rval=0; i < nfds; i++) {
202
if((readfds != NULL) && FD_ISSET
203
(i, readfds)) rval++;
204
if((writefds != NULL) && FD_ISSE
205
T(i, writefds)) rval++;
206
if((writefds != NULL) && FD_ISSE
207
T(i, exceptfds)) rval++;
211
/* Should never get here */
214
---------------------------------------------
215
CDC 4680MP, EP/IX 1.4.3:
216
---------------------------------------------
218
The installation was done in the System V environment (-systype sysv)
219
with the BSD extensions available (-I/usr/include/bsd and -lbsd). It was
220
built with the 2.20 level C compiler. The 2.11 level can be used, but
221
it is better to match what TCL is built with, which must be 2.20 or
222
higher (see the porting notes with TCL for the details).
224
To make the configure script find the BSD extensions, I set environment
225
variable DEFS to "-I/usr/include/bsd" and LIBS to "-lbsd" before
226
running it. I would have also set CC to "cc2.20", but that compiler
227
driver has a bug that loader errors (e.g. not finding a library routine,
228
which the script uses to tell what is available) do not cause an error
229
status to be returned to the shell (but see the Tcl 2.1.1 porting notes
230
for comments about using "-non_shared").
232
After running configure, I changed the CC definition line in Makefile
237
to match the TCL build. Skip this if the default compiler is already 2.20
240
---------------------------------------------
241
CDC 4680MP, EP/IX 2.1.1:
242
---------------------------------------------
244
The installation was done in the System V environment (-systype sysv)
245
with the BSD extensions available (-I/usr/include/bsd and -lbsd). It was
246
built with the 3.11 level C compiler. Earlier levels can be used, but it
247
is better to match what TCL is built with, which must be 2.20 or higher
248
(see the porting notes with TCL for the details).
250
To make the configure script find the BSD extensions, I set environment
251
variable DEFS to "-I/usr/include/bsd -non_shared" and LIBS to "-lbsd"
254
See the Tcl porting notes for comments on why "-non_shared" is needed
255
during the configuration step. It was removed from AC_FLAGS before
258
-------------------------------------------------
259
Pyramid, OSx 5.1a (UCB universe, GCC installed):
260
-------------------------------------------------
262
Instead of typing "./configure" to configure, type
264
DEFS="-I/usr/include/X11/attinc" ./configure
266
to sh to do the configuration.
268
-------------------------------------------------
270
-------------------------------------------------
272
1. Run configure with predefined CPP:
273
CPP='cc -E' ./configure
274
(If your shell is [t]csh, do a "setenv CPP 'cc -E'")
277
-add the following to AC_FLAGS:
280
Note: Tk's raise test may fail when running the tvtwm window manager.
281
Changing to either twm or even better fvwm ensures that this test will
284
-------------------------------------------------
285
Encore 91, UMAX V 3.0.9.3:
286
-------------------------------------------------
288
1. Modify the CFLAGS definition in Makefile to include -DENCORE:
292
2. "mkdir" does not by default create the parent directories. The mkdir
293
directives should be modified to "midir -p".
295
3. An error of a redeclaration of read, can be resolved by conditionally
296
not compiling if an ENCORE system.
299
extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
302
-------------------------------------------------
303
Sequent machines running Dynix:
304
Contact: Andrew Swan (aswan@soda.berkeley.edu)
305
-------------------------------------------------
307
1. Use gcc instead of the cc distributed by Sequent
309
2. There are problems with the distributed version of
310
<stddef.h>. The easiest solution is probably to create a
311
copy of stddef.h, make sure it comes early in the include
312
path and then edit it as need be to eliminate conflicts
313
with the X11 header files.
315
3. The same comments about the tanh function from the notes on
316
porting Tcl apply to Tk.
318
-------------------------------------------------
319
Systems running Interactive 4.0:
320
-------------------------------------------------
322
1. Add "-posix" to CFLAGS in Makefile (or Makefile.in).
324
2. Add "-lnsl_s" to LIBS in Makefile (or Makefile.in).