NOTE: Please trim when replying.
It looks like we will be needing to add meson and ninja to lfs pretty
soon. The initial reason is that systemd will be going to a meson only
build but we do not have a time frame.
I also understand that a lot of gnome apps will be going to meson soon also.
I've done a little research and testing and offer some of the following
analysis.
Autotools:
This is the oldest build mechanism. It is designed to allow building of
packages across multiple packages like AIX, Solaris, Windows, IRIX, BSD,
and others as well as Linux.
The way it works is that the user creates configure.ac and Makfile.am and
then runs autotools to create configure and Makefile.in. configure then
uses Makefile.in to create the Makefile.
Embedded in this mechanism is the use of libtool which creates/uses .la
files in the /lib and /usr/lib directories. These .la files are not,
strictly speaking needed for Linux, although some packages will not build
without them. The mecanism is also somewhat cumbersome because it
requires the m4 macro processor and auxiliary files like aclocal.m4 and
acinclude.m4.
In addition, the autotools configuration files are somewhat cryptic. Just
look at some to see.
CMake:
cmake is a replacement for autotools. It does not use libtool, but does
use a lot of scripts in /usr/share/cmake-<version>. The package developer
has to create CMakeFiles.txt files and the builder then uses those to
create Makefiles.
The syntax is somewhat cumbersome as the options are all specified like
-DSOME_OPTION=value
meson:
This is a python based configuration tool. It uses a file named
meson.build that is relatively easy to read and understand. It uses an
auxiliary file named meson_options.txt to specify options.
The user syntax is a combination of autotools and cmake, It looks like:
meson --prefix /usr \
--sysconfdir /etc \
-Denable_docs=true \
$PWD \
build
It does not allow 'in-tree' builds but creates the needed files in the
last directory mentioned.
Note the lack of equal signs for --prefix and --sysconfdir, The $PWD is
the root of the source directory and 'build' in this case is a directory
created in the current directory where the actual build process occurs.
The target build process is ninja via a build.ninja file instead of a
Makefile. The following procedure would be to
cd build
ninja -j4
ninja install
ninja defaults to maximum cores derived from CPUs available for parallel
build.
Overall, I found the meson/ninja combination to be very fast and smooth,
but my experience with it is limited.
----------------
With the above info, the question is how to incorporate it into LFS/BLFS.
To install meson/ninja into LFS requires four new packages: libffi,
python3, ninja, and meson. I've tested this and they work fine. The only
issue in my mind is whether we need to keep some of these in BLFS.
libffi will not be needed, but Python3 and ninja have several optional
dependencies not in LFS. meson appears to only need Python3.
-----------------
All this is meant to both give advance warning to new issues that may
arise. Thoughts or concerns here are welcome, but please trim the message
to the relevant part.
-- Bruce
P.S. Not sure, but this may be enough to warrant a newer (9.0) version of
LFS.
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page