2024-01-18 19:53:23 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2020-06-07 21:16:00 +01:00
|
|
|
<sect1 id="ch-tools-file" role="wrap">
|
2006-02-03 20:54:03 +00:00
|
|
|
<?dbhtml filename="file.html"?>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>file</productname>
|
|
|
|
<productnumber>&file-version;</productnumber>
|
|
|
|
<address>&file-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<title>File-&file-version;</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2020-06-07 21:16:00 +01:00
|
|
|
<indexterm zone="ch-tools-file">
|
2006-02-03 20:54:03 +00:00
|
|
|
<primary sortas="a-File">File</primary>
|
2020-06-07 21:16:00 +01:00
|
|
|
<secondary>tools</secondary>
|
2006-02-03 20:54:03 +00:00
|
|
|
</indexterm>
|
2001-07-17 19:51:18 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2020-06-07 21:16:00 +01:00
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
href="../chapter08/file.xml"
|
|
|
|
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<seglistitem>
|
2020-06-11 13:55:28 +01:00
|
|
|
<seg>&file-tmp-sbu;</seg>
|
|
|
|
<seg>&file-tmp-du;</seg>
|
2006-02-03 20:54:03 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of File</title>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2021-02-03 04:43:41 +00:00
|
|
|
<para>
|
2021-09-07 21:41:43 +01:00
|
|
|
The <command>file</command> command on the build host needs
|
2022-11-04 00:24:54 +00:00
|
|
|
to be the same version as the one we are building in order to
|
|
|
|
create the signature file. Run the following commands to make a
|
|
|
|
temporary copy of the <command>file</command> command:
|
2021-02-03 04:43:41 +00:00
|
|
|
</para>
|
2021-02-02 21:35:59 +00:00
|
|
|
|
|
|
|
<screen><userinput remap="pre">mkdir build
|
|
|
|
pushd build
|
2021-02-04 21:32:58 +00:00
|
|
|
../configure --disable-bzlib \
|
2021-02-04 15:34:31 +00:00
|
|
|
--disable-libseccomp \
|
|
|
|
--disable-xzlib \
|
|
|
|
--disable-zlib
|
2021-02-03 04:43:41 +00:00
|
|
|
make
|
2021-02-02 21:35:59 +00:00
|
|
|
popd</userinput></screen>
|
|
|
|
|
2021-02-04 15:34:31 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the new configure option:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--disable-*</parameter></term>
|
|
|
|
<listitem>
|
2021-02-04 17:32:53 +00:00
|
|
|
<para>The configuration script attempts to use some packages from
|
2021-02-04 15:34:31 +00:00
|
|
|
the host distribution if the corresponding library files exist.
|
|
|
|
It may cause compilation failure if a library file exists, but
|
2021-02-04 17:32:53 +00:00
|
|
|
the corresponding header files do not. These options prevent
|
|
|
|
using these unneeded capabilities from the host.</para>
|
2021-02-04 15:34:31 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Prepare File for compilation:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2021-02-02 16:15:16 +00:00
|
|
|
<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess)</userinput></screen>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Compile the package:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2021-02-02 21:35:59 +00:00
|
|
|
<screen><userinput remap="make">make FILE_COMPILE=$(pwd)/build/src/file</userinput></screen>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Install the package:</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2020-06-07 21:16:00 +01:00
|
|
|
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2022-08-19 05:41:48 +01:00
|
|
|
<para>Remove the libtool archive file because it is harmful for cross
|
|
|
|
compilation:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="install">rm -v $LFS/usr/lib/libmagic.la</userinput></screen>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
|
|
|
|
2020-06-07 21:16:00 +01:00
|
|
|
<sect2 role="content">
|
|
|
|
<title/>
|
2020-06-19 18:04:09 +01:00
|
|
|
<para>Details on this package are located in <xref linkend="contents-file" role="."/></para>
|
2006-02-03 20:54:03 +00:00
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|