Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/rust.xml

    re7c8506a r48771ae  
    55  %general-entities;
    66
    7   <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.gz">
     7  <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.xz">
    88  <!ENTITY rust-download-ftp  " ">
    9   <!ENTITY rust-md5sum        "6d1728cf0a86b0c5f33d3870379997ed">
    10   <!ENTITY rust-size          "172 MB">
     9  <!ENTITY rust-md5sum        "e77ac3a786d013604061b17f99dd9b27">
     10  <!ENTITY rust-size          "131 MB">
    1111  <!-- Gentle Reminder: buildsize is how much the user requires for the real
    1212       install, i.e. the source with its DESTDIR *plus* the DESTDIR.  You
     
    1515       after the tests. -->
    1616
    17   <!ENTITY rust-buildsize     "8.8 GB (370 MB installed) including 309 MB of ~/.cargo files for the user building this. Add 6.2 GB including extra 273 MB of ~/.cargo files if running the tests">
    18   <!ENTITY rust-time          "27 SBU (including download time; add 13 SBU for tests, both on a 4-core machine)">
     17  <!ENTITY rust-buildsize     "10 GB (516 MB installed) including 266 MB of ~/.cargo files for the user building this. Add 6.2 GB including extra 243 MB of ~/.cargo files if running the tests">
     18  <!ENTITY rust-time          "21 SBU (including download time; add 10 SBU for tests, both on a 4-core machine)">
    1919]>
    2020
     
    2222  <?dbhtml filename="rust.html"?>
    2323
    24   <sect1info>
    25     <date>$Date$</date>
    26   </sect1info>
    2724
    2825  <title>Rustc-&rust-version;</title>
     
    3431  <sect2 role="package">
    3532    <title>Introduction to Rust</title>
    36 
    3733    <para>
    3834      The <application>Rust</application> programming language is designed
     
    8480        have reason to rebuild with a modified configuration (e.g. using the
    8581        shipped LLVM after building with shared LLVM, perhaps to compile crates
    86         for architectres which the BLFS LLVM build does not support)
     82        for architectures which the BLFS LLVM build does not support)
    8783        it is possible for the install to leave a broken
    8884        <command>cargo</command> program. In such a situation, either remove
     
    117113      <phrase revision="sysv">In sysv systems cgroups requires <ulink
    118114      url="https://sourceforge.net/projects/libcg/">libcgroup</ulink>.</phrase>
    119       <phrase revision="systemd">That can apparently be achieved by writing
    120       custom unit files.</phrase>
     115      <phrase revision="systemd">That can be achieved by using
     116      <command>systemd-run</command> command with
     117      <parameter>-p User=$(whoami)</parameter> and
     118      <parameter>-p AllowedCPUs=0-<replaceable>x</replaceable></parameter>
     119      (with <replaceable>x</replaceable> replaced with the number of CPU
     120      cores you want to use minus one) options.</phrase>
    121121    </para>
    122122
     
    148148    </note>
    149149
    150     &lfs110a_checked;
     150    &lfs112_checked;
    151151
    152152    <bridgehead renderas="sect3">Package Information</bridgehead>
     
    198198    <bridgehead renderas="sect4">Required</bridgehead>
    199199    <para role="required">
    200       <xref linkend="curl"/>,
    201       <xref linkend="cmake"/>, and
    202       <xref linkend="libssh2"/>
     200      <xref linkend="cmake"/>
    203201    </para>
    204202
    205203    <bridgehead renderas="sect4">Recommended</bridgehead>
    206204    <para role="recommended">
    207       <package>clang</package> from <xref linkend="llvm"/>
     205      <xref linkend="curl"/>,
     206      <xref linkend="libssh2"/>, and
     207      <xref linkend="llvm"/>
    208208      (built with -DLLVM_LINK_LLVM_DYLIB=ON so that rust can link to
    209209      system LLVM instead of building its shipped version)
    210       <!-- the versions of LLVM in LFS-10.0, 10.1 and 11.0 are good enough
    211            to use for this version of rustc, so do not mention builds
    212            using shipped LLVM here, those are a lot bigger.
    213       If using an older version, see the config.toml file below re
    214       using the shipped llvm, because of rust issue 69225.-->
    215     </para>
     210    </para>
     211
     212    <note>
     213      <para>
     214        If a recommended dependency is not installed, a shipped copy in the
     215        Rustc source tarball will be built and used.
     216      </para>
     217    </note>
    216218
    217219    <bridgehead renderas="sect4">Optional</bridgehead>
    218220    <para role="optional">
    219       <xref linkend="gdb"/> (used by the testsuite if it is present)
     221      <xref linkend="gdb"/> (used by the test suite if it is present) and
     222      <ulink url='https://libgit2.org/'>libgit2</ulink>
    220223    </para>
    221224
     
    227230  <sect2 role="installation">
    228231    <title>Installation of Rust</title>
     232
     233    <note>
     234      <para>
     235        Currently Rust compiler produces SSE2 instructions for 32-bit x86,
     236        causing the generated code broken on 32-bit systems without a
     237        SSE2-capable processor.  All x86 processor models released after
     238        2004 should be SSE2-capable.  Run
     239        <command>lscpu | grep sse2</command> as a test.  If it outputs
     240        anything, your CPU is SSE2-capable and OK.  Otherwise you may try
     241        to build this package <emphasis>on a SSE2-capable system</emphasis>
     242        with the following fix applied:
     243      </para>
     244
     245      <!-- computeroutput used deliberately to stop anyone from copying
     246           blindly -->
     247<screen role="nodump"><computeroutput>sed 's@pentium4@pentiumpro@' -i \
     248    compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs</computeroutput></screen>
     249
     250      <para>
     251        And copy the resulting
     252        <filename class="directory">/opt/rustc-&rust-version;</filename>
     253        to the system without SSE2 capability. But this change is still
     254        under upstream review and not tested by BLFS editors.
     255      </para>
     256    </note>
    229257
    230258    <para>
     
    238266
    239267<screen role="root"><userinput>mkdir /opt/rustc-&rust-version;             &amp;&amp;
    240 ln -svfin rustc-&rust-version; /opt/rustc</userinput></screen>
     268ln -svfn rustc-&rust-version; /opt/rustc</userinput></screen>
    241269
    242270    <note>
     
    308336    </para>
    309337
     338<!-- fixed in 1.58.0, retain as a reminder that fixed crates can be used
    310339<screen><userinput>sed -i -e '/^curl /s/0.4.38/0.4.40/' \
    311340       -e '/^curl-sys /s/0.4.48/0.4.50/' \
    312        src/tools/cargo/Cargo.toml &amp;&amp;
    313 
    314 export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &amp;&amp;
     341       src/tools/cargo/Cargo.toml &amp;&amp; -->
     342
     343<screen><userinput>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &amp;&amp;
     344{ [ ! -e /usr/include/libssh2.h ] ||
     345  export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
    315346python3 ./x.py build --exclude src/tools/miri</userinput></screen>
    316347
    317348    <note>
    318349      <para>
    319         The testsuite will generate some messages in the
     350        The test suite will generate some messages in the
    320351        <phrase revision="sysv">system log</phrase>
    321352        <phrase revision="systemd">systemd journal</phrase>
     
    333364
    334365    <para>
    335       At a minimum, fifteen tests will fail: all the tests (twelve) in
    336       the <quote>assembly</quote> suite, apparently because warnings are
    337       tuened on,
    338       run-make-fulldeps/long-linker-command-lines, run-make-fulldeps/print-cfg,
    339       run-make-fulldeps/sysroot-crates-are-unstable.
    340       If <command>gdb</command> is installed,  another failure
     366      At a minimum, 51 tests will fail: all 46 of the tests in
     367      the <quote>assembly</quote> suite which are not skipped (various lints
     368      cause the warnings in these tests to be treated as errors), and
     369      5 other tests, 4 of which involve the
     370      <filename>rustdoc-ui/issue-98690.rs</filename> file, and another one,
     371      <filename>run-make-fulldeps/long-linker-command-lines</filename>.
     372<!--  If <command>gdb</command> is installed,  another failure
    341373      (debuginfo/function-names.rs) can be expected.
    342     </para>
    343 
    344     <para>
    345       As with all large testsuites, other tests might fail on some machines -
     374      # seems ok with 11.2 ken -->
     375    </para>
     376
     377    <para>
     378      As with all large test suites, other tests might fail on some machines -
    346379      if the number of additional failures is in the single digits,
    347       check the log for 'FAILED' and review lines above that, particularly the
     380      check the log for 'failures:' and review lines above that, particularly the
    348381      'stderr:' lines. Any mention of
    349382      SIGSEGV or signal 11 in a failing test is a cause for concern.
     
    389422    </para>
    390423
    391 <screen><userinput>export LIBSSH2_SYS_USE_PKG_CONFIG=1 &amp;&amp;
    392 DESTDIR=${PWD}/install python3 ./x.py install &amp;&amp;
     424<screen><userinput>DESTDIR=${PWD}/install python3 ./x.py install &amp;&amp;
    393425unset LIBSSH2_SYS_USE_PKG_CONFIG</userinput></screen>
    394426
     
    449481    </para>
    450482
    451     <para>
     483<!--<para>
    452484      <command>sed -i -e '/^curl /s/0.4.38/0.4.40/' ... </command>: two crates
    453485      normally downloaded for this release do not correctly initialise
     
    455487      <application>openssl-3.0.0</application>. Upstream has fixed that for a
    456488      future release, this sed causes the fixed versions to be used.
    457     </para>
     489    </para>-->
    458490
    459491    <para>
     
    473505      <!-- might be unbroken in 1.36.0, if so remove broken from description
    474506       of miri below. https://github.com/rust-lang/rust/issues/61830 -->
    475       Omitting it should save a little time.
     507      Omitting it should save a little time. Even if this switch is
     508      not given, miri is not installed.
    476509    </para>
    477510
     
    482515
    483516    <para>
    484       <command>--no-fail-fast</command>: this switch ensures that the testsuite
     517      <command>--no-fail-fast</command>: this switch ensures that the test suite
    485518      will not stop at the first error.
    486519    </para>
    487520
    488     <para>
    489       <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: On some systems,
    490       cairo fails to link during the install because it cannot find libssh2.
    491       This seems to fix it, but again the reason why the problem occurs is not
    492       understood.
     521    <!-- https://github.com/alexcrichton/ssh2-rs/issues/173 -->
     522    <para>
     523      <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
     524      <command>cargo</command> to link to system libssh2.
    493525    </para>
    494526
     
    551583pathprepend /opt/rustc/bin           PATH
    552584
     585# Include /opt/rustc/man in the MANPATH variable to access manual pages
     586pathappend  /opt/rustc/share/man     MANPATH
     587
    553588# End /etc/profile.d/rustc.sh</literal>
    554589EOF</userinput></screen>
     
    576611        <seg>
    577612          cargo-clippy, cargo-fmt, cargo-miri (optional), cargo, clippy-driver,
    578           miri (optional),
    579           rls, rust-demangler, rust-gdb, rust-gdbgui, rust-lldb, rustc,
    580           rustdoc, rustfmt.
     613          miri (optional), rls, rust-analyzer, rust-demangler, rust-gdb,
     614          rust-gdbgui, rust-lldb, rustc, rustdoc, and rustfmt
    581615        </seg>
    582616        <seg>
     
    627661        <listitem>
    628662          <para>
    629             <!-- FIXME reword to 'is used by' if Miri installed
    630              AND works enough to report its \-\-help -->
    631             is for use by Miri to interpret bin crates and tests
     663            is for use by Miri to interpret bin crates and tests. It is
     664            not installed by default.
    632665          </para>
    633666          <indexterm zone="rust cargo-miri">
     
    666699          <para>
    667700            is an interpreter for Rust's mid-level intermediate representation
    668             (MIR). It is broken in this version
     701            (MIR). It is not installed by default.
    669702          </para>
    670703          <indexterm zone="rust miri">
     
    701734      </varlistentry>
    702735
     736      <varlistentry id="rust-demangler">
     737        <term><command>rust-demangler</command></term>
     738        <listitem>
     739          <para>
     740            converts a list of Rust mangled symbols into a
     741            corresponding list of demangled symbols
     742          </para>
     743          <indexterm zone="rust rust-demangler">
     744            <primary sortas="b-rust-demangler">rust-demangler</primary>
     745          </indexterm>
     746        </listitem>
     747      </varlistentry>
     748
    703749      <varlistentry id="rust-gdb">
    704750        <term><command>rust-gdb</command></term>
Note: See TracChangeset for help on using the changeset viewer.