mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 23:07:23 +08:00
Add rust and cargo, ready for firefox-53, with system llvm-3.9.1 in /opt.
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@18591 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
92d57d6aa2
commit
03d537cdd7
@ -1,12 +1,12 @@
|
||||
<!-- $LastChangedBy$ $Date$ -->
|
||||
|
||||
<!ENTITY day "12"> <!-- Always 2 digits -->
|
||||
<!ENTITY day "14"> <!-- Always 2 digits -->
|
||||
<!ENTITY month "04"> <!-- Always 2 digits -->
|
||||
<!ENTITY year "2017">
|
||||
<!ENTITY copyrightdate "2001-&year;">
|
||||
<!ENTITY copyholder "The BLFS Development Team">
|
||||
<!ENTITY version "&year;-&month;-&day;">
|
||||
<!ENTITY releasedate "April 12th &year;">
|
||||
<!ENTITY releasedate "April 14th &year;">
|
||||
<!ENTITY pubdate "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
|
||||
<!ENTITY blfs-version "svn"> <!-- svn|[release #] -->
|
||||
<!ENTITY lfs-version "development"> <!-- x.y|development -->
|
||||
|
271
general/prog/cargo.xml
Normal file
271
general/prog/cargo.xml
Normal file
@ -0,0 +1,271 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
||||
%general-entities;
|
||||
|
||||
<!ENTITY cargo-download-http "https://github.com/rust-lang/cargo/archive/&cargo-version;.tar.gz">
|
||||
<!ENTITY cargo-download-ftp " ">
|
||||
<!ENTITY cargo-md5sum "c0bdbfdeead6a7cdfd7fbfe2183bfc61">
|
||||
<!ENTITY cargo-size "624 KB">
|
||||
<!ENTITY cargo-buildsize "129 MB plus extra 115 MB in ~/.cargo and 2.2GB for the testsuite">
|
||||
<!ENTITY cargo-time "1.8 SBU plus 2.4 SBU for the testsuite on a machine with 4 cores">
|
||||
|
||||
<!-- RUSTIDATE is deined in packages.ent -->
|
||||
<!-- temporarily at higgs so people can download it -->
|
||||
<!ENTITY rusti-download-http "&sources-anduin-http;/rust/rust-installer-&RUSTIDATE;.tar.xz">
|
||||
<!ENTITY rusti-md5sum "8fb6c87f12d735b0a8bc1304d7640c69">
|
||||
<!ENTITY rusti-size "18 KB">
|
||||
|
||||
<!-- similarly, CARGOPREV is defined in packages.ent -->
|
||||
<!ENTITY cargoprev64-download-http "https://static.rust-lang.org/dist/cargo-&CARGOPREV;-x86_64-unknown-linux-gnu.tar.gz">
|
||||
<!ENTITY cargoprev64-md5sum "ad2b513d591f35271f1041e2e04f484c">
|
||||
<!ENTITY cargoprev64-size "4.4 MB">
|
||||
<!ENTITY cargoprev32-download-http "https://static.rust-lang.org/dist/cargo-&CARGOPREV;-i686-unknown-linux-gnu.tar.gz">
|
||||
<!ENTITY cargoprev32-md5sum "24d4eda62991bfbaecb3a6d1e09df143">
|
||||
<!ENTITY cargoprev32-size "4.3 MB">
|
||||
]>
|
||||
|
||||
<sect1 id="cargo" xreflabel="cargo-&cargo-version;">
|
||||
<?dbhtml filename="cargo.html"?>
|
||||
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
|
||||
<title>Cargo-&cargo-version;</title>
|
||||
|
||||
<indexterm zone="cargo">
|
||||
<primary sortas="a-cargo">Cargo</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title>Introduction to cargo</title>
|
||||
|
||||
<para>
|
||||
<application>Cargo</application> is the Package Manager for
|
||||
<application>Rust</application>. Like that, during the build it uses
|
||||
<command>curl</command> to download <filename>cargo</filename> files
|
||||
which are actually <filename>.tar.gz</filename> source archives.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This package requires internet access to build and at runtime (when
|
||||
<command>rust</command> is compiling another package). It will use all
|
||||
available cores. It also needs the current or previous version to compile
|
||||
itself, so here a binary of the previous version is used to bootstrap.
|
||||
</para>
|
||||
|
||||
&lfs80_checked;
|
||||
|
||||
<note><para><application>Firefox</application> will download a correctly
|
||||
named tarball, or you can download it via wget as:</para>
|
||||
|
||||
<screen><userinput>wget https://github.com/rust-lang/cargo/archive/&cargo-version;.tar.gz \
|
||||
-O cargo-&cargo-version;.tar.gz</userinput></screen>
|
||||
</note>
|
||||
|
||||
<bridgehead renderas="sect3">Package Information</bridgehead>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
Download (HTTP): <ulink url="&cargo-download-http;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download (FTP): <ulink url="&cargo-download-ftp;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download MD5 sum: &cargo-md5sum;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download size: &cargo-size;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated disk space required: &cargo-buildsize;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated build time: &cargo-time;
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Rust Installer:
|
||||
<ulink url="&rusti-download-http;"/></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Installer MD5 sum: &rusti-md5sum;</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Installer size: &rusti-size;</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Binary download (x86_64):
|
||||
<ulink url="&cargoprev64-download-http;"/></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Binary x86_64 MD5 sum: &cargoprev64-md5sum;</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Binary x86_64 download size: &cargoprev64-size;</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Binary download (i686):
|
||||
<ulink url="&cargoprev32-download-http;"/></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Binary i686 MD5 sum: &cargoprev32-md5sum;</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Binary i686 download size: &cargoprev32-size;</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<bridgehead renderas="sect3">Cargo Dependencies</bridgehead>
|
||||
|
||||
<bridgehead renderas="sect4">Required</bridgehead>
|
||||
<para role="required">
|
||||
<xref linkend="cmake"/>,
|
||||
<xref linkend="rust"/>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect4">Optional</bridgehead>
|
||||
<para role="optional">
|
||||
<xref linkend="git"/>,
|
||||
<xref linkend="openssl"/>
|
||||
</para>
|
||||
|
||||
<para condition="html" role="usernotes">
|
||||
User Notes: <ulink url="&blfs-wiki;/cargo"/>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of cargo</title>
|
||||
|
||||
<para>
|
||||
Install <application>cargo</application> by running the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
<screen><userinput>pushd src/rust-installer &&
|
||||
tar -xf ../../../rust-installer-&RUSTIDATE;.tar.xz \
|
||||
--strip-components=1 &&
|
||||
popd &&
|
||||
|
||||
case $(uname -m) in
|
||||
x86_64) tar -xf ../cargo-&CARGOPREV;-x86_64-unknown-linux-gnu.tar.gz
|
||||
;;
|
||||
i686) tar -xf ../cargo-&CARGOPREV;-i686-unknown-linux-gnu.tar.gz
|
||||
;;
|
||||
esac &&
|
||||
|
||||
./configure --prefix=/usr --sysconfdir=/etc &&
|
||||
--docdir=/usr/share/doc/cargo-&cargo-version; &&
|
||||
--cargo=./cargo-nightly*/cargo/bin/cargo &&
|
||||
make</userinput></screen>
|
||||
|
||||
<para>
|
||||
To test the results, issue: <command>CFG_DISABLE_CROSS_TESTS=1
|
||||
./target/*-unknown-linux-gnu/release/cargo test</command>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now, as the <systemitem class="username">root</systemitem> user:
|
||||
</para>
|
||||
|
||||
<screen role="root"><userinput>make install &&
|
||||
mv -v /usr/etc/bash_completion.d/cargo /etc/bash_completion.d</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="commands">
|
||||
<title>Command Explanations</title>
|
||||
|
||||
<para>
|
||||
<command>tar -xf ../../../rust-installer-&RUSTIDATE;.tar.xz ...</command>:
|
||||
The rust-installer is needed, but not shipped with
|
||||
<application>cargo</application>, so BLFS provides a repackaged git
|
||||
snapshot.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<parameter>--cargo=</parameter>: This points to the binary of the previous
|
||||
version, so that the package can be bootstrapped. When upgrading, or if
|
||||
rebuilding, it is possible to use the current installed version without
|
||||
this switch, but that takes longer and uses more space.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>CFG_DISABLE_CROSS_TESTS=1 ...</command>: By default the tests
|
||||
will try to cover cross-builds for other architectures, but BLFS only
|
||||
installs <command>rust</command> for the host architecture. This switch
|
||||
also points to where cargo has been created, using a wildcard to match the
|
||||
one target-triple directory which has been created.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>mv -v /usr/etc/bash_completion.d/cargo ...</command>: Cargo
|
||||
accepts the sysconfdir switch but does not respect it. This fixes up the
|
||||
misplaced file.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title>Contents</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed Program(s)</segtitle>
|
||||
<segtitle>Installed Librar(y,ies)</segtitle>
|
||||
<segtitle>Installed Director(y,ies)</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>
|
||||
cargo
|
||||
</seg>
|
||||
<seg>
|
||||
None
|
||||
</seg>
|
||||
<seg>
|
||||
/usr/share/doc/cargo-&cargo-version; and
|
||||
/usr/share/zsh/site-functions.
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="cargo-prog">
|
||||
<term><command>cargo</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is the Package Manager for Rust.
|
||||
</para>
|
||||
<indexterm zone="cargo cargo-prog">
|
||||
<primary sortas="b-cargo">cargo</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</sect2>
|
||||
</sect1>
|
255
general/prog/llvm3.xml
Normal file
255
general/prog/llvm3.xml
Normal file
@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
||||
%general-entities;
|
||||
|
||||
<!-- for the moment, this is internally llvm-old but visibly llvm3
|
||||
so that when rust eventually understands a less-old version the
|
||||
visible fields, and the page itself, can be moved to that newer
|
||||
number -->
|
||||
<!ENTITY llvm-old-download-http "http://llvm.org/releases/&llvm-old-version;/llvm-&llvm-old-version;.src.tar.xz">
|
||||
<!ENTITY llvm-old-download-ftp " ">
|
||||
<!ENTITY llvm-old-md5sum "3259018a7437e157f3642df80f1983ea">
|
||||
<!ENTITY llvm-old-size "18 MB">
|
||||
<!ENTITY llvm-old-buildsize "663 MB (112 MB installed) plus 101 MB for the testsuite">
|
||||
<!ENTITY llvm-old-time "6.9 SBU (plus 1.8 SBU for the testsuite, both with parallelism=4)">
|
||||
]>
|
||||
|
||||
<sect1 id="llvm-old" xreflabel="LLVM-&llvm-old-version;">
|
||||
<?dbhtml filename="llvm-old.html"?>
|
||||
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
|
||||
<title>LLVM-&llvm-old-version;</title>
|
||||
|
||||
<indexterm zone="llvm-old">
|
||||
<primary sortas="a-llvm3">LLVM3</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title>Introduction to llvm3</title>
|
||||
|
||||
<para>
|
||||
This is an old version of <application>llvm</application>, installed
|
||||
in /opt so that <xref linkend="rust"/> can use it. For normal use you
|
||||
should install <xref linkend="llvm"/>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This version of the <application>LLVM</application> package contains old
|
||||
versions of the libraries, using the API which
|
||||
<application>Rust</application> expects. Although <xref linkend="rust"/>
|
||||
ships with a version of LLVM-3.9 and will build and link to it statically,
|
||||
its <application>rustbuild</application> build-system will always compile
|
||||
a large number of cross-compilers for different architectures. Using a
|
||||
separate LLVM avoids that.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By using a separate <application>LLVM-3.9.1</application> it will be
|
||||
possible to save time when upgrading <application>Rust</application> (the
|
||||
overall time for the first build will be similar both with and without
|
||||
separate <application>LLVM-3.9.1</application>).
|
||||
</para>
|
||||
|
||||
&lfs80_checked;
|
||||
|
||||
<bridgehead renderas="sect3">Package Information</bridgehead>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
Download (HTTP): <ulink url="&llvm-old-download-http;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download (FTP): <ulink url="&llvm-old-download-ftp;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download MD5 sum: &llvm-old-md5sum;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download size: &llvm-old-size;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated disk space required: &llvm-old-buildsize;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated build time: &llvm-old-time;
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<bridgehead renderas="sect3">llvm3 Dependencies</bridgehead>
|
||||
|
||||
<bridgehead renderas="sect4">Required</bridgehead>
|
||||
<para role="required">
|
||||
<xref linkend="cmake"/>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect4">Recommended</bridgehead>
|
||||
<para role="recommended">
|
||||
<xref linkend="python2"/>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect4">Optional</bridgehead>
|
||||
<para role="optional">
|
||||
<xref linkend="doxygen"/>,
|
||||
<xref linkend="graphviz"/>,
|
||||
<xref linkend="libffi"/> (if you force this to be
|
||||
used, the build of <xref linkend="rust"/> will need to be altered)
|
||||
<xref linkend="libxml2"/>,
|
||||
<xref linkend="texlive"/> (or <xref linkend="tl-installer"/>),
|
||||
<xref linkend="valgrind"/>,
|
||||
<xref linkend="zip"/>,
|
||||
<ulink url="http://www.ocaml.org/">OCaml</ulink>, and
|
||||
<ulink url="http://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
|
||||
</para>
|
||||
|
||||
<para condition="html" role="usernotes">
|
||||
User Notes: <ulink url="&blfs-wiki;/llvm3"/>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of llvm3</title>
|
||||
|
||||
<para>
|
||||
Install <application>llvm3</application> by running the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
<screen><userinput>echo "/opt/llvm3/lib" >> /etc/ld.so.conf &&
|
||||
mkdir -v build &&
|
||||
cd build &&
|
||||
|
||||
CC=gcc CXX=g++ \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm3 \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_TARGETS_TO_BUILD="host" \
|
||||
-DLLVM_INSTALL_UTILS=ON \
|
||||
-Wno-dev .. &&
|
||||
make</userinput></screen>
|
||||
|
||||
<para>
|
||||
To test the results, issue: <command>make check-all</command>. The tests
|
||||
are run using the maximum number of processors/threads available, but the
|
||||
main part of the added time is spent compiling the test programs. This
|
||||
works fine with parallel make.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now, as the <systemitem class="username">root</systemitem> user:
|
||||
</para>
|
||||
|
||||
<screen role="root"><userinput>
|
||||
make install &&
|
||||
ldconfig &&
|
||||
ln -sfv /opt/llvm3/bin/FileCheck /usr/bin
|
||||
</userinput></screen>
|
||||
|
||||
<para>
|
||||
Building the documentation for <emphasis>current</emphasis> LLVM is
|
||||
covered in <xref linkend="llvm"/>, building docs for this old version
|
||||
would be similar, but almost everyone who needs this old version will
|
||||
also need the current version for <xref linkend="mesa"/> so it is
|
||||
redundant to install the docs here.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="commands">
|
||||
<title>Command Explanations</title>
|
||||
|
||||
<para>
|
||||
<parameter>-DLLVM_INSTALL_UTILS_=ON</parameter>: This switch enables
|
||||
the installation of old utility programs. Of those,
|
||||
<application>rust</application> looks for <command>FileCheck</command>
|
||||
when its configure checks for a system LLVM, the others are not used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<parameter>ldconfig</parameter>: This ensures the libraries can be
|
||||
found.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<parameter>ln -sfv /opt/llvm3/bin/FileCheck /usr/bin</parameter>: This
|
||||
ensures that FileCheck can be found by <application>rust</application>
|
||||
even though <filename class="directory">/opt/llvm3/bin</filename> is not
|
||||
on the PATH (having two versions of <application>LLVM</application>
|
||||
generally available has been known to cause pain).
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title>Contents</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed Program(s)</segtitle>
|
||||
<segtitle>Installed Librar(y,ies)</segtitle>
|
||||
<segtitle>Installed Director(y,ies)</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>
|
||||
bugpoint, count, FileCheck,
|
||||
llc, lli, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov,
|
||||
llvm-c-test, llvm-cxxdump, llvm-diff, llvm-dis, llvm-dsymutil,
|
||||
llvm-dwarfdump, llvm-dwp, llvm-extract, llvm-lib (symlink to
|
||||
llvm-ar), llvm-link, llvm-lto, llvm-mc, llvm-mcmarkup, llvm-nm,
|
||||
llvm-objdump, llvm-pdbdump, llvm-profdata, llvm-ranlib (symlink to
|
||||
llvm-ar), llvm-readobj, llvm-rtdyld, llvm-size, llvm-split,
|
||||
llvm-stress, llvm-symbolizer, llvm-tblgen, not, obj2yaml, opt, sancov,
|
||||
sanstats, verify-uselistorder, yaml-bench and yaml2obj
|
||||
</seg>
|
||||
<seg>
|
||||
BugpointPasses.so, LLVMHello.so, libLLVM.so, libLLVM*.a (50
|
||||
libraries), libLTO.so
|
||||
</seg>
|
||||
<seg>
|
||||
/opt/llvm3
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="FileCheck">
|
||||
<term><command>FileCheck</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
reads two files (one from standard input,the other specified on the
|
||||
command line) and uses one to verify the other.
|
||||
</para>
|
||||
<indexterm zone="llvm-old FileCheck">
|
||||
<primary sortas="b-FileCheck">FileCheck</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
For details of the other items in this package, see <xref linkend="llvm"/>.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
@ -24,6 +24,7 @@ $Date$
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf213.xml"/>
|
||||
<!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bazaar.xml"/> -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cargo.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clisp.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cmake.xml"/>
|
||||
@ -41,6 +42,7 @@ $Date$
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="git.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="guile.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="librep.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="llvm3.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="llvm.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lua.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mercurial.xml"/>
|
||||
@ -53,6 +55,7 @@ $Date$
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python3.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python-modules.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ruby.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rust.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="scons.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="slang.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="subversion.xml"/>
|
||||
|
298
general/prog/rust.xml
Normal file
298
general/prog/rust.xml
Normal file
@ -0,0 +1,298 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
||||
%general-entities;
|
||||
|
||||
<!ENTITY rust-download-http "http://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.gz">
|
||||
<!ENTITY rust-download-ftp "">
|
||||
<!ENTITY rust-md5sum "c11d94d9e62f71838b20058f0797357a">
|
||||
<!ENTITY rust-size "28 MB">
|
||||
<!ENTITY rust-buildsize "1.5 GB (208 MB installed) plus 118MB for cargo files">
|
||||
<!ENTITY rust-time "14 SBU (with 4 processors)">
|
||||
]>
|
||||
|
||||
<sect1 id="rust" xreflabel="rustc-&rust-version;">
|
||||
<?dbhtml filename="rust.html"?>
|
||||
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
|
||||
<title>Rustc-&rust-version;</title>
|
||||
|
||||
<indexterm zone="rust">
|
||||
<primary sortas="a-rust">Rust</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title>Introduction to Rust</title>
|
||||
|
||||
<para>
|
||||
The <application>Rust</application> programming language is designed
|
||||
to be a safe, concurrent, practical language.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The current <application>rustbuild</application> 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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At the moment <application>Rust</application> does not provide any
|
||||
guarantees of a stable ABI, and it is likely that the next few versions
|
||||
of <application>firefox</application> will each require the latest version
|
||||
of <application>Rust</application>.
|
||||
</para>
|
||||
|
||||
&lfs80_checked;
|
||||
|
||||
<bridgehead renderas="sect3">Package Information</bridgehead>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
Download (HTTP): <ulink url="&rust-download-http;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download (FTP): <ulink url="&rust-download-ftp;"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download MD5 sum: &rust-md5sum;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Download size: &rust-size;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated disk space required: &rust-buildsize;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Estimated build time: &rust-time;
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<bridgehead renderas="sect3">Rust Dependencies</bridgehead>
|
||||
|
||||
<bridgehead renderas="sect4">Required</bridgehead>
|
||||
<para role="required">
|
||||
<xref linkend="curl"/>,
|
||||
<xref linkend="cmake"/> (if not using the recommended <xref linkend="llvm-old"/>),
|
||||
<xref linkend="python2"/>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect4">Recommended</bridgehead>
|
||||
<para role="recommended">
|
||||
<!-- acceptable versions of llvm are listed in the tests
|
||||
of LLVM_VERSION in configure, currently 3.{7-9}* -->
|
||||
<xref linkend="llvm-old"/>
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect4">Optional</bridgehead>
|
||||
<para role="optional">
|
||||
<xref linkend="gdb"/> (often required for the testsuite, but some of the
|
||||
gdb tests may still fail),
|
||||
<xref linkend="ninja"/>
|
||||
</para>
|
||||
|
||||
<para condition="html" role="usernotes">
|
||||
User Notes: <ulink url="&blfs-wiki;/rust"/>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Rust</title>
|
||||
|
||||
<para>
|
||||
Install <application>Rust</application> by running the following
|
||||
commands:
|
||||
</para>
|
||||
|
||||
<screen><userinput>
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/rustc-&rust-version; \
|
||||
--llvm-root=/opt/llvm3 --enable-llvm-link-shared &&
|
||||
./x.py build</userinput></screen>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nevertheless, if you insist on running the tests issue
|
||||
<command>./x.py test</command>: as with the build, that will
|
||||
use all available CPUs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now, as the <systemitem class="username">root</systemitem> user:
|
||||
</para>
|
||||
|
||||
<screen role="root"><userinput>
|
||||
test -f /usr/lib/libLLVM-3.9.so ||
|
||||
ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib &&
|
||||
|
||||
./x.py dist --install</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="commands">
|
||||
<title>Command Explanations</title>
|
||||
|
||||
<para>
|
||||
<command>--llvm-root=/opt/llvm3 --enable-llvm-link-shared</command>:
|
||||
This tells rust to use the system verison of llvm3 installed in
|
||||
<filename class="directory">/opt/llvm3</filename>, linking to the
|
||||
shared libraries.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option>--enable-dist-host-only</option>: If you did not install a
|
||||
system version of <xref linkend="llvm-old"/>, use this alternative command
|
||||
to build the shipped static version of llvm. It will
|
||||
<emphasis>compile</emphasis> for all the available linux cross-compilers
|
||||
(Aarch64, MIPS, PowerPC, SystemZ, etc) but with this switch it will only
|
||||
<emphasis>install</emphasis> for the host architecture.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option>RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</option>: use this if
|
||||
you need to link against a version of LLVM-3 which was compiled against
|
||||
<xref linkend="libffi"/>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>ln -sv /opt/llvm3/lib/libLLVM-3.9.so /usr/lib</command>:
|
||||
Although the <emphasis>build</emphasis> of <application>Rust</application>
|
||||
finds the shared library in
|
||||
<filename class="directory">/opt/llvm3/lib</filename>, several of the steps
|
||||
run by the <application>rustbuild</application>
|
||||
<emphasis>installer</emphasis> do not find
|
||||
<filename>libLLVM-3.9.so</filename>. This conditional symlink fixes that,
|
||||
and works even if <filename>libLLVM-3.9.{0,1}</filename> has already been
|
||||
installed in <filename class="directory">/usr</filename>.
|
||||
<emphasis>Omit this command if you did not install a system version of
|
||||
<xref linkend="llvm-old"/></emphasis>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title>Contents</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed Program(s)</segtitle>
|
||||
<segtitle>Installed Librar(y,ies)</segtitle>
|
||||
<segtitle>Installed Director(y,ies)</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>
|
||||
rust-gdb, rust-lldb, rustc, rustdoc.
|
||||
</seg>
|
||||
<seg>
|
||||
Many libraries (libarena, libflate, libfmt_macros, libgetopts,
|
||||
libgraphviz, liblog, libproc_macro, librustc*, libserialize,
|
||||
libstd, libsyntax, libterm, libtest), all containing a hash in
|
||||
their names.
|
||||
</seg>
|
||||
<seg>
|
||||
~/.cargo,
|
||||
/usr/lib/rustlib,
|
||||
/usr/share/doc/rustc-&rust-version;.
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="rust-gdb">
|
||||
<term><command>rust-gdb</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is a Python wrapper script for gdb.
|
||||
</para>
|
||||
<indexterm zone="rust rust-gdb">
|
||||
<primary sortas="b-rust-gdb">rust-gdb</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="rust-lldb">
|
||||
<term><command>rust-lldb</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is a Python wrapper script for LLDB (the LLVM debugger).
|
||||
</para>
|
||||
<indexterm zone="rust rust-lldb">
|
||||
<primary sortas="b-rust-lldb">rust=lldb</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="rustc">
|
||||
<term><command>rustc</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is the rust compiler.
|
||||
</para>
|
||||
<indexterm zone="rust rustc">
|
||||
<primary sortas="b-rustc">rustc</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="rustdoc">
|
||||
<term><command>rustdoc</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
generates documentation from rust source code.
|
||||
</para>
|
||||
<indexterm zone="rust rustdoc">
|
||||
<primary sortas="b-rustdoc">rustdoc</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="libstd">
|
||||
<term><filename class="libraryfile">libstd-<16-byte-hash>.so</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is the Rust Standard Library, the foundation of portable Rust software.
|
||||
</para>
|
||||
<indexterm zone="rust libstd">
|
||||
<primary sortas="c-libstd">libstd-<16-byte-hash>.so</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</sect2>
|
||||
</sect1>
|
@ -41,6 +41,22 @@
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
-->
|
||||
<listitem>
|
||||
<para>April 14th, 2017</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>[ken] - Reinstate llvm-3.9.1 (for rust), but in /opt
|
||||
and with altered build instructions. Fixes
|
||||
<ulink url="&blfs-ticket-root;8931">#8931</ulink>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>[ken] - Add rustc-1.16.0 (the rust compiler) and
|
||||
cargo-0.17.0 (its so-called Package Manager). Fixes
|
||||
<ulink url="&blfs-ticket-root;8951">#8951</ulink>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>April 12th, 2017</para>
|
||||
<itemizedlist>
|
||||
|
@ -279,6 +279,10 @@
|
||||
<!-- Chapter 13 -->
|
||||
<!ENTITY autoconf213-version "2.13">
|
||||
<!ENTITY bazaar-version "2.5.1">
|
||||
<!ENTITY cargo-version "0.17.0">
|
||||
<!-- extras for cargo install, previous version for binaries, rust installer date -->
|
||||
<!ENTITY CARGOPREV "0.16.0">
|
||||
<!ENTITY RUSTIDATE "20161004">
|
||||
<!ENTITY check-version "0.11.0">
|
||||
<!ENTITY clisp-version "2.49">
|
||||
<!ENTITY cmake-major-version "3.7">
|
||||
@ -298,6 +302,7 @@
|
||||
<!ENTITY guile-version "2.2.0">
|
||||
<!ENTITY librep-version "0.92.6">
|
||||
<!ENTITY llvm-version "4.0.0">
|
||||
<!ENTITY llvm-old-version "3.9.1">
|
||||
<!ENTITY lua-version "5.3.4">
|
||||
<!ENTITY mercurial-version "4.1.2">
|
||||
<!ENTITY nasm-version "2.12.02">
|
||||
@ -309,6 +314,7 @@
|
||||
<!ENTITY ruby-minor-version "2.4">
|
||||
<!ENTITY ruby-patch-version "1">
|
||||
<!ENTITY ruby-version "&ruby-minor-version;.&ruby-patch-version;">
|
||||
<!ENTITY rust-version "1.16.0">
|
||||
<!ENTITY scons-version "2.5.1">
|
||||
<!ENTITY slang-version "2.3.1">
|
||||
<!ENTITY subversion-version "1.9.5">
|
||||
|
@ -156,6 +156,7 @@ tar: Exiting with failure status due to previous errors
|
||||
|
||||
<bridgehead renderas="sect4">Optional</bridgehead>
|
||||
<para role="optional">
|
||||
<xref linkend="cargo"/>,
|
||||
<xref linkend="curl"/>,
|
||||
<xref linkend="dbus-glib"/>,
|
||||
<xref linkend="doxygen"/>,
|
||||
@ -171,7 +172,6 @@ tar: Exiting with failure status due to previous errors
|
||||
<phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase>
|
||||
<phrase revision="systemd"><xref linkend="liboauth"/></phrase>,
|
||||
<ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
|
||||
<ulink url="https://www.rust-lang.org/">Rust</ulink>,
|
||||
and (with the patch)
|
||||
<xref linkend="graphite2"/> and
|
||||
<xref linkend="harfbuzz"/>
|
||||
|
Loading…
Reference in New Issue
Block a user