source: general/prog/fpc.xml@ 904df6ec

lazarus
Last change on this file since 904df6ec was 904df6ec, checked in by Thomas Trepl (Moody) <thomas@…>, 3 years ago

Add qt5pas

  • Property mode set to 100644
File size: 11.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY fpc-bin-x86-dl "https://mirror.freemirror.org/pub/fpc/dist/&freepascal-bin-version;/x86_64-linux/fpc-&freepascal-bin-version;-x86_64-linux.tar">
8 <!ENTITY fpc-bin-x86-md5sum "519c5e0b9e7b61c07d61511a52aaecaa">
9 <!ENTITY fpc-bin-x86-size "80.4 MB">
10 <!ENTITY fpc-bin-x86-bldsize "x.x MB">
11
12 <!ENTITY fpc-bin-i686-dl "https://mirror.freemirror.org/pub/fpc/dist/&freepascal-bin-version;/i386-linux/fpc-&freepascal-bin-version;.i386-linux.tar">
13 <!ENTITY fpc-bin-i686-md5sum "2d9dece3f2c83a82cb07e422e59ca91e">
14 <!ENTITY fpc-bin-i686-size "146.7 MB">
15 <!ENTITY fpc-bin-i686-bldsize "x.x MB">
16
17 <!ENTITY fpc-src-dl "https://mirror.freemirror.org/pub/fpc/dist/&freepascal-version;/source/fpc-&freepascal-version;.source.tar.gz">
18 <!ENTITY fpc-src-md5sum "e7649ad0fc9230fdd9493a7fcabbd426">
19 <!ENTITY fpc-src-size "49.8 MB">
20 <!ENTITY fpc-src-bldsize "x.x MB">
21
22 <!ENTITY fpc-tmp-target "/opt/fpc-temp">
23]>
24
25<!--
26 TODO:
27 The instructions below does the bootstrap by using a
28 binary package to compile the compiler.
29 I've never tested whether the built compiler is capable
30 to recompile itself, maybe it work, maybe not. With the
31 compiler which is installed, building QT5PAS and Lazarus
32 (the Delphi-like GUI) with QT or GTK2 toolkits does work.
33
34 We definitly should test this and maybe tweak the instructions
35 to do a correct build to enable this.
36-->
37
38<sect1 id="fpc" xreflabel="FreePascal-&freepascal-version;">
39 <?dbhtml filename="fpc.html"?>
40
41 <sect1info>
42 <date>$Date$</date>
43 </sect1info>
44
45 <title>FreePascal-&freepascal-version;</title>
46
47 <indexterm zone="java">
48 <primary sortas="a-java">FreePascal Binary</primary>
49 </indexterm>
50
51
52 <sect2>
53 <title>About FreePascal</title>
54 <para>
55 FreePascal is a compiler software used to translate Pascal
56 source code to executable programs. An introductory Pascal
57 program looks like:
58 </para>
59
60<screen><literal>program Hello;
61begin
62 writeln('Hello world!');
63end.</literal></screen>
64
65 <para>
66 The <application>FreePascal</application> package does not only
67 contain the compiler itself but also a complete semi-graphical,
68 text based IDE. This IDE can be operated using keyboard commands
69 and by mouse interaction. The IDE is constructed with a toolkit
70 previously named <application>Turbo Vision</application> which
71 was introduced by Borland somewhere back in the MS-DOS age
72 together with <application>Turbo Pascal 6.0</application>
73 - that was in Nov. 1990.
74 </para>
75
76 <para>
77 blah...
78 </para>
79
80 </sect2>
81
82 <sect2 id="fpc-bin" xreflabel="FPC Binary" role="package">
83 <title>Binary FreePascal Information</title>
84
85 <para>
86 Creating the <application>FreePascal</application> compiler from
87 source requires a <application>FreePascal</application> compiler
88 to be available. This is a circular dependency which can be
89 solved by using a precompiled package.
90 </para>
91
92 <para>
93 To start, we set up a binary installation of <application>FreePascal</application>
94 created by the FreePascal development team. It is installed in the <filename>/opt</filename>
95 directory to be easily removed after the source based version
96 has been installed.
97 </para>
98
99 &lfs110a_checked;
100
101 <bridgehead renderas="sect3">Binary Package Information</bridgehead>
102 <itemizedlist spacing="compact">
103 <listitem>
104 <para>
105 Binary download (x86): <ulink url="&fpc-bin-i686-dl;"/>
106 </para>
107 </listitem>
108 <listitem>
109 <para>
110 Download MD5 sum: &fpc-bin-i686-md5sum;
111 </para>
112 </listitem>
113 <listitem>
114 <para>
115 Download size (binary): &fpc-bin-i686-size;
116 </para>
117 </listitem>
118 <listitem>
119 <para>
120 Estimated disk space required: &fpc-bin-i686-bldsize;
121 </para>
122 </listitem>
123 </itemizedlist>
124 <itemizedlist spacing="compact">
125 <listitem>
126 <para>
127 Binary download (x86_64): <ulink url="&fpc-bin-x86-dl;"/>
128 </para>
129 </listitem>
130 <listitem>
131 <para>
132 Download MD5 sum: &fpc-bin-x86-md5sum;
133 </para>
134 </listitem>
135 <listitem>
136 <para>
137 Download size (binary): &fpc-bin-x86-size;
138 </para>
139 </listitem>
140 <listitem>
141 <para>
142 Estimated disk space required: &fpc-bin-x86-bldsize;
143 </para>
144 </listitem>
145 </itemizedlist>
146
147 <bridgehead renderas="sect3">Source Package Information</bridgehead>
148 <itemizedlist spacing="compact">
149 <listitem>
150 <para>
151 Source download: <ulink url="&fpc-src-dl;"/>
152 </para>
153 </listitem>
154 <listitem>
155 <para>
156 Download MD5 sum: &fpc-src-md5sum;
157 </para>
158 </listitem>
159 <listitem>
160 <para>
161 Download size (binary): &fpc-src-size;
162 </para>
163 </listitem>
164 <listitem>
165 <para>
166 Estimated disk space required: &fpc-src-bldsize;
167 </para>
168 </listitem>
169 </itemizedlist>
170
171 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
172 <itemizedlist spacing="compact">
173 <listitem>
174 <para>
175 Optional patch (Required if building on i686 systems):
176 <ulink url="&patch-root;/fpc-&freepascal-version;-glibc_2.34-1.patch"/>
177 </para>
178 </listitem>
179 </itemizedlist>
180
181 <bridgehead renderas="sect3">FreePascal Dependencies</bridgehead>
182 <para role="required">
183 <xref linkend="gdb"/> (with static library libgdb.a)
184 </para>
185
186 <para condition="html" role="usernotes">User Notes:
187 <ulink url="&blfs-wiki;/fpc"/></para>
188
189 </sect2>
190
191 <sect2 role="installation">
192 <title>Installation of FreePascal</title>
193
194 <para>
195 Begin by extracting the appropriate binary tarball for your
196 architecture and changing to the extracted directory. Install
197 the binary <application>FreePascal</application> with the
198 following commands:
199 </para>
200
201<screen><userinput>tar -xf fpc-&freepascal-bin-version;-x86_64-linux.tar &amp;&amp;
202cd fpc-&freepascal-bin-version;-x86_64-linux &amp;&amp;
203sed -e "s;export PREFIX$;export PREFIX=&fpc-tmp-target;;" -i install.sh</userinput></screen>
204
205 <para>Remove some packages which are not required for the
206 temporary compiler:</para>
207
208<screen><userinput>rm demo.tar.gz &amp;&amp;
209rm doc-pdf.tar.gz</userinput></screen>
210
211 <para>Install the temporary compiler as the
212 <systemitem class="username">root</systemitem> user:</para>
213
214<screen role="root"><userinput>yes "" | ./install.sh</userinput></screen>
215
216 <para>Remove the extracted binary objects:</para>
217
218<screen><userinput>cd .. &amp;&amp;
219rm -rf fpc-&freepascal-bin-version;-x86_64-linux</userinput></screen>
220
221 <para>
222 The binary version is now installed in
223 <filename class="directory">&fpc-tmp-target;</filename>. Add this
224 directory to the <envar>PATH</envar> environment variable:
225 </para>
226
227<screen><userinput>export PATH=&fpc-tmp-target;/bin:$PATH</userinput></screen>
228
229 <para>
230 The temporary compiler is now ready to compile the
231 <application>FreePascal</application> suite from source. To do
232 this, extract the source archive and cd into the extracted
233 directory as usual.
234 </para>
235
236 <para>
237 If building on i686 systems (32-bit), a patch is required
238 to overcome an issue with glibc-2.34:
239 </para>
240
241<screen><userinput>patch -Np1 -i ../fpc-&freepascal-version;-glibc_2.34-1.patch</userinput></screen>
242
243 <para>
244 Compile the <application>FreePascal</application> compiler
245 and tools by executing the following commands:
246 </para>
247
248<screen><userinput>make clean &amp;&amp;
249make OVERRIDEVERSIONCHECK=1 all</userinput></screen>
250
251 <para>
252 Install the <application>FreePascal</application> compiler
253 and tools by executing the following commands as the
254 <systemitem class="username">root</systemitem> user:</para>
255
256<screen role="root"><userinput>make_install -j1 PREFIX=/usr &amp;&amp;
257case "$(uname -m)" in
258 i?86)
259 ln -svf /usr/lib/fpc/&freepascal-version;/ppc386 /usr/bin/
260 ;;
261 x86_64)
262 ln -svf /usr/lib/fpc/&freepascal-version;/ppcx64 /usr/bin/
263 ;;
264esac</userinput></screen>
265
266 <para>
267 Now that the compiler has been created from source, the temporary
268 compiler in <filename class="directory">&fpc-tmp-target;</filename>
269 can be removed. Execute the following commands as the
270 <systemitem class="username">root</systemitem> user:</para>
271
272<screen role="root"><userinput>rm -rf /etc/fppkg* &amp;&amp;
273rm -rf /etc/fpc.* &amp;&amp;
274rm -rf &fpc-tmp-target;</userinput></screen>
275
276 </sect2>
277
278 <sect2 role="configuration">
279 <title>Configuring FreePascal</title>
280
281 <para>
282 A default configuration file <filename>/etc/fpc.cfg</filename>
283 can be created by a tool which is part of the compiler suite.
284 Generate the default config file as the
285 <systemitem class="username">root</systemitem> user:
286 </para>
287
288<screen role="root"><userinput>/usr/lib/fpc/&freepascal-version;/samplecfg /usr/lib/fpc/&freepascal-version; /etc &amp;&amp;
289cat &gt;&gt; /etc/fpc.cfg &lt;&lt;EOF
290#ifdef cpux86_64
291# for x86_64 use -fPIC by default
292-Cg
293#endif
294EOF</userinput></screen>
295
296 <para>
297 If you are going to use QT (most likely when building Lazarus
298 with the QT library), add the QT library path to the config as the
299 <systemitem class="username">root</systemitem> user:
300 </para>
301
302<screen role="root"><userinput>sed -e "/^-Fl\/usr\/lib\/fpc/a -Fl/opt/qt5/lib" \
303 -i /etc/fpc.cfg</userinput></screen>
304
305 </sect2>
306
307 <sect2 role="content">
308 <title>Contents</title>
309
310 <segmentedlist>
311 <segtitle>Installed Program</segtitle>
312 <segtitle>Installed Libraries</segtitle>
313 <segtitle>Installed Directories</segtitle>
314
315 <seglistitem>
316 <seg>fpc, fp</seg>
317 <seg>None</seg>
318 <seg>None</seg>
319 </seglistitem>
320 </segmentedlist>
321
322 <variablelist>
323 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
324 <?dbfo list-presentation="list"?>
325 <?dbhtml list-presentation="table"?>
326
327 <varlistentry id="i-fp">
328 <term><command>fp</command></term>
329 <listitem>
330 <para>
331 FreePascal text based IDE
332 </para>
333 <indexterm zone="fpc i-fp">
334 <primary sortas="b-fp">fp</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="i-fpc">
340 <term><command>fpc</command></term>
341 <listitem>
342 <para>
343 FreePascal compiler frontend
344 </para>
345 <indexterm zone="fpc i-fpc">
346 <primary sortas="b-fpc">fpc</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="i-fpcmake">
352 <term><command>fpcmake</command></term>
353 <listitem>
354 <para>
355 FreePascal make utility
356 </para>
357 <indexterm zone="fpc i-fpcmake">
358 <primary sortas="b-fpcmake">fpcmake</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
363 </variablelist>
364
365 </sect2>
366
367</sect1>
Note: See TracBrowser for help on using the repository browser.