Tighten up this sub-section and format as an itemized list.

Sponsored by: iXsystems
This commit is contained in:
Dru Lavigne 2014-02-06 16:03:48 +00:00
parent 94a0dc5aeb
commit 5fac757ef9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43804

View file

@ -2441,18 +2441,16 @@ Script done, &hellip;</screen>
</sect2> </sect2>
<sect2 xml:id="updating-questions"> <sect2 xml:id="updating-questions">
<title>Questions</title> <title>Common Questions</title>
<qandaset> <variablelist>
<qandaentry> <varlistentry>
<question> <term>Do I need to re-make the world for every
<para>Do I need to re-make the world for every change?</term>
change?</para>
</question>
<answer> <listitem>
<para>There is no easy answer, as it depends on the nature <para>It depends upon the nature
of the change. For example, if running of the change. For example, if
<application>svn</application> only shows the following <application>svn</application> only shows the following
files as being updated:</para> files as being updated:</para>
@ -2465,108 +2463,77 @@ Script done, &hellip;</screen>
<para>it probably is not worth rebuilding the entire <para>it probably is not worth rebuilding the entire
world. Instead, go into the appropriate sub-directories world. Instead, go into the appropriate sub-directories
and run <command>make all install</command>. But if and run <command>make all install</command>. But if
something major changed, such as something major changes, such as
<filename>src/lib/libc/stdlib</filename>, either <filename>src/lib/libc/stdlib</filename>, consider
re-make world, or at least those parts of it that are rebuilding world.</para>
statically linked.</para>
<para>At the end of the day, it is your call. Some users <para>Some users
re-make the world every fortnight and let changes rebuild world every fortnight and let changes
accumulate over that fortnight. Others only re-make accumulate over that fortnight. Others only re-make
those things that have changed and are careful to spot those things that have changed and are careful to spot
all the dependencies.</para> all the dependencies. It all depends on how often a user wants to upgrade
<para>It all depends on how often a user wants to upgrade
and whether they are tracking &os.stable; or and whether they are tracking &os.stable; or
&os.current;.</para> &os.current;.</para>
</answer> </listitem>
</qandaentry> </varlistentry>
<qandaentry> <varlistentry>
<question> <term>What would cause a compile to fail with lots of
<para>My compile failed with lots of
signal 11<indexterm> signal 11<indexterm>
<primary>signal 11</primary> <primary>signal 11</primary>
</indexterm> </indexterm>
(or other signal number) errors. What happened?</para> (or other signal number) errors?</term>
</question>
<answer> <listitem>
<para>This normally indicates hardware problems. <para>This normally indicates a hardware problem.
(Re)making world is an effective way to stress test Building world is an effective way to stress test
hardware, and will frequently throw up memory hardware, especially memory. A sure indicator of a hardware issue is when
problems which normally manifest themselves as the
compiler mysteriously aborts.</para>
<para>A sure indicator of this occurs when
<application>make</application> is restarted and it <application>make</application> is restarted and it
dies at a different point in the process.</para> dies at a different point in the process.</para>
<para>To resolve this error, start swapping around the <para>To resolve this error, swap out the
components in the machine to determine which one is components in the machine, starting with RAM, to determine which component is
failing.</para> failing.</para>
</answer> </listitem>
</qandaentry> </varlistentry>
<qandaentry> <varlistentry>
<question> <term>Can <filename class="directory">/usr/obj</filename>
<para>Can <filename>/usr/obj</filename> be removed when finished?</term>
be removed when finished?</para>
</question>
<answer> <listitem>
<para>The short answer is yes.</para>
<para><filename>/usr/obj</filename> <para>This directory
contains all the object files that were produced during contains all the object files that were produced during
the compilation phase. Normally, one of the first steps the compilation phase. Normally, one of the first steps
in the <command>make buildworld</command> process is to in the <command>make buildworld</command> process is to
remove this directory and start afresh. Keeping remove this directory and start afresh. Keeping
<filename>/usr/obj</filename> around <filename>/usr/obj</filename> around
when finished makes little sense, and its removal frees when finished makes little sense, and its removal frees
up a approximately 2&nbsp;GB of disk space.</para> up a approximately 2GB of disk space.</para>
</listitem>
</varlistentry>
<para>Advances users can instruct <varlistentry>
<command>make buildworld</command> to skip this step. <term>Can interrupted builds be resumed?</term>
This speeds up subsequent builds, since most of the
sources will not need to be recompiled. The flip side
is that subtle dependency problems can creep in, causing
the build to fail in odd ways. This frequently
generates noise on the &os; mailing lists, when one
person complains that their build has failed, not
realizing that it is because they have tried to cut
corners.</para>
</answer>
</qandaentry>
<qandaentry> <listitem>
<question>
<para>Can interrupted builds be resumed?</para>
</question>
<answer>
<para>This depends on how far into the process the <para>This depends on how far into the process the
problem occurs.</para> problem occurs. In general, <command>make buildworld</command>
builds new copies of essential tools and the system libraries.
<para>In general, <command>make buildworld</command>
builds new copies of essential tools, such as
&man.gcc.1; and &man.make.1;, and the system libraries.
These tools and libraries are then installed, used to These tools and libraries are then installed, used to
rebuild themselves, and are installed again. The entire rebuild themselves, and are installed again. The rest of the
system, including regular user programs such as system is then rebuilt with the new
&man.ls.1; or &man.grep.1;, is then rebuilt with the new system tools.</para>
system files.</para>
<para>During the last stage, it is fairly safe to:</para> <para>During the last stage, it is fairly safe to run
these commands as they will not undo the work of the previous
<command>make buildworld</command>:</para>
<screen><emphasis>&hellip; fix the problem &hellip;</emphasis> <screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make -DNO_CLEAN all</userinput></screen> &prompt.root; <userinput>make -DNO_CLEAN all</userinput></screen>
<para>This will not undo the work of the previous <para>If this message appears:</para>
<command>make buildworld</command>.</para>
<para>If you see the message:</para>
<screen>-------------------------------------------------------------- <screen>--------------------------------------------------------------
Building everything.. Building everything..
@ -2575,72 +2542,36 @@ Building everything..
<para>in the <command>make buildworld</command> output, <para>in the <command>make buildworld</command> output,
it is probably fairly safe to do so.</para> it is probably fairly safe to do so.</para>
<para>If that message is not displayed, or you are not <para>If that message is not displayed,
sure, it is always better to be safe than sorry, and it is always better to be safe than sorry and to
restart the build from scratch.</para> restart the build from scratch.</para>
</answer> </listitem>
</qandaentry> </varlistentry>
<qandaentry> <varlistentry>
<question> <term>Is it possible to speed up making the world?</term>
<para>How can I speed up making the world?</para>
</question>
<answer> <listitem>
<itemizedlist> <para>Several actions can speed up the build world
<listitem> process. For example, the entire process can be run from
<para>Run it in single user mode.</para> single-user mode. However, this will prevent users
</listitem> from having access
to the system until the process is complete.</para>
<listitem> <para>Careful file system design or the use of ZFS
<para>Put <filename>/usr/src</filename> and datasets can make a difference. Consider putting <filename class="directory">/usr/src</filename> and
<filename>/usr/obj</filename> <filename class="directory">/usr/obj</filename>
on separate file systems held on separate disks. If on separate file systems. If possible, place the file systems on separate disks on separate disk
possible, put these disks on separate disk controllers. When mounting
controllers.</para> <filename class="directory">/usr/src</filename>, use
</listitem> <option>noatime</option> which
prevents the file system from recording the
file access time. If <filename
class="directory">/usr/src</filename> is not on its
own file system, consider remounting <filename
class="directory">/usr</filename> with <option>noatime</option>.</para>
<listitem> <para>The file system holding
<para>Alternately, put these file systems across
multiple disks using &man.ccd.4;.</para>
</listitem>
<listitem>
<para>Turn off profiling by setting
<quote>NO_PROFILE=true</quote> in
<filename>/etc/make.conf</filename>.</para>
</listitem>
<listitem>
<para>Pass
<option>-j<replaceable>n</replaceable></option>
to &man.make.1; to run multiple processes in
parallel. This usually helps on both single and
multi processor machines.</para>
</listitem>
<listitem>
<para>The file system holding
<filename>/usr/src</filename> can
be mounted or remounted with
<option>noatime</option>.
This prevents the file system from recording the
file access time which is probably not
needed.</para>
<screen>&prompt.root; <userinput>mount -u -o noatime /usr/src</userinput></screen>
<warning>
<para>This example assumes
<filename>/usr/src</filename> is on its own file
system. If it is part of
<filename>/usr</filename>, then use that file
system mount point instead.</para>
</warning>
</listitem>
<listitem>
<para>The file system holding
<filename>/usr/obj</filename> can be mounted or <filename>/usr/obj</filename> can be mounted or
remounted with <option>async</option> so that disk remounted with <option>async</option> so that disk
writes happen asynchronously. The write completes writes happen asynchronously. The write completes
@ -2663,25 +2594,22 @@ Building everything..
backups before enabling this option.</para> backups before enabling this option.</para>
</warning> </warning>
<screen>&prompt.root; <userinput>mount -u -o async /usr/obj</userinput></screen> <para>Turn off profiling by setting
<quote>NO_PROFILE=true</quote> in
<filename>/etc/make.conf</filename>.</para>
<warning> <para>Pass
<para>If <filename>/usr/obj</filename> is <option>-j<replaceable>n</replaceable></option>
not on its own file system, replace it in the to &man.make.1; to run multiple processes in
example with the name of the appropriate mount parallel. This usually helps on both single- and
point.</para> multi-processor machines.</para>
</warning>
</listitem> </listitem>
</itemizedlist> </varlistentry>
</answer>
</qandaentry>
<qandaentry> <varlistentry>
<question> <term>What do I do if something goes wrong?</term>
<para>What do I do if something goes wrong?</para>
</question>
<answer> <listitem>
<para>Make absolutely sure that the environment has no <para>Make absolutely sure that the environment has no
extraneous cruft from earlier builds:</para> extraneous cruft from earlier builds:</para>
@ -2701,9 +2629,9 @@ Building everything..
output of <command>uname -a</command> to &a.questions;. output of <command>uname -a</command> to &a.questions;.
Be prepared to answer other questions about the Be prepared to answer other questions about the
setup!</para> setup!</para>
</answer> </listitem>
</qandaentry> </varlistentry>
</qandaset> </variablelist>
</sect2> </sect2>
</sect1> </sect1>