Details on this package are located in Section 8.10.2, “Contents of File.”
The File package contains a utility for determining the type of a given file or files.
The file command on the build host needs to be same version as the one we are building in order to create the signature file. Run the following commands to build it:
mkdir build pushd build ../configure --disable-bzlib \ --disable-libseccomp \ --disable-xzlib \ --disable-zlib make popd
The meaning of the new configure option:
--disable-*
The configuration script attempts to use some packages from the host distribution if the corresponding library files exist. It may cause compilation failure if a library file exists, but the corresponding header files do not. These options prevent using these unneeded capabilities from the host.
Prepare File for compilation:
./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess)
Compile the package:
make FILE_COMPILE=$(pwd)/build/src/file
Install the package:
make DESTDIR=$LFS install
Remove the libtool archive file because it is harmful for cross compilation:
rm -v $LFS/usr/lib/libmagic.la
Details on this package are located in Section 8.10.2, “Contents of File.”