aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/fileutils-inst.xml
blob: 6103a1e62c724ccdd8076e877a31af6a728bcc55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>

<sect2>
<title>Installation of Fileutils</title>

<para>There is a documented bug with the atexit() function in glibc-2.2.3
when it is compiled with gcc-2.95.3. This bug only occurs on some systems
(primarily AMD, but not exclusively). This bug causes segmentation faults
in fileutils-4.1 when it is compiled statically. This patch causes
on_exit() to be called instead of atexit().</para>

<para>Note that in some cases using this patch will result in not being
able to compile this package at all, even when your system has an AMD CPU
and has Glibc-2.2.3 (or higher) installed. If that's the case, you'll need
to remove the fileutils-&fileutils-version; directory and unpack it again
from the tarball before continuing. We believe this may be the case when
your distribution has altered Glibc-2.2.3 somehow, but the exact details
are unknown.</para>

<para>To fix this package to compile properly on AMD/Glibc-2.2.3
machines, run the following command. Do <emphasis>NOT</emphasis>
attempt this fix if you don't have Glibc-2.2.3 installed. It will more 
than likely result in all kinds of compilation problems.</para>

<para><screen><userinput>patch -Np1 -i ../fileutils-&fileutils-patch-version;.patch</userinput></screen></para>

<para>Prepare the package to be compiled:</para>

<para><screen><userinput>LDFLAGS="-static" \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --disable-nls --prefix=$LFS/static</userinput></screen></para>

<para>Continue with compiling the package:</para>

<para><screen><userinput>make</userinput></screen></para>

<para>And finish off installing the package:</para>

<para><screen><userinput>make install</userinput></screen></para>

<para>Once you have installed Fileutils, you can test whether the
segmentation fault problem has been avoided by running
<userinput>$LFS/static/bin/ls</userinput>. If this works, then you are OK. If
not, then you need to re-do the installation with the patch if you didn't
use it, or without the patch if you did use it.</para>

</sect2>