3245
|
1 The information in this file is from A. Scottedward Hodel |
|
2 <A.S.Hodel@Eng.Auburn.EDU>. |
|
3 |
|
4 I've installed and run Octave 2.0.12 on Power MachTen 4.1. I've |
|
5 also installed Octave-2.1.14 on Power MachTen 4.1.1 (the process is slightly |
|
6 different). This note contains instructions on how to port octave to MachTen |
|
7 4.1/4.1.1. |
|
8 |
|
9 Many thanks to Tenon Intersystems support for their help in porting to |
|
10 Machten 4.1.1. |
|
11 |
|
12 Contents: |
|
13 (1) Definitions |
|
14 (2) Future work |
|
15 (3) Instructions for installation of Octave 2.0.12 on MachTen 4.1. |
|
16 (4) Instructions for installation of Octave 2.1.14 on MachTen 4.1.1. |
|
17 |
|
18 (1) Definitions: |
|
19 ============ |
|
20 Power MachTen: Unix that runs simultaneously with MacOS on Mac computers. |
|
21 see http://tenon.com for more information. |
|
22 |
|
23 Octave: a Matlab-like programming language that is freely distributable |
|
24 under the terms of the gnu copyright rules. Octave is NOT |
|
25 (and will not) be a MATLAB(tm) clone; however, the functionality |
|
26 of the program is similar. |
|
27 |
|
28 see: http://bevo.che.wisc.edu/octave for more information. |
|
29 a control systems toolbox is available at |
|
30 ftp://ftp.eng.auburn.edu/pub/hodel/OCST* |
|
31 |
|
32 (2) Future work: |
|
33 ============= |
|
34 Dynamic linking is apparently not yet supported, so .oct files cannot be used |
|
35 (yet) in Power MachTen. |
|
36 |
|
37 (3) To install Octave on MachTen 4.1: |
|
38 ============= |
|
39 Short instructions: MachTen automatically defines __MACHTEN_PPC__ on |
|
40 power MachTen. The octave configure script sets most everything up properly. |
|
41 Here's a few details that also need done: |
|
42 |
|
43 (a) Put libncurses into the Tenon Application Library Folder |
|
44 (b) Replace the MT /usr/bin/sed with gnu sed (I used 2-0.5). |
|
45 (c) <sys/signal.h>: Is fixed in MachTen 4.1.1 |
|
46 (d) Set virtual memory to a huge number (I used 200Mb) |
|
47 (f) make all; it will fail on toplev.cc due to a problem with src/oct-conf.h |
|
48 (g) Fix src/oct-conf.h and make all again. |
|
49 (g) make install |
|
50 |
|
51 Here are the details for the above items: |
|
52 (a) Be sure that libncurses is in the Tenon Application Library in |
|
53 the Extensions folder: |
|
54 |
|
55 (i) use resedit. |
|
56 (ii) Open the libncurses file in folder: |
|
57 Extensions/Tenon Applications Library/disabled |
|
58 (iii) Open the cfrag resource. Scroll down a bit and you will find the |
|
59 string libcurses. Change it to libncurses. Save. |
|
60 (iv) Change (File Menu/File Information) the file creator to MUMM. Save. |
|
61 (v) now move libncurses out of the disabled folder to |
|
62 Extensions/Tenon Applications Library |
|
63 (vi) Reboot. |
|
64 |
|
65 (b) Replace the MT /usr/bin/sed with gnu sed (I used 2-0.5). |
|
66 This fixes a problem with the kpathsea/klibtool script. |
|
67 |
|
68 (c) Login as root and apply the following patch to /usr/include/sys/signal.h: |
|
69 Otherwise src/sighandlers.cc will not compile properly. (The change |
|
70 is consistent with <sys/signal.h> headers on our sun network as well.) |
|
71 |
|
72 *** signal.h.old Thu May 7 13:16:11 1998 |
|
73 --- signal.h Thu May 7 13:34:27 1998 |
|
74 *************** |
|
75 *** 253,260 **** |
|
76 /* |
|
77 * Signal vector "template" used in sigaction call. |
|
78 */ |
|
79 ! #struct sigaction { |
|
80 void (*sa_handler)(); /* signal handler */ |
|
81 sigset_t sa_mask; /* signal mask to apply */ |
|
82 int sa_flags; /* see signal options below */ |
|
83 }; |
|
84 --- 253,264 ---- |
|
85 /* |
|
86 * Signal vector "template" used in sigaction call. |
|
87 */ |
|
88 ! struct sigaction { |
|
89 ! #ifdef __cplusplus |
|
90 ! void (*sa_handler)(int); /* signal handler */ |
|
91 ! #else |
|
92 void (*sa_handler)(); /* signal handler */ |
|
93 + #endif |
|
94 sigset_t sa_mask; /* signal mask to apply */ |
|
95 int sa_flags; /* see signal options below */ |
|
96 }; |
|
97 |
|
98 |
|
99 (d) Set virtual memory to a huge number (I used 120Mb). Otherwise compiles |
|
100 will fail. |
|
101 |
|
102 (e) (cd src ; make oct-conf.h) |
|
103 |
|
104 (f) Fix src/oct-conf.h |
|
105 |
|
106 You'll need to change the line |
|
107 |
|
108 #define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" |
|
109 to |
|
110 #define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=\":\" |
|
111 |
|
112 It should have been done automatically (take a look at UGLY_DEFS in |
|
113 the toplevel Makeconf), but for some reason it doesn't go. Failure to |
|
114 edit oct-conf.h results in a compilation error in toplev.cc. |
|
115 |
|
116 (g) make all |
|
117 (h) make install |
|
118 |
|
119 And that should do it. |
|
120 |
|
121 (4) To install Octave on MachTen 4.1.1: |
|
122 ============= |
|
123 Short instructions: MachTen automatically defines __MACHTEN_PPC__ on |
|
124 power MachTen. The octave configure script sets most everything up properly. |
|
125 Here's a few details that also need done: |
|
126 |
|
127 (a) libncurses, sed, and <sys/signal.h>: are fixed in PowerMachTen 4.1.1 (but not in |
|
128 4.1) |
|
129 (b) Power MachTen uses gcc-2.8.1, which requires more memory than the |
|
130 version used in PowerMachTen 4.1. I set virtual memory to 200 Mb. |
|
131 (c) From Tenon technical support: (Thanks!) |
|
132 >I think that we have compiling Octave on MachTen. The problem results |
|
133 >from the fact that the stack space on the f771 application is not set. |
|
134 >This results in f771 running out of memory and corrupting the system |
|
135 >process manager heap. To fix this, try: |
|
136 > |
|
137 >setstackspace 0x100000 /usr/lib/gcc-lib/powerpc-apple/machten4/2.8.1/f771 |
|
138 |
|
139 For some reason my system didn't follow the soft links to |
|
140 /usr/macppc/lib/gcc-lib/powerpc-apple-machten4/2.8.1/f771. I was |
|
141 able to do the command manually with the above path. |
|
142 |
|
143 (d) For increased speed in compiling and decreased disk space requirements, |
|
144 you may also wish to omit the "-g" flag from compiler options: |
|
145 in the configure script: |
|
146 - search for machten (line 2651 in 0ctave-2.1.14). |
|
147 - modify so that this section reads |
|
148 powerpc-apple-machten*) |
|
149 FFLAGS= |
|
150 # remove -g to keep binary size down |
|
151 CFLAGS=`echo ${CFLAGS} | sed '1,$s/-g//'` |
|
152 CXXFLAGS=`echo ${CXXFLAGS} | sed '1,$s/-g//'` |
|
153 LDFLAGS=`echo ${LDFLAGS} | sed '1,$s/-g//'` |
|
154 ;; |
|
155 |
|
156 Also remove -g from: |
|
157 LDFLAGS in readline/examples/Makefile.in |
|
158 |
|
159 (e) Run configure (use the --prefix flag if desired) |
|
160 |
|
161 (f) (cd src ; make oct-conf.h) |
|
162 |
|
163 (g) Fix src/oct-conf.h |
|
164 |
|
165 You'll need to change the line |
|
166 |
|
167 #define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" |
|
168 to |
|
169 #define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=\":\" |
|
170 |
|
171 It should have been done automatically (take a look at UGLY_DEFS in |
|
172 the toplevel Makeconf), but for some reason it doesn't go. Failure to |
|
173 edit oct-conf.h results in a compilation error in toplev.cc. |
|
174 |
|
175 (h) make all |
|
176 |
|
177 Be prepared to wait quite awhile. Most of the time is spent waiting |
|
178 for individual ar commands to build the libraries. |
|
179 |
|
180 (i) make install |