BLFS Frequently Asked Questions

The FAQ is divided in three documents. The General FAQ has links to all questions and answers. The LFS FAQ is a selection of LFS-specific FAQ's and the BLFS FAQ is a selection of BLFS-specific FAQ's.

General BLFS questions

Compilation issues

Configuration issues

General BLFS questions

Some package installs libraries into /usr/lib64

Some packages (notably, all packages using meson building system) will use /usr/lib64 as the default library install directory if this directory exists. On a BLFS system this directory should not exist. Try to figure out why it has been created and then remove it. You may need to reinstall some packages and ensure their libraries are in the correct location, which is /usr/lib.

Please follow the book carefully when you build and install cmake: omitting the sed command in the instruction can cause cmake to install libraries into /usr/lib64.

A library in /usr/lib64 on BLFS won't work because ld-linux-x86-64.so.2 from LFS does not search /usr/lib64. If you are installing some packages beyond the scope of BLFS, you may need to find how to ensure installing the libraries into /usr/lib instead of /usr/lib64 yourself.

Back to the top.

Compilation issues

I'm getting errors building a package that requires GTK+, but I've installed GTK+ 3.x.

GTK+-2.x, GTK+-3.x and GTK-4.x are incompatible with each other. The package you're installing may need another version of GTK+ or GTK. You can install those versions without conflict.

Any error while building part of GNOME

Using the latest version of every GNOME package doesn't work. You have to use versions that are known to work together and are used in the BLFS book.

When building GNOME, follow the book and the book is good.

"fatal error: foo.h: No such file or directories" on include_next directives in C++ standard headers

Please make sure your CPLUS_INCLUDE_PATH environment variable does not contain /usr/include.

Especially, don't use the commands for Xorg installation outside of /usr if you are installing Xorg into /usr.

"fatal error: Killed signal terminated program cc1plus"

It usually indicates that your system is out of memory. Then the kernel will find a process heavily utilizing memory and kill it, which is likely the process compiling a large source file. The kernel will report "[process name] invoked oom-killer" in the kernel log, if a process is killed for this reason.

If it's possible, you can solve the problem by adding more RAM into your system. Otherwise, run make or ninja with "-j N", where N should be replaced with a relatively small positive integer. You can try the value of N from the number of your CPU cores, down to 1.

If this issue still lingers with N = 1, you should really add more RAM. You may work around it by adding more swap, but swapping can make the building process slower.

cannot find -liberty: No such file or directory

It's because libbfd.la refers to the non-exist libiberty. libbfd.la should be removed in LFS ("Cleaning Up" section) as we consider all .la files in LFS unneeded and harmful.

Please do not skip any section building LFS. You may skip some instruction only if the book explicitly says it's optional.

Back to the top.

Configuration issues

How do I print?

See one of the various printing hints

Before you try any of the advanced printer daemons (for example CUPS) make sure your printer works by following the Printing From Scratch hint. For most people, this hint is all that is required to setup basic printing.

When reporting problems with CUPS, please indicate whether the following commands work:

# This is an image, so ghostscript is not called
lpr -o ppi=100 /usr/share/doc/cups/images/cups-block-diagram.gif
# This PostScript file doesn't use any fonts
lpr /usr/share/ghostscript/<version>/examples/tiger.ps
# This PostScript file uses fonts
lpr /usr/share/ghostscript/<version>/examples/alphabet.ps

How do I set PS1 in Konsole?

Follow the instructions on the BLFS Bash Shell Startup Files to properly setup your enviroment.

Alternatively, you can try the following solutions:

Start konsole as a login shell:

konsole --ls

Change the session in Konsole to start /bin/bash --login instead of /bin/bash.