%general-entities; ]> Going Beyond BLFS The packages that are installed in this book are only the tip of the iceberg. We hope that the experience you gained with the LFS book and the BLFS book will give you the background needed to compile, install and configure packages that are not included in this book. When you want to install a package to a location other than /, or /usr, you are installing outside the default environment settings on most machines. The following examples should assist you in determining how to correct this situation. The examples cover the complete range of settings that may need updating, but they are not all needed in every situation. Expand the PATH to include $PREFIX/bin. Expand the PATH for root to include $PREFIX/sbin. Add $PREFIX/lib to /etc/ld.so.conf or expand LD_LIBRARY_PATH to include it. Before using the latter option, check out . If you modify /etc/ld.so.conf, remember to update /etc/ld.so.cache by executing ldconfig as the root user. Add $PREFIX/man to /etc/man_db.conf. Add $PREFIX/info to INFOPATH. Add $PREFIX/lib/pkgconfig to PKG_CONFIG_PATH. Some packages are now installing .pc files in $PREFIX/share/pkgconfig, so you may have to include this directory also. Add $PREFIX/include to CPPFLAGS when compiling packages that depend on the package you installed. Add $PREFIX/lib to LDFLAGS when compiling packages that depend on a library installed by the package. If you are in search of a package that is not in the book, the following are different ways you can search for the desired package. If you know the name of the package, then search SourceForge for it at , and search GitHub for it at . Also search Google at . Sometimes a search for the rpm at or the deb at can also lead to a link to the package. If you know the name of the executable, but not the package that the executable belongs to, first try a Google search with the name of the executable. If the results are overwhelming, try searching for the given executable in the Debian repository at . Some general hints on handling new packages: Many of the newer packages follow the ./configure && make && make install process. Help on the options accepted by configure can be obtained via the command ./configure --help. Most of the packages contain documentation on compiling and installing the package. Some of the documents are excellent, some not so excellent. Check out the homepage of the package for any additional and updated hints for compiling and configuring the package. If you are having a problem compiling the package, try searching the LFS archives at for the error or if that fails, try searching Google. Often, a distribution will have already solved the problem (many of them use development versions of packages, so they see the changes sooner than those of us who normally use stable released versions). But be cautious - all builders tend to carry patches which are no longer necessary, and to have fixes which are only required because of their particular choices in how they build a package. You may have to search deeply to find a fix for the package version you are trying to use, or even to find the package (names are sometimes not what you might expect, e.g. ghostscript often has a prefix or a suffix in its name), but the following notes might help, particularly for those who, like the editors, are trying to build the latest versions and encountering problems: Arch - enter the package name in the 'Keywords' box, select the package name, select the 'Source Files' field, and then select the PKGBUILD entry to see how they build this package. Debian (use your country's version if there is one) - the source will be in .tar.gz tarballs (either the original upstream .orig source, or else a dfsg containing those parts which comply with Debian's free software guidelines) accompanied by versioned .diff.gz or .tar.gz additions. These additions often show how the package is built, and may contain patches. In the .diff.gz versions, any patches create files in debian/patches. Fedora package source gets reorganized from time to time. At the moment the package source for rpms is at and from there you can try putting a package name in the search box. If the package is found you can look at the files (specfile to control the build, various patches) or the commits. If that fails, you can download an srpm (source rpm) and using rpm2cpio (see the Tip at the bottom of the page). For rpms go to and then choose which repo you wish to look at - development/rawhide is the latest development, or choose releases for what was shipped in a release, updates for updates to a release, or updates/testing for the latest updates which might work or might have problems. Gentoo - First use a search engine to find an ebuild which looks as if it will fix the problem, or search at - use the search field. Note where the package lives in the portage hierarchy, e.g. app-something/. In general you can treat the ebuild as a sort of pseudo-code / shell combination with some functions you can hazard a guess at, such as dodoc. If the fix is just a sed, try it. However, in most cases the fix will use a patch. To find the patch, use a gentoo-portage mirror: Two links to mirrors in the U.S.A. which seem to usually be up to date are and . Navigate down the tree to the package, then to the files/ directory to look for the patch. Sometimes a portage mirror has not yet been updated, particularly for a recent new patch. In a few cases, gentoo batch the patches into a tarball and the ebuild will have a link in the form https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz : here, look for PATCH_DEV and PATCH_VER in the build and format the full URL in your browser or for wget : remember the '~' before the developer's ID and note that trying to search the earlier levels of the URL in a browser may drop you at www.gentoo.org or return 403 (forbidden). openSUSE provide a rolling release, some package versions are in but others are in ../update/openSUSE-current/src - the source only seems to be available in source rpms. Slackware - the official package browser is currently broken. The site at has current and previous versions in their unofficial repository with links to homepages, downloads, and some individual files, particularly the .SlackBuild files. Ubuntu - see the Debian notes above. If everything else fails, try the blfs-support mailing-list. If you have found a package that is only available in .deb or .rpm format, there are two small scripts, rpm2targz and deb2targz that are available at and to convert the archives into a simple tar.gz format. You may also find an rpm2cpio script useful. The Perl version in the linux kernel archives at works for most source rpms. The rpm2targz script will use an rpm2cpio script or binary if one is on your path. Note that rpm2cpio will unpack a source rpm in the current directory, giving a tarball, a spec file, and perhaps patches or other files.