- Notifications
You must be signed in to change notification settings - Fork460
Compilation
fwupd uses theMeson build system for compilation.All building is done in a temporary directory as a non-root user, and autotools is not required.
The fwupd development environment is utilized to perform builds and run a development fwupd release without conflicting with the system fwupd package.It is further described in thefwupd building documentation.
The same helper script./contrib/setup
that is used to configure the fwupd development environment on your machine is used when you will compile outside of that environment. However it is suggested formost users to use the fwupd development environment.Running this script interactively will prompt you to set up missing build dependencies as well as set up your environment so that any commits you use are adjusted for fwupd project style as described inhttps://github.com/fwupd/fwupd/blob/master/CONTRIBUTING.md
Any missing build time dependencies will be mentioned while runningmeson
.
# meson setup build
The default compilation options are documented inmeson_options.txt
in the root of the build tree.If you would like to override any option. you can do so when generating the build rules.For example to disable theDELL plugin on meson 0.44.0+ you would run meson like this:
# meson setup build -Dplugin_dell=false
It is known that using-Wl,-Bsymbolic-functions
will cause runtime failures. Be sure to remove this from yourLDFLAGS
before compiling. Seehttps://github.com/hughsie/fwupd/issues/1077 for an example.
Compilation is executed by one command:
# ninja -C build
# sudo ninja -C build install
# sudo ldconfig
If you didn't use thecontrib/setup
script, then by default everything is placed into/usr/local
and most systems won't know how to manage dbus services from/usr/local
.
You can either re-run that script or manually create/etc/dbus-1/system-local.conf
with following contents:
<busconfig> <includedir>/usr/local/share/dbus-1/system.d</includedir></busconfig>
Reload dbus daemon
# systemctl reload dbus.service
Some Linux distributions don't configure/usr/local/lib
or/usr/local/lib64
to the library search path.To fix add the library path to a conffile in/etc/ld.so.conf.d/
and runsudo ldconfig
.
./contrib/setup
will also prompt to set this up for you.
Some plugins have additional runtime dependencies. Notable:
- UEFI plugin requires
udisks2
for some disk configurations - Modem manager plugin requires
modemmanager
to be useful
Scripts for generating distribution packages are available in thecontrib for popular distributions.