Changeset b05ea0b for general/prog
- Timestamp:
- 01/27/2019 12:01:48 AM (6 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, 8.4, 9.0, 9.1, gimp3, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 4cc77fbd
- Parents:
- 0eb97ef1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/rust.xml
r0eb97ef1 rb05ea0b 64 64 packages in this book which use it (and they will be downloaded as 65 65 required). But if you retain an older version as a fallback option and 66 then use it ( that would require<emphasis>not</emphasis> building in66 then use it (when <emphasis>not</emphasis> building in 67 67 <filename class="directory">/usr</filename>), it is likely that it will 68 then have to re 68 then have to re-download some crates. For a full download (i.e. starting 69 69 with an empty or missing <filename class="directory">~/.cargo</filename>) 70 70 downloading the external cargo files for this version only takes a minute … … 80 80 installation before updating. You may wish to do the same to save space. 81 81 </para> 82 83 <para> 84 One alternative when working with multiple versions or just updating 85 to a new version is to place the files in the 86 <filename class="directory">/opt</filename> directory. The instructions 87 below provide optional commands to support better control of 88 new package versions or reinstallation of the current version. 89 </para> 82 90 </note> 83 91 … … 97 105 Rustc defaults to building for ALL supported architectures, using a 98 106 shipped copy of LLVM. In BLFS the build is only for the X86 architecture. 99 If you 100 intend to develop rust crates, this build may not be good enough for your 101 purposes. 107 If you intend to develop rust crates, this build may not be good 108 enough for your purposes. 102 109 </para> 103 110 <para> … … 181 188 182 189 <para> 183 First create a suitable <filename>config.toml</filename> file which will 190 If you are going to install into the 191 <filename class="directory">/opt</filename> directory, remove 192 conflicting entries and recreate the required entries. 193 As the <systemitem class="username">root</systemitem> 194 user: 195 </para> 196 197 <screen role="root"><userinput>rm -rf /opt/rustc /opt/rustc-&rust-version; && 198 mkdir /opt/rustc-&rust-version; && 199 ln -sv rustc-&rust-version; /opt/rustc</userinput></screen> 200 201 <note> 202 <para> 203 If multiple versions of <application>Rust</application> are installed 204 in <filename class="directory">/opt</filename>, changing to another 205 version only requires changing the <filename> /opt/rustc</filename> 206 symbolic link and then running <command>ldconfig</command>. 207 </para> 208 </note> 209 210 <para> 211 Create a suitable <filename>config.toml</filename> file which will 184 212 configure the build. Unlike with previous releases, where even quite old 185 213 system versions of <application>LLVM</application>worked well, this … … 209 237 210 238 [install] 211 prefix = "/usr" 239 # Adjust the prefix for the desired destination 240 #prefix = "/usr" 241 prefix = "/opt/rustc-&rust-version;" 242 212 243 # docdir is used even if the full awesome docs are not installed 213 244 docdir = "share/doc/rustc-&rust-version;" … … 389 420 390 421 </sect2> 422 423 <sect2 role="configuration"> 424 <title>Configuring Rust</title> 425 426 <sect3 id="rustc-config"> 427 <title>Configuration Information</title> 428 429 <para> 430 If you installed <application>rustc</application> in 431 <filename class="directory">/opt</filename>, you need to update the 432 following configuration files so that <application>rustc</application> is 433 correctly found by other packages and system processes. 434 </para> 435 436 <para> 437 As the <systemitem class="username">root</systemitem> user, update 438 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's 439 run-time cache file: 440 </para> 441 442 <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF 443 <literal># Begin rustc addition 444 445 /opt/rustc/lib 446 447 # End rustc addition</literal> 448 EOF 449 450 ldconfig</userinput></screen> 451 452 <indexterm zone="rustc rustc-config"> 453 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary> 454 </indexterm> 455 456 <para> 457 As the <systemitem class="username">root</systemitem> user, create 458 the <filename>/etc/profile.d/rustc.sh</filename> file: 459 </para> 460 461 <screen role="root"><userinput>cat > /etc/profile.d/rustc.sh << "EOF" 462 <literal># Begin /etc/profile.d/rustc.sh 463 464 pathprepend /opt/rustc/bin PATH 465 466 # End /etc/profile.d/rustc.sh</literal> 467 EOF</userinput></screen> 468 469 <para>Immediately after installation, update the current PATH 470 for your current shell as a normal user:</para> 471 472 <screen><userinput>source /etc/profile.d/rustc.sh</userinput></screen> 473 474 </sect3> 475 </sect2> 476 391 477 392 478 <sect2 role="content">
Note:
See TracChangeset
for help on using the changeset viewer.