Changeset 4c6edac for general/prog/rust.xml
- Timestamp:
- 08/28/2017 07:55:17 PM (7 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- c8c1a9e
- Parents:
- f4cb967e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/rust.xml
rf4cb967e r4c6edac 7 7 <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.gz"> 8 8 <!ENTITY rust-download-ftp ""> 9 <!ENTITY rust-md5sum " c11d94d9e62f71838b20058f0797357a">10 <!ENTITY rust-size " 28 MB">11 <!ENTITY rust-buildsize " 1.5 GB (208 MB installed) plus 118MB forcargo files">12 <!ENTITY rust-time " 14 SBU (with 4 processors)">9 <!ENTITY rust-md5sum "75e779670ac79edf023497a9c37eb35d"> 10 <!ENTITY rust-size "48 MB"> 11 <!ENTITY rust-buildsize "4.2 GB (362 MB installed), (add 0.6GB for tests) plus 273MB for ~/.cargo files"> 12 <!ENTITY rust-time "33 SBU (add 14 SBU for tests, both with 4 processors)"> 13 13 ]> 14 14 … … 51 51 <para> 52 52 At the moment <application>Rust</application> does not provide any 53 guarantees of a stable ABI, and it is likely that the next few versions 54 of <application>firefox</application> will each require the latest version 55 of <application>Rust</application>. 56 </para> 57 58 &lfs80_checked; 53 guarantees of a stable ABI. 54 </para> 55 56 &lfs81_checked; 59 57 60 58 <bridgehead renderas="sect3">Package Information</bridgehead> … … 97 95 <para role="required"> 98 96 <xref linkend="curl"/>, 99 <xref linkend="cmake"/> (if not using the recommended <xref linkend="llvm-old"/>),97 <xref linkend="cmake"/>, 100 98 <xref linkend="python2"/> 101 </para>102 103 <bridgehead renderas="sect4">Recommended</bridgehead>104 <para role="recommended">105 <!-- acceptable versions of llvm are listed in the tests106 of LLVM_VERSION in configure, currently 3.{7-9}* -->107 <xref linkend="llvm-old"/>108 99 </para> 109 100 110 101 <bridgehead renderas="sect4">Optional</bridgehead> 111 102 <para role="optional"> 112 <xref linkend="gdb"/> (often required for the testsuite, but some of the 113 gdb tests may still fail), 103 <xref linkend="gdb"/> (used by debuginfo-gdb in the testsuite), 114 104 <xref linkend="ninja"/> 115 105 </para> … … 123 113 <title>Installation of Rust</title> 124 114 125 <para> 126 Install <application>Rust</application> by running the following 115 <note> 116 <para> 117 This package is updated on a six-weekly release cycle. Because it is 118 such a large and slow package to build, and is at the moment only used 119 by one package in this book, the BLFS editors take the view that it 120 should only be updated when that is necessary. 121 </para> 122 </note> 123 124 <para> 125 First create a suitable <filename>config.toml</filename> file 126 which will configure the build : 127 </para> 128 129 <screen><userinput>cat <<EOF > config.toml 130 # see src/bootstrap/config.toml.example for more possible options 131 [llvm] 132 targets = "X86" 133 134 [build] 135 # install cargo as well as rust 136 extended = true 137 138 [install] 139 prefix = "/usr" 140 docdir = "share/doc/rustc-1.19.0" 141 channel = "stable" 142 EOF</userinput></screen> 143 144 <para> 145 Now install <application>Rust</application> by running the following 127 146 commands: 128 147 </para> 129 148 130 <screen><userinput>./configure --prefix=/usr \ 131 --llvm-root=/opt/llvm3 \ 132 --enable-llvm-link-shared \ 133 --docdir=/usr/share/doc/rustc-&rust-version; && 134 ./x.py build</userinput></screen> 135 136 <para> 137 The testsuite in this package selects random subsets of the 138 possible tests. There is no correlation between how long a 139 particular run of the testsuite takes, and how many tests 140 were run. On occasion, the chosen tests will run in much 141 less than 1.0 SBU, on other occasions they may take more 142 than 20 SBU. Although it is normal to run the testsuite for 143 a compiler, in this case that is very hard to recommend. 144 </para> 145 146 <para> 147 Nevertheless, if you insist on running the tests issue 148 <command>./x.py test</command>: as with the build, that will 149 use all available CPUs. 149 <screen><userinput>./x.py build</userinput></screen> 150 151 <para> 152 To run the tests issue 153 <command>./x.py test --verbose --no-fail-fast >../rustc-testlog</command>: 154 as with the build, that will use all available CPUs. This runs maniy suites 155 of tests (in an apparently random order), three may fail: 156 compile-fail/issue-37131.rs and run-make/target-without-atomics both try to 157 compile for the thumbv6m-none-eabi target, but the BLFS build does not cater for 158 that, and all 105 tests in debuginfo-gdb will fail if 159 <application>gdb</application> has not been installed. 160 </para> 161 162 <para> 163 If you wish to look at the numbers for the results, you can find the total 164 number of tests which were considered by running: 165 </para> 166 167 <screen><command>grep 'running .* tests' ../rustc-testlog | awk '{ sum += $2 } END { print sum }'</command></screen> 168 169 <para> 170 That should report 14029 tests. Similarly, the total tests which failed can 171 be found by running: 172 </para> 173 174 <screen><command>grep '^test result:' ../rustc-testlog | awk '{ sum += $6 } END { print sum }'</command></screen> 175 176 <para> 177 And similarly for the tests which passed use $4, for those which were ignored 178 (i.e. skipped) use $8 (and $10 for 'measured', $12 for 'filtered out' but both 179 are probably zero). The breakdown does not match the overall total. 150 180 </para> 151 181 … … 154 184 </para> 155 185 156 <screen role="root"><userinput>test -f /usr/lib/libLLVM-3.9.so || 157 ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib && 158 159 ./x.py dist --install</userinput></screen> 186 <screen role="root"><userinput>./x.py dist --install</userinput></screen> 160 187 </sect2> 161 188 … … 164 191 165 192 <para> 166 <command>--llvm-root=/opt/llvm3 --enable-llvm-link-shared</command>: 167 This tells rust to use the system version of llvm3 installed in 168 <filename class="directory">/opt/llvm3</filename>, linking to the 169 shared libraries. 170 </para> 171 172 <para> 173 <option>--enable-dist-host-only</option>: If you did not install a 174 system version of <xref linkend="llvm-old"/>, use this alternative command 175 to build the shipped static version of llvm. It will 176 <emphasis>compile</emphasis> for all the available linux cross-compilers 177 (Aarch64, MIPS, PowerPC, SystemZ, etc) but with this switch it will only 178 <emphasis>install</emphasis> for the host architecture. 179 </para> 180 181 <para> 182 <option>RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</option>: use this if 183 you need to link against a version of LLVM-3 which was compiled against 184 <xref linkend="libffi"/>. 185 </para> 186 187 <para> 188 <command>ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib</command>: 189 Although the <emphasis>build</emphasis> of <application>Rust</application> 190 finds the shared library in 191 <filename class="directory">/opt/llvm3/lib</filename>, several of the steps 192 run by the <application>rustbuild</application> 193 <emphasis>installer</emphasis> do not find 194 <filename>libLLVM-3.9.so</filename>. This conditional symlink fixes that, 195 and works even if <filename>libLLVM-3.9.{0,1}</filename> has already been 196 installed in <filename class="directory">/usr</filename>. 197 <emphasis>Omit this command if you did not install a system version of 198 <xref linkend="llvm-old"/></emphasis>. 199 </para> 193 <command>targets = "X86"</command>: this avoids building all the available 194 linux cross-compilers (Aarch64, MIPS, PowerPC, SystemZ, etc). 195 </para> 196 197 <para> 198 <command>extended = true</command>: this installs Cargo alongside Rust. 199 </para> 200 201 <para> 202 <command>channel = "stable"</command>: this ensures only stable features 203 can be used, the default in <filename>config.toml</filename> is to use 204 development features, which is not appropriate for a released version. 205 </para> 206 207 <para> 208 <command>--verbose</command>: this switch can sometimes provide more 209 information about a test which fails. 210 </para> 211 212 <para> 213 <command>--no-fail-fast</command>: this switch ensures that the testsuite 214 will not stop at the first error. 215 </para> 216 200 217 </sect2> 201 218 … … 210 227 <seglistitem> 211 228 <seg> 212 rust-gdb, rust-lldb, rustc, rustdoc.229 cargo, rust-gdb, rust-lldb, rustc, rustdoc. 213 230 </seg> 214 231 <seg> 215 Many libraries (libarena, libflate, libfmt_macros, libgetopts, 216 libgraphviz, liblog, libproc_macro, librustc*, libserialize, 217 libstd, libsyntax, libterm, libtest), all containing a hash in 218 their names. 232 Many lib*<16-byte-hash>.so libraries. 219 233 </seg> 220 234 <seg> 221 235 ~/.cargo, 222 /usr/lib/rustlib, and 223 /usr/share/doc/rustc-&rust-version;. 236 /usr/lib/rustlib, 237 /usr/share/doc/rustc-&rust-version;, and 238 /usr/share/zsh/site-functions/ 224 239 </seg> 225 240 </seglistitem> … … 231 246 <?dbhtml list-presentation="table"?> 232 247 248 <varlistentry id="cargo"> 249 <term><command>cargo</command></term> 250 <listitem> 251 <para> 252 is the Package Manager for Rust. 253 </para> 254 <indexterm zone="rust cargo"> 255 <primary sortas="b-cargo">cargo</primary> 256 </indexterm> 257 </listitem> 258 </varlistentry> 259 233 260 <varlistentry id="rust-gdb"> 234 261 <term><command>rust-gdb</command></term>
Note:
See TracChangeset
for help on using the changeset viewer.