Changeset 85d9842


Ignore:
Timestamp:
09/24/2021 12:19:36 PM (4 weeks ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
lazarus
Children:
8034a2b
Parents:
d09f950
Message:

Fix instuctions to install fpc

Location:
general/prog
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • general/prog/fpc.xml

    rd09f950 r85d9842  
    186186    <title>Installation of FreePascal</title>
    187187
     188    <note>
     189      <para>
     190        While installation it is required to have administrator
     191        privileges. It is assumed that the current user is allowed
     192        to use <command>sudo</command> to gain full privileges.
     193      </para>
     194      <para>
     195        Even a temporary binary compiler must be installed prior to
     196        compile the compiler from the source, it is assumed that the
     197        <application>FreePascal</application> sources has been
     198        extracted and the current directory has been changed to it just
     199        like as usual.
     200      </para>
     201    </note>
     202
    188203    <para>
    189204      Begin by extracting the appropriate binary tarball for your
    190       architecture and changing to the extracted directory. Install
    191       the binary <application>FreePascal</application> with the
    192       following commands:
    193     </para>
    194 
    195 <screen><userinput>tar -xf fpc-&freepascal-bin-version;-x86_64-linux.tar &amp;&amp;
    196 cd fpc-&freepascal-bin-version;-x86_64-linux &amp;&amp;
    197 sed -e "s;export PREFIX$;export PREFIX=&fpc-tmp-target;;" -i install.sh</userinput></screen>
    198 
    199     <para>Remove some packages which are not required for the
    200       temporary compiler:</para>
     205      architecture and changing to the extracted directory. This
     206      extraction is performed within the extracted source directory.
     207      Install the binary <application>FreePascal</application> and
     208      remove some unused files with the following commands:
     209    </para>
     210
     211<screen><userinput>case "$(uname -m)" in
     212    i?86)
     213        tar -xf ../../fpc-&freepascal-bin-version;.i386-linux.tar &amp;&amp;
     214        cd fpc-&freepascal-bin-version;.i386-linux
     215        ;;
     216    x86_64)
     217        tar -xf ../../fpc-&freepascal-bin-version;-x86_64-linux.tar &amp;&amp;
     218        cd fpc-&freepascal-bin-version;-x86_64-linux
     219        ;;
     220esac &amp;&amp;
     221rm demo.tar.gz &amp;&amp;
     222rm doc-pdf.tar.gz &amp;&amp;
     223sed -e 's;PREFIX=/usr;test -z "$PREFIX" \&amp;\&amp; &amp;;' -i install.sh</userinput></screen>
     224
     225    <para>
     226      Prepare the install directory for the temporary compiler and
     227      make it writable to the current user by executing as the
     228      <systemitem class="username">root</systemitem> user:
     229    </para>
     230
     231<screen role="root"><userinput>install -dm755 -o $(id -u) &fpc-tmp-target;</userinput></screen>
     232
     233    <para>
     234      Install the temporary compiler:
     235    </para>
    201236     
    202 <screen><userinput>rm demo.tar.gz &amp;&amp;
    203 rm doc-pdf.tar.gz</userinput></screen>
    204 
    205     <para>Install the temporary compiler as the
    206       <systemitem class="username">root</systemitem> user:</para>
    207      
    208 <screen role="root"><userinput>yes "" | ./install.sh</userinput></screen>
     237<screen><userinput>yes "" | { PREFIX=&fpc-tmp-target; ./install.sh; }</userinput></screen>
    209238
    210239    <para>Remove the extracted binary objects:</para>
    211240   
    212241<screen><userinput>cd .. &amp;&amp;
    213 rm -rf fpc-&freepascal-bin-version;-x86_64-linux</userinput></screen>
     242case "$(uname -m)" in
     243    i?86)
     244        rm -rf fpc-&freepascal-bin-version;.i386-linux
     245        ;;
     246    x86_64)
     247        rm -rf fpc-&freepascal-bin-version;-x86_64-linux
     248        ;;
     249esac</userinput></screen>
    214250
    215251    <para>
    216252      The binary version is now installed in
    217       <filename class="directory">&fpc-tmp-target;</filename>. Add this
    218       directory to the <envar>PATH</envar> environment variable:
    219     </para>
    220 
    221 <screen><userinput>export PATH=&fpc-tmp-target;/bin:$PATH</userinput></screen>
    222 
    223     <para>
    224       The temporary compiler is now ready to compile the
    225       <application>FreePascal</application> suite from source. To do
    226       this, extract the source archive and cd into the extracted
    227       directory as usual.
    228     </para>
    229 
     253      <filename class="directory">&fpc-tmp-target;</filename> and
     254      can be used to create the compiler and utilities from source.
     255    </para>
    230256    <para>
    231257      If building on i686 systems (32-bit), a patch is required
    232       to overcome an issue with glibc-2.34:
     258      to overcome an issue with glibc-2.34.
    233259    </para>
    234260
     
    240266    </para>
    241267
    242 <screen><userinput>make clean &amp;&amp;
    243 make OVERRIDEVERSIONCHECK=1 all</userinput></screen>
     268<screen><userinput>PATH=&fpc-tmp-target;/bin:$PATH make clean &amp;&amp;
     269PATH=&fpc-tmp-target;/bin:$PATH make OVERRIDEVERSIONCHECK=1 all</userinput></screen>
    244270   
    245271    <para>
     
    248274      <systemitem class="username">root</systemitem> user:</para>
    249275
    250 <screen role="root"><userinput>make_install -j1 PREFIX=/usr &amp;&amp;
     276<screen role="root"><userinput>PATH=&fpc-tmp-target;/bin:$PATH make -j1 PREFIX=/usr install &amp;&amp;
    251277case "$(uname -m)" in
    252278    i?86)
    253279        ln -svf /usr/lib/fpc/&freepascal-version;/ppc386 /usr/bin/
    254     ;;
     280        ;;
    255281    x86_64)
    256282        ln -svf /usr/lib/fpc/&freepascal-version;/ppcx64 /usr/bin/
    257     ;;
     283        ;;
    258284esac</userinput></screen>
    259285
     
    262288      compiler in <filename class="directory">&fpc-tmp-target;</filename>
    263289      can be removed. Execute the following commands as the
    264       <systemitem class="username">root</systemitem> user:</para>
     290      <systemitem class="username">root</systemitem> user:
     291    </para>
    265292
    266293<screen role="root"><userinput>rm -rf /etc/fppkg* &amp;&amp;
     
    306333<!--
    307334  not sure if we can simply copy the files in $PWD as they may
    308   contain compiled binaries
     335  contain compiled binaries. May run a clean before copying...
    309336 -->
    310337<screen role="root"><userinput>mkdir -p /usr/lib/fpc/src &amp;&amp;
     
    322349
    323350      <seglistitem>
    324         <seg>fpc, fp</seg>
     351        <seg>fpc, fp, samplecfg, ...</seg>
    325352        <seg>None</seg>
    326353        <seg>None</seg>
     
    369396      </varlistentry>
    370397
     398      <varlistentry id="i-samplecfg">
     399        <term><command>samplecfg</command></term>
     400        <listitem>
     401          <para>
     402            Utility to create a default configuration file
     403          </para>
     404          <indexterm zone="fpc i-samplecfg">
     405            <primary sortas="b-samplecfg">samplecfg</primary>
     406          </indexterm>
     407        </listitem>
     408      </varlistentry>
     409
    371410    </variablelist>
    372411
  • general/prog/gdb.xml

    rd09f950 r85d9842  
    222222
    223223    <para>
    224       If its planned to install packages which might need a static
     224      If it is planned to install packages which might need a static
    225225      GDB library (for instance <xref linkend="fpc"/>) create the
    226226      library by executing:
     
    280280        <seg>
    281281          <!--libinproctrace.so-->
    282           None
     282          libgdb.a (if choosen to build it)
    283283        </seg>
    284284        <seg>
Note: See TracChangeset for help on using the changeset viewer.