Skip to content

dbus: fix build by adding libcap_ng for libaudit support#484488

Merged
adamcstephens merged 1 commit intoNixOS:stagingfrom
philiptaron:dbus-fix-libaudit
Jan 27, 2026
Merged

dbus: fix build by adding libcap_ng for libaudit support#484488
adamcstephens merged 1 commit intoNixOS:stagingfrom
philiptaron:dbus-fix-libaudit

Conversation

@philiptaron
Copy link
Contributor

The dbus meson.build requires both libaudit and libcap-ng when libaudit support is enabled:

have_libaudit = libaudit_ok and cap_ng_ok

While the audit package itself depends on libcap_ng, that dependency doesn't make libcap_ng available in dbus's build environment. Adding it explicitly fixes the build failure:

Library cap-ng found: NO
meson.build:556:8: ERROR: Problem encountered: libaudit support requested but not found

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

The dbus meson.build requires both libaudit and libcap-ng when libaudit
support is enabled:

    have_libaudit = libaudit_ok and cap_ng_ok

While the audit package itself depends on libcap_ng, that dependency
doesn't make libcap_ng available in dbus's build environment. Adding it
explicitly fixes the build failure:

    Library cap-ng found: NO
    meson.build:556:8: ERROR: Problem encountered: libaudit support
    requested but not found
@philiptaron philiptaron mentioned this pull request Jan 27, 2026
19 tasks
@philiptaron philiptaron changed the title dbus: add libcap_ng for libaudit support dbus: fix build by adding libcap_ng for libaudit support Jan 27, 2026
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". labels Jan 27, 2026
@adamcstephens adamcstephens added this pull request to the merge queue Jan 27, 2026
Merged via the queue into NixOS:staging with commit a690482 Jan 27, 2026
31 checks passed
@philiptaron philiptaron deleted the dbus-fix-libaudit branch January 27, 2026 20:50
@hmenke
Copy link
Member

hmenke commented Feb 25, 2026

I don't know whether this caused the breakage, but you seem to be knowledgeable as to what might be going on.

When I try to build dbus statically on nixpkgs-unstable I get an error about libaudit not being found. The build works on nixos-25.11.

$ env NIX_PATH=nixpkgs=channel:nixpkgs-unstable nix-build -E 'with import <nixpkgs> {}; pkgsStatic.dbus.override { x11Support = false; }'
[...]
The Meson build system
Version: 1.10.1
Source dir: /build/dbus-1.16.2
Build dir: /build/dbus-1.16.2/build
Build type: cross build
Project name: dbus
Project version: 1.16.2
C compiler for the host machine: x86_64-unknown-linux-musl-gcc (gcc 15.2.0 "x86_64-unknown-linux-musl-gcc (GCC) 15.2.0")
C linker for the host machine: x86_64-unknown-linux-musl-gcc ld.bfd 2.44
Compiler for language c for the build machine not found.
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program python3 found: YES (/nix/store/m1fw8l8y9ycxh5dzispbb7cwl6rra14l-python3-3.13.12/bin/python3)
Message: Detected platform : Unix (linux)
Compiler for C supports arguments -D_GNU_SOURCE: YES 
Compiler for C supports arguments -fno-strict-aliasing: YES 
Compiler for C supports arguments -DDBUS_STATIC_BUILD: YES 
Compiler for C supports arguments -D__USE_MINGW_ANSI_STDIO=0: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Checking for size of "short" : 2 
Checking for size of "int" : 4 
Checking for size of "long" : 8 
Checking for size of "long long" : 8 
Checking for size of "__int64" : -1 
Checking for size of "void *" : 8 
Program xsltproc found: YES (/nix/store/5akzak6yir5qanifyrxh4fazb8vwn85y-libxslt-1.1.45-bin/bin/xsltproc)
Program doxygen skipped: feature doxygen_docs disabled
Program ducktype skipped: feature ducktype_docs disabled
Program yelp-build skipped: feature ducktype_docs disabled
Program qhelpgenerator qhelpgenerator-qt5 skipped: feature qt_help disabled
Run-time dependency threads found: YES
Header "pthread.h" has symbol "CLOCK_MONOTONIC" : YES 
Header "pthread.h" has symbol "pthread_condattr_setclock" : YES 
Header "time.h" has symbol "clock_getres" : YES 
Found pkg-config: YES (/nix/store/8mwxcg9p30571iy6npzbyw3fc2hiyzc1-x86_64-unknown-linux-musl-pkg-config-wrapper-0.29.2/bin/x86_64-unknown-linux-musl-pkg-config) 0.29.2
Run-time dependency expat found: YES 2.7.4
Checking for function "XML_SetHashSalt" with dependency expat: YES 
Dependency libselinux skipped: feature selinux disabled
Run-time dependency libapparmor found: YES 4.1.3
Has header "sys/inotify.h" : YES 
Has header "sys/epoll.h" : YES 
Checking for function "epoll_create1" : YES 
Dependency libsystemd skipped: feature systemd disabled
Library audit found: YES
Checking for function "audit_log_user_avc_message" with dependency -laudit: NO 
Library cap-ng found: YES
Checking for function "capng_clear" with dependency -lcap-ng: YES 

meson.build:556:8: ERROR: Problem encountered: libaudit support requested but not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants