-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
285 lines (205 loc) · 10.2 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
HOW TO COMPILE AND INSTALL TIGCC FROM SOURCE
============================================
Please note: read README.linux first. The instructions below apply only to
compiling and installing the whole package from source if you need to do that. I
recommend installing from binaries if possible.
REQUIREMENTS
------------
You must have the following programs before you attempt
to install tigcc-unix.
REQUIRED:
1. gcc 2.95 or later (other compilers are NOT supported)
2. binutils 2.8 or later (gnu or equivalent --
ld, ar, as, etc.)
3. gnu patch (Solaris patch will NOT work)
4. bzip2 (to decompress this archive)
5. tar (gnu tar is best, but Solaris and SGI should be okay)
6. gnu make
7. At least 130 MB of free space (archive expands to over 80,
build can take another 30-40 depending upon architecture)
8. bison or yacc
9. flex
OPTIONAL:
10. Windows or WINE to compile the documentation from source
(optional: the source distribution includes pre-generated HTML
documentation)
11. A dialog executable (any of: kdialog, xdialog, gdialog, cdialog or
dialog), if and only if you want to use the wizard (optional: the
wizard now uses plain bash if no dialog executable is available)
If you run into any problems, please contact me and let me know
where the install failed...
If you want to recompile TIGCC-Linux, you will need to dowload:
gcc-core-4.1-20060728.tar.bz2 (gcc-core, full gcc may not compile !)
binutils-2.16.1.tar.bz2
Depending on your machine, compilation can take some time !
INSTALLING TIGCC FOR UNIX
-------------------------
The installation should be very simple. The package has worked on
Linux, Solaris 8, and SGI IRIX 6 to try and make the scripts
compatible. UN*X provides some things better, some things worse. Let we know
if you have a problem with the worse...
First, extract the source to a directory of your choosing such as /tmp.
Unpack binutils & gcc-core packages to the download/ directory as this, and
create symlinks download/gcc.ti and download/binutils.ti pointing to them.
Note that the sources on tigcc.ticalc.org ONLY support Linux/x86 and Windows, so
you will need the COMPLETE GCC (gcc-core only, not the whole compiler
collection) and Binutils sources from a GNU mirror for all other platforms. So,
you should have done it like this:
mkdir /tmp/tigcc-src
cd /tmp/tigcc-src
# substitute the directory you are using for /tmp
bunzip2 tigcc-src.tar.bz2
tar xfv tigcc-src.tar
mkdir download
cd download
bunzip2 binutils-2.16.1.tar.bz2 gcc-core-4.1-20060728.tar.bz2
tar xvf binutils-2.16.1.tar
tar xvf gcc-core-4.0.2.tar
ln -s binutils-2.16.1 binutils.ti
ln -s gcc-4.1-20060728 gcc.ti
cd ..
At this point, you have 2 options:
1. Use the installation wizard
------------------------------
All you need to do now is:
cd scripts; ./Install
and follow the instructions. If you want a text-mode install on a system with
KDE installed, you can use:
cd scripts; DIALOG=dialog ./Install
to tell the script to use the text-mode (curses) dialog instead of kdialog.
You will be prompted for:
* the destination directory you want to install TIGCC to ($TIGCC)
* the bootstrap compiler ($CC) you want to compile TIGCC with (usually "gcc")
* the optimization flags ($CFLAGS) you want to compile TIGCC with (read the GCC
documentation or just use the defaults)
The wizard will ask you whether you want to apply the TIGCC patch. The answer is
usually "Yes". It will be "No" only if you are rebuilding the same source for a
second (or more) time.
When done, the wizard will ask you whether you want to add your $TIGCC setting
to bashrc. If you answer "Yes", you are done here, you only need to restart
bash. If you prefer to do things by hand, answer "No" and follow the
instructions in section 2.1 below. (If you selected "No", but changed your mind,
you can also run envreg by hand afterwards.)
2. Use the install scripts directly
-----------------------------------
2.1. Environment variable settings
----------------------------------
Now, set the environment variable TIGCC to the directory you want to install
TIGCC into (for example /usr/local/tigcc). You need to set this variable in your
profile, because the compilation stage needs it to find some tools and tigcc
front-end needs it to find the header files.
If you use bash, add it to your .bashrc file in your home
directory. You could also use your .profile or .login if
you have those. If you use tcsh or csh, put it in your
.cshrc file (or if you use .tcshrc, put it there).
I've never used korn shell. You're on your own if you do.
For bash/sh users
export TIGCC=/usr/local/tigcc
export PATH=$PATH:$TIGCC/bin
For csh/tcsh users
setenv TIGCC /usr/local/tigcc
set path=($path $TIGCC/bin)
I've had problems using setenv to reset the path in tcsh.
setenv path "$path ${TIGCC}/bin"
doesn't seem to work.
You may need to logout and log back in for that to take
effect. Or you can resource your profile.
source ~/.profile
source ~/.bashrc
source ~/.cshrc
source ~/.tcshrc
You only need to resource the file you changed.
2.2. Installation
-----------------
The hard part should be over. Now, just change into the directory
you extracted tigcc into
cd /tmp/tigcc-src
Optionally, you can now rebuild the HTML documentation from source: the required
source code is in tigcclib/doc/source.tar.bz2 in your source tree. See the last
section below for instructions to compile the documentation. Note that the tools
to compile the documentation from source are for Windows only, so you will need
Windows or WINE if you want to build the documentation from source. Unless of
course you manage to port the Delphi sources of those tools yourself.
Note that it comes precompiled, so you need not do this. (As for platform-
independence: the documentation is "compiled" into platform-independent HTML
files, so compiling it from source should usually not be necessary.)
And run the installation script...
export CFLAGS='-Os -s'
cd scripts; ./Install_All
Assuming you have all the required tools, you should have yourself
a tigcc build in 5 - 60 minutes.
I don't know how much time it will take you. It took less than
10 minutes on a Linux system with a Pentium II 450 and 128 MB RAM.
But, it took 45 minutes on a Linux system with a K6 233 and 112MB RAM.
It took nearly 40 minutes on a Solaris Sparc 400 with 256 MB RAM,
but it had to read off a network with many other users, so that
may have had some impact on compile time.
It took over an hour on an SGI O2 machine. I would assume it's due
to the slow SGI c compiler, which binutils and gcc will try and
compile themselves with. Since you have a recent version of gcc,
try setting CC=gcc and CXX=g++ to speed things up. You must have
gcc 2.95 or above for this to work.
I hope this installation goes smoothly for you.
2.3. ALTERNATE WAY for installation
-----------------------------------
The following is the "hard" way to do step 2.2. It is used primarily for
development purposes. You can use this if you experience some problems with the
automated script.
At first, you will have to register a variable depending on the location you
want to install TIGCC
export TIGCC=/usr/local/tigcc
export PATH=$PATH:$TIGCC/bin
export CFLAGS='-Os -s'
Next, simply go into the scripts directory.
Then you must apply the patch supplied with this package:
./Install_step_1
Next, compile binutils and gcc. This may take a while...
./Install_step_2
If everything went correctly, you now should have a working Tigcc for Linux
compiler. For installing the TIGCC library, simply launch:
./Install_step_3
If you want to be able to use it, you should add /usr/local/tigcc to your
PATH. The compiler is named m68k-coff-gcc, to avoid namecollision with your
system's gcc. The other utilities follow the same naming.
You may need the TIGCC Tools Suite utilities (required for using the tigcc
front-end). Simply do:
./Install_step_4
At last, you have to install the full documentation by
./Install_step_5
REBUILDING THE DOCUMENTATION FROM ITS TRUE SOURCE (REQUIRES WINDOWS)
--------------------------------------------------------------------
This section is lifted from Sebastian's Readme.txt accompanying the Windows
source release. Note that the Linux/Unix source release includes pre-generated
HTML documentation, so you only need to rebuild it if you modify the hs? files.
First, modify the file HelpSystem.ini in the 'Programs' subfolder of the
'Doc' folder to reflect your actual folder names. It exists so that the
'Programs' folder can reside at any given place on the hard disk.
Then, you need to call all 'Update...' programs once.
UpdateInclude.exe and UpdateInfo.exe take one or more complete file name(s)
as parameters. The actual names of the files are discarded, and the remaining
folder name is the folder to be updated. If the first parameter is '/ALL' or
no parameters are specified, all folders are updated, and in case of
UpdateInclude.exe, a header file index is generated.
UpdateKeywords.exe and UpdateIndex.exe do not take any parameters.
To compile the documentation, download the HTML Help Workshop from
http://msdn.microsoft.com. Then compile the project in the 'System\CHMFiles'
folder.
Tools to make editing help system files more convenient are also included in
this distribution.
A tools to create help system files from the original GNU Texinfo documents
is included as well, but it might need a recompilation to work with future
versions of the documentation. Anyway, the .texi files should be in the
current directory, and you should specify one of them in the command line.
The appropriate subfolders need to exist (e.g. gnuexts).
If you need detailed information about the file formats, look at the
Readme.txt file in the documentation folder.
When done with building the CHM documentation, you can convert it to the QT
assistant format using my converters:
cd srcdir/doc/converter # substitute the directory you are using for srcdir
gcc -Os -s -Wall -W -Wwrite-strings chm2dcf.c -o chm2dcf # compile chm2dcf
cd ../html
../converter/chm2dcf # convert the CHM to a Documentation Content File (DCF)
../converter/dcf2adp # convert the DCF to an Assistant Document Profile (ADP)
(There is also a script called updatedoc to automate the copying and
converting of the documentation.)
WARNING: chm2dcf is slooooow. You have been warned.