Rustc-1.16.0

Rust の概要

Rust は安全性、並行処理を組み入れた実用的なプログラミング言語です。

As with many other programming languages, rustc (the rust compiler) needs a binary from which to bootstrap. It will download a stage0 binary, and several cargo files (these are actually .tar.gz source archives) at the start of the build, so you cannot compile it without an internet connection.

The current rustbuild build-system will use all available processors, although it does not scale well and often falls back to just using one core while waiting for a library to compile.

At the moment Rust does not provide any guarantees of a stable ABI, and it is likely that the next few versions of firefox will each require the latest version of Rust.

本パッケージは LFS-8.0 において正しくビルドでき動作することが確認されています。

パッケージ情報

  • ダウンロード (HTTP): https://static.rust-lang.org/dist/rustc-1.16.0-src.tar.gz

  • ダウンロード (FTP):

  • ダウンロード MD5 sum: c11d94d9e62f71838b20058f0797357a

  • ダウンロードサイズ: 28 MB

  • 必要ディスク容量: 1.5 GB (208 MB installed) plus 118MB for cargo files

  • 概算ビルド時間: 14 SBU (4 プロセッサーの場合)

Rust の依存パッケージ

必須

cURL-7.55.1, CMake-3.9.1 (if not using the recommended LLVM-3.9.1), Python-2.7.13

推奨

任意

GDB-8.0 (often required for the testsuite, but some of the gdb tests may still fail), Ninja-1.7.2

ユーザー情報: http://wiki.linuxfromscratch.org/blfs/wiki/rust

Rust のインストール

以下のコマンドを実行して Rust をビルドします。

./configure --prefix=/usr             \
            --llvm-root=/opt/llvm3    \
            --enable-llvm-link-shared \
            --docdir=/usr/share/doc/rustc-1.16.0 &&
./x.py build

The testsuite in this package selects random subsets of the possible tests. There is no correlation between how long a particular run of the testsuite takes, and how many tests were run. On occasion, the chosen tests will run in much less than 1.0 SBU, on other occasions they may take more than 20 SBU. Although it is normal to run the testsuite for a compiler, in this case that is very hard to recommend.

Nevertheless, if you insist on running the tests issue ./x.py test: as with the build, that will use all available CPUs.

root ユーザーになって以下を実行します。

test -f /usr/lib/libLLVM-3.9.so ||
  ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib &&

./x.py dist --install

コマンド説明

--llvm-root=/opt/llvm3 --enable-llvm-link-shared: This tells rust to use the system version of llvm3 installed in /opt/llvm3, linking to the shared libraries.

--enable-dist-host-only: If you did not install a system version of LLVM-3.9.1, use this alternative command to build the shipped static version of llvm. It will compile for all the available linux cross-compilers (Aarch64, MIPS, PowerPC, SystemZ, etc) but with this switch it will only install for the host architecture.

RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi": use this if you need to link against a version of LLVM-3 which was compiled against libffi-3.2.1.

ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib: Although the build of Rust finds the shared library in /opt/llvm3/lib, several of the steps run by the rustbuild installer do not find libLLVM-3.9.so. This conditional symlink fixes that, and works even if libLLVM-3.9.{0,1} has already been installed in /usr. Omit this command if you did not install a system version of LLVM-3.9.1.

パッケージ構成

インストールプログラム: rust-gdb, rust-lldb, rustc, rustdoc.
インストールライブラリ: Many libraries (libarena, libflate, libfmt_macros, libgetopts, libgraphviz, liblog, libproc_macro, librustc*, libserialize, libstd, libsyntax, libterm, libtest), all containing a hash in their names.
インストールディレクトリ: ~/.cargo, /usr/lib/rustlib, and /usr/share/doc/rustc-1.16.0.

概略説明

rust-gdb

gdb に対する Python ラッパー。

rust-lldb

LLDB (LLVM デバッガー) に対する Python ラッパースクリプト。

rustc

rust コンパイラー。

rustdoc

rust ソースコードからドキュメントを生成します。

libstd-<16-byte-hash>.so

rust 標準ライブラリ (Rust Standard Library)。

最終更新日: 2017-05-14 15:08:05 +0900