conmon
conmon copied to clipboard
2.1.1: build fails because incorrect checking dependency for `libsystemd`
Meson passes without exit 1 anf build fails
+ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu
The Meson build system
Version: 0.62.1
Source dir: /home/tkloczko/rpmbuild/BUILD/conmon-2.1.1
Build dir: /home/tkloczko/rpmbuild/BUILD/conmon-2.1.1/x86_64-redhat-linux-gnu
Build type: native build
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
Project name: conmon
Project version: 2.1.1
C compiler for the host machine: /usr/bin/gcc (gcc 12.1.1 "gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)")
C linker for the host machine: /usr/bin/gcc ld.bfd 2.38-9
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES (/usr/bin/git)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency glib-2.0 found: YES 2.72.1
Checking for function "dlopen" : YES
Found CMake: /usr/bin/cmake (3.23.1)
Run-time dependency libsystemd-journal found: NO (tried pkgconfig and cmake)
Run-time dependency libsystemd found: NO (tried pkgconfig and cmake)
Build targets in project: 1
NOTICE: Future-deprecated features used:
* 0.56.0: {'meson.source_root'}
conmon 2.1.1
User defined options
auto_features : enabled
bindir : /usr/bin
buildtype : plain
datadir : /usr/share
includedir : /usr/include
infodir : /usr/share/info
libdir : /usr/lib64
libexecdir : /usr/libexec
localedir : /usr/share/locale
localstatedir : /var
mandir : /usr/share/man
prefix : /usr
sbindir : /usr/sbin
sharedstatedir: /var/lib
sysconfdir : /etc
wrap_mode : nodownload
Found ninja-1.10.2 at /usr/bin/ninja
+ /usr/bin/meson compile -C x86_64-redhat-linux-gnu -j 48 --verbose
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/conmon-2.1.1/x86_64-redhat-linux-gnu'
[1/17] /usr/bin/gcc -Iconmon.p -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O0 '-DVERSION="2.1.1"' '-DGIT_COMMIT=""' -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -MD -MQ conmon.p/src_seccomp_notify.c.o -MF conmon.p/src_seccomp_notify.c.o.d -o conmon.p/src_seccomp_notify.c.o -c ../src/seccomp_notify.c
FAILED: conmon.p/src_seccomp_notify.c.o
/usr/bin/gcc -Iconmon.p -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O0 '-DVERSION="2.1.1"' '-DGIT_COMMIT=""' -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -MD -MQ conmon.p/src_seccomp_notify.c.o -MF conmon.p/src_seccomp_notify.c.o.d -o conmon.p/src_seccomp_notify.c.o -c ../src/seccomp_notify.c
../src/seccomp_notify.c:9:10: fatal error: seccomp.h: No such file or directory
9 | #include <seccomp.h>
| ^~~~~~~~~~~
compilation terminated.
If libsystemd
has not been found meson should finish with error
libsystemd is an optional dependency of conmon, so the behavior here seems correct to me
As you see currently build fails if devel resources of the libsystemd
are not installed.
In other words currently that library isn't optional 😋
by the looks of it it seems like seccomp is really the failure here
That is only because you are using indirect dependency.
To fix that looks like dependency(foo, libseccomp ..)
should be used unconditionally and than optionally dependency(bar, libsystemd ..)
could be used.
I agree, do you have interest in opening a PR
Really sorry but I still have very long queue other packages to finish 😋 I can wait in this case on correct solution because that package is not on my critical path 😃 So .. take your time. No rush ..👍
I have opened https://github.com/containers/conmon/pull/339, can you PTAL? I am not very well versed in meson so I don't know if I did it right
Here is patch which I'm using now
--- a/meson.build~ 2022-06-14 18:06:40.000000000 +0000
+++ b/meson.build 2022-06-14 18:09:54.753211071 +0000
@@ -33,6 +33,7 @@
language : 'c')
glib = dependency('glib-2.0')
+seccomp = dependency('libseccomp >= 2.5')
cc = meson.get_compiler('c')
null_dep = dependency('', required : false)
@@ -85,7 +86,7 @@
'src/utils.h',
'src/seccomp_notify.c',
'src/seccomp_notify.h'],
- dependencies : [glib, libdl, sd_journal],
+ dependencies : [glib, seccomp, libdl, sd_journal],
install : true,
install_dir : join_paths(get_option('libexecdir'), 'podman'),
)
Please let me know if you want that as PR.