aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/fileutils-inst.xml
blob: 9bd395ac6195b1a2b7fbe6cc6eff9faa0ca2cf54 (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
<sect2>
<title>Installation of Fileutils</title>

<para>The programs from a statically linked fileutils package may cause
segmentation faults on certain systems, if your distribution has
Glibc-2.2.3 or higher installed. It also seems to happen mostly on machines
powered by an AMD CPU, but there is a case or two where an Intel system
is affected as well. If your system falls under this category, try the
following fix.</para>

<para>Note that in some cases using these sed commands will result in
problems 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 details are unavailable at the time.</para>

<para>To fix this package to compile properly on AMD/Glibc-2.2.3
machines, run the following commands. 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 compile time problems.</para>

<para><screen><userinput>cp lib/Makefile.in lib/Makefile.in.backup &amp;&amp;
sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \
&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in</userinput></screen></para>

<para>Install fileutils by running the following commands:</para>

<para><screen><userinput>./configure --disable-nls \
&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin &amp;&amp;
make LDFLAGS=-static &amp;&amp;
make install &amp;&amp;
cd $LFS/usr/bin &amp;&amp;
ln -sf ../../bin/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/bin/ls</userinput>. If this works, then you are OK. If
not, then you need to re-do the installation using the sed commands if 
you didn't use them, or without the sed commands if you did use 
them.</para>

</sect2>